diff --git a/src/common/serialization/vst3/plugin-factory.cpp b/src/common/serialization/vst3/plugin-factory.cpp index 5b2126f8..e310c3a5 100644 --- a/src/common/serialization/vst3/plugin-factory.cpp +++ b/src/common/serialization/vst3/plugin-factory.cpp @@ -23,6 +23,8 @@ YaPluginFactory::YaPluginFactory( FUNKNOWN_CTOR // TODO: Copy data from `IPluginFactory` + // TODO: We should only copy the interfaces that we support. This should use + // the same list as that used in `createInstance()`. known_iids.insert(factory->iid); auto factory2 = Steinberg::FUnknownPtr(factory); @@ -94,7 +96,17 @@ tresult PLUGIN_API YaPluginFactory::createInstance(Steinberg::FIDString /*cid*/, Steinberg::FIDString /*_iid*/, void** /*obj*/) { - // TODO: Implement + // TODO: Figure out how to implement this. Some considerations: + // - We have to sent a control message to the Wine plugin host to ask + // it to create an instance of `_iid`. + // - We then create a `Ya*` implementation of the same interface on + // the plugin side. + // - These two should be wired up so that when the host calls a + // function on it, it should be sent to the instance on the Wine + // plugin host side with the same cid. + // - We should have a list of interfaces we support. When we receive a + // request to create an instance of something we don't support, then + // we should log that and then fail. return 0; } diff --git a/src/common/serialization/vst3/plugin-factory.h b/src/common/serialization/vst3/plugin-factory.h index c81c6687..67194869 100644 --- a/src/common/serialization/vst3/plugin-factory.h +++ b/src/common/serialization/vst3/plugin-factory.h @@ -27,6 +27,9 @@ namespace { using Steinberg::int32, Steinberg::tresult; } // namespace +// TODO: After implementing one or two more of these, abstract away some of the +// nasty bits + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" @@ -36,6 +39,11 @@ using Steinberg::int32, Steinberg::tresult; */ class YaPluginFactory : public Steinberg::IPluginFactory3 { public: + /** + * TODO: Instead of a having a default constructor, we should probably be + * passing a callback to this constructor that lets us communicate + * with the Wine plugin host. + */ YaPluginFactory(); /** @@ -43,8 +51,6 @@ class YaPluginFactory : public Steinberg::IPluginFactory3 { supported * interface function more or less of this struct will be left empty, and * `iid` will be set accordingly. - * - * TODO: Check if we don't need a custom query interface, we probably do. */ explicit YaPluginFactory( Steinberg::IPtr factory);