Add stubs for IProgress

This commit is contained in:
Robbert van der Helm
2021-01-16 18:09:39 +01:00
parent bfdfd9c341
commit e840fe3114
4 changed files with 41 additions and 0 deletions
@@ -26,6 +26,7 @@ Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs(
component_handler_2_args(object),
component_handler_3_args(object),
component_handler_bus_activation_args(object),
progress_args(object),
unit_handler_args(object),
unit_handler_2_args(object) {}
@@ -35,6 +36,7 @@ Vst3ComponentHandlerProxy::Vst3ComponentHandlerProxy(const ConstructArgs&& args)
YaComponentHandler3(std::move(args.component_handler_3_args)),
YaComponentHandlerBusActivation(
std::move(args.component_handler_bus_activation_args)),
YaProgress(std::move(args.progress_args)),
YaUnitHandler(std::move(args.unit_handler_args)),
YaUnitHandler2(std::move(args.unit_handler_2_args)),
arguments(std::move(args)){FUNKNOWN_CTOR}
@@ -70,6 +72,10 @@ Vst3ComponentHandlerProxy::queryInterface(Steinberg::FIDString _iid,
Steinberg::Vst::IComponentHandlerBusActivation::iid,
Steinberg::Vst::IComponentHandlerBusActivation)
}
if (YaProgress::supported()) {
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IProgress::iid,
Steinberg::Vst::IProgress)
}
if (YaUnitHandler::supported()) {
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IUnitHandler::iid,
Steinberg::Vst::IUnitHandler)
@@ -21,6 +21,7 @@
#include "component-handler/component-handler-3.h"
#include "component-handler/component-handler-bus-activation.h"
#include "component-handler/component-handler.h"
#include "component-handler/progress.h"
#include "component-handler/unit-handler-2.h"
#include "component-handler/unit-handler.h"
@@ -39,6 +40,7 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler,
public YaComponentHandler2,
public YaComponentHandler3,
public YaComponentHandlerBusActivation,
public YaProgress,
public YaUnitHandler,
public YaUnitHandler2 {
public:
@@ -69,6 +71,7 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler,
YaComponentHandler3::ConstructArgs component_handler_3_args;
YaComponentHandlerBusActivation::ConstructArgs
component_handler_bus_activation_args;
YaProgress::ConstructArgs progress_args;
YaUnitHandler::ConstructArgs unit_handler_args;
YaUnitHandler2::ConstructArgs unit_handler_2_args;
@@ -79,6 +82,7 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler,
s.object(component_handler_2_args);
s.object(component_handler_3_args);
s.object(component_handler_bus_activation_args);
s.object(progress_args);
s.object(unit_handler_args);
s.object(unit_handler_2_args);
}
@@ -128,6 +128,29 @@ tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::requestBusActivation(
.state = state});
}
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::start(
ProgressType type,
const Steinberg::tchar* optionalDescription,
ID& outID) {
// TODO: Implement
std::cerr << "TODO: Implement IProgress::start()" << std::endl;
return Steinberg::kNotImplemented;
}
tresult PLUGIN_API
Vst3ComponentHandlerProxyImpl::update(ID id,
Steinberg::Vst::ParamValue normValue) {
// TODO: Implement
std::cerr << "TODO: Implement IProgress::update()" << std::endl;
return Steinberg::kNotImplemented;
}
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::finish(ID id) {
// TODO: Implement
std::cerr << "TODO: Implement IProgress::finish()" << std::endl;
return Steinberg::kNotImplemented;
}
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitSelection(
Steinberg::Vst::UnitID unitId) {
return bridge.send_message(YaUnitHandler::NotifyUnitSelection{
@@ -56,6 +56,14 @@ class Vst3ComponentHandlerProxyImpl : public Vst3ComponentHandlerProxy {
int32 index,
TBool state) override;
// From `IProgress`
tresult PLUGIN_API start(ProgressType type,
const Steinberg::tchar* optionalDescription,
ID& outID) override;
tresult PLUGIN_API update(ID id,
Steinberg::Vst::ParamValue normValue) override;
tresult PLUGIN_API finish(ID id) override;
// From `IUnitHandler`
tresult PLUGIN_API
notifyUnitSelection(Steinberg::Vst::UnitID unitId) override;