20#ifndef ORES_ASSETS_MESSAGING_ASSETS_PROTOCOL_HPP
21#define ORES_ASSETS_MESSAGING_ASSETS_PROTOCOL_HPP
29#include "ores.comms/messaging/message_types.hpp"
30#include "ores.comms/messaging/message_traits.hpp"
31#include "ores.assets/domain/image.hpp"
46 std::vector<std::string> image_ids;
48 std::vector<std::byte> serialize()
const;
49 static std::expected<get_images_request, ores::utility::serialization::error_code>
50 deserialize(std::span<const std::byte> data);
59 std::vector<domain::image> images;
61 std::vector<std::byte> serialize()
const;
62 static std::expected<get_images_response, ores::utility::serialization::error_code>
63 deserialize(std::span<const std::byte> data);
83 std::vector<std::byte> serialize()
const;
84 static std::expected<list_images_request, ores::utility::serialization::error_code>
85 deserialize(std::span<const std::byte> data);
96 std::string description;
105std::ostream& operator<<(std::ostream& s,
const image_info& v);
111 std::vector<image_info> images;
113 std::vector<std::byte> serialize()
const;
114 static std::expected<list_images_response, ores::utility::serialization::error_code>
115 deserialize(std::span<const std::byte> data);
131 static constexpr message_type request_message_type =
132 message_type::get_images_request;
142 static constexpr message_type request_message_type =
143 message_type::list_images_request;
Network messaging infrastructure for the assets module.
Definition assets_message_handler.hpp:28
constexpr std::uint32_t MAX_IMAGES_PER_REQUEST
Maximum number of images that can be requested in a single get_images_request.
Definition assets_protocol.hpp:38
Contains messaging related infrastructure in the comms library.
Definition assets_protocol.hpp:122
Request to retrieve images by their IDs.
Definition assets_protocol.hpp:45
Response containing requested images.
Definition assets_protocol.hpp:58
Request to list available images.
Definition assets_protocol.hpp:74
std::optional< std::chrono::system_clock::time_point > modified_since
Optional timestamp to filter images.
Definition assets_protocol.hpp:81
Metadata for an image (without SVG data).
Definition assets_protocol.hpp:93
std::chrono::system_clock::time_point recorded_at
Timestamp when this image was last modified.
Definition assets_protocol.hpp:102
Response containing metadata for all available images.
Definition assets_protocol.hpp:110
Traits template for mapping request types to their response types and message type enum values.
Definition message_traits.hpp:66