Implement IComponent::getState()

With this the basic IComponent interface is fully implemented. Next will
be `IAudioProcessor` and `IConnectionPoint` as additions to IComponent.
We'll use the same `known_iids` mechanism as used in the plugin factory.
This commit is contained in:
Robbert van der Helm
2020-12-14 12:33:35 +01:00
parent 02e6fb1ba8
commit e653142e45
9 changed files with 75 additions and 8 deletions
+31
View File
@@ -371,6 +371,37 @@ class YaComponent : public Steinberg::Vst::IComponent {
virtual tresult PLUGIN_API
setState(Steinberg::IBStream* state) override = 0;
/**
* The response code and written state for a call to
* `IComponent::getState(state)`.
*/
struct GetStateResponse {
UniversalTResult result;
VectorStream updated_state;
template <typename S>
void serialize(S& s) {
s.object(result);
s.object(updated_state);
}
};
/**
* Message to pass through a call to `IComponent::getState(state)` to the
* Wine plugin host.
*/
struct GetState {
using Response = GetStateResponse;
native_size_t instance_id;
template <typename S>
void serialize(S& s) {
s.value8b(instance_id);
}
};
virtual tresult PLUGIN_API
getState(Steinberg::IBStream* state) override = 0;