@@ -14,11 +14,13 @@ enum class request_kind {
|
||||
DISPLAY,
|
||||
COMMAND,
|
||||
HEARTBEAT,
|
||||
TITLE,
|
||||
};
|
||||
|
||||
struct remote_request {
|
||||
request_kind kind{request_kind::DISPLAY};
|
||||
vamp_protocol::page_command command{vamp_protocol::page_command::NEXT};
|
||||
std::array<std::char_t, vamp_protocol::title_id_size + 1U> title_id{};
|
||||
};
|
||||
|
||||
enum class enqueue_result {
|
||||
@@ -33,6 +35,8 @@ public:
|
||||
auto next(std::uint64_t now_ms) -> std::optional<remote_request>;
|
||||
auto complete(std::uint64_t now_ms) -> void;
|
||||
auto queued() const -> std::size_t;
|
||||
auto want_title(std::string_view identifier) -> void;
|
||||
auto cancel_title() -> void;
|
||||
private:
|
||||
std::array<vamp_protocol::page_command, command_capacity> commands_{};
|
||||
std::size_t head_{};
|
||||
@@ -40,6 +44,9 @@ private:
|
||||
std::bool_t in_flight_{};
|
||||
std::bool_t completed_{};
|
||||
std::uint64_t completed_ms_{};
|
||||
std::array<std::char_t, vamp_protocol::title_id_size + 1U> title_id_{};
|
||||
std::bool_t title_pending_{};
|
||||
request_kind active_kind_{request_kind::DISPLAY};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user