mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Add message structs for IPlugInterfaceSupport
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <bitsery/ext/std_optional.h>
|
||||||
#include <pluginterfaces/vst/ivstpluginterfacesupport.h>
|
#include <pluginterfaces/vst/ivstpluginterfacesupport.h>
|
||||||
|
|
||||||
#include "../../common.h"
|
#include "../../common.h"
|
||||||
@@ -61,6 +62,33 @@ class YaPlugInterfaceSupport : public Steinberg::Vst::IPlugInterfaceSupport {
|
|||||||
|
|
||||||
inline bool supported() const { return arguments.supported; }
|
inline bool supported() const { return arguments.supported; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Message to pass through a call to
|
||||||
|
* `IPlugInterfaceSupport::isPlugInterfaceSupported(iid)` to the host
|
||||||
|
* context provided by the host.
|
||||||
|
*/
|
||||||
|
struct IsPlugInterfaceSupported {
|
||||||
|
using Response = UniversalTResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The object instance whose host context to call this function to. Of
|
||||||
|
* empty, then the function will be called on the factory's host context
|
||||||
|
* instead.
|
||||||
|
*/
|
||||||
|
std::optional<native_size_t> owner_instance_id;
|
||||||
|
|
||||||
|
ArrayUID iid;
|
||||||
|
|
||||||
|
template <typename S>
|
||||||
|
void serialize(S& s) {
|
||||||
|
s.ext(owner_instance_id, bitsery::ext::StdOptional{},
|
||||||
|
[](S& s, native_size_t& instance_id) {
|
||||||
|
s.value8b(instance_id);
|
||||||
|
});
|
||||||
|
s.container1b(iid);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
virtual tresult PLUGIN_API
|
virtual tresult PLUGIN_API
|
||||||
isPlugInterfaceSupported(const Steinberg::TUID _iid) override = 0;
|
isPlugInterfaceSupported(const Steinberg::TUID _iid) override = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user