mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 21:50:11 +02:00
Move WantsConfiguration to common
We'll also need this for CLAP.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user