mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Add more thoughts on how the factory should work
This commit is contained in:
@@ -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<Steinberg::IPluginFactory2>(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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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<Steinberg::IPluginFactory> factory);
|
||||
|
||||
Reference in New Issue
Block a user