Move WantsConfiguration to common

We'll also need this for CLAP.
This commit is contained in:
Robbert van der Helm
2022-08-23 18:44:46 +02:00
parent 4ca7ea17b2
commit 9edb4aa567
2 changed files with 18 additions and 18 deletions
+18
View File
@@ -22,6 +22,7 @@
#include <cstdint>
#include <type_traits>
#include "../configuration.h"
#include "../plugins.h"
// The plugin should always be compiled to a 64-bit version, but the host
@@ -43,6 +44,23 @@ struct Ack {
void serialize(S&) {}
};
/**
* Marker struct to indicate the other side (the plugin) should send a copy of
* the configuration. During this process we will also transmit the version
* string from the host, so we can show a little warning when the user forgot to
* rerun `yabridgectl sync` (and the initialization was still successful).
*/
struct WantsConfiguration {
using Response = Configuration;
std::string host_version;
template <typename S>
void serialize(S& s) {
s.text1b(host_version, 128);
}
};
/**
* An object containing the startup options for hosting a plugin. These options
* are passed to `yabridge-host.exe` as command line arguments, and they are