From 218b919f32d259089448c3613178ce7e86ea526f Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 11 Sep 2022 16:19:53 +0200 Subject: [PATCH] Add message types for restart and process requests --- src/common/serialization/clap/host.h | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/common/serialization/clap/host.h b/src/common/serialization/clap/host.h index 1530d595..cee25380 100644 --- a/src/common/serialization/clap/host.h +++ b/src/common/serialization/clap/host.h @@ -24,6 +24,7 @@ #include #include "../../bitsery/ext/in-place-optional.h" +#include "../common.h" // Serialization messages for `clap/host.h` @@ -94,5 +95,36 @@ struct SupportedHostExtensions { } }; +/** + * Message struct for `clap_host::request_restart()`. + */ +struct RequestRestart { + using Response = Ack; + + native_size_t owner_instance_id; + + template + void serialize(S& s) { + s.value8b(owner_instance_id); + } +}; + +/** + * Message struct for `clap_host::request_process()`. + */ +struct RequestProcess { + using Response = Ack; + + native_size_t owner_instance_id; + + template + void serialize(S& s) { + s.value8b(owner_instance_id); + } +}; + +// `clap_host::request_callback()` is of course handled entirely on the Wine +// plugin host side + } // namespace host } // namespace clap