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
-18
View File
@@ -21,7 +21,6 @@
#include "../bitsery/ext/in-place-variant.h"
#include "../bitsery/ext/message-reference.h"
#include "../configuration.h"
#include "../utils.h"
#include "common.h"
#include "vst3/component-handler-proxy.h"
@@ -49,23 +48,6 @@
// All messages for creating objects and calling interfaces on them are defined
// as part of the interfaces and implementations in `vst3/`
/**
* 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);
}
};
/**
* When we send a control message from the plugin to the Wine plugin host, this
* encodes the information we request or the operation we want to perform. A