diff --git a/README.md b/README.md
index 75fbfbed..4a3f0937 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,8 @@ This branch is still very far removed from being in a usable state. Below is an
imcomplete list of things that still have to be done before this can be used:
- Left to implement:
- - `IHostApplication` implementations for both `IPluginBase::initialize()` as
- well as for `IPluginFactory3::setHostContext()`.
+ - `YaHostApplicationHostImpl::createComponent`.
+ - `IPluginFactory3::setHostContext()` using the same host application context proxy method.
- The rest of `IComponent`'s functions after implementing `intialize()`
- `IPluginFactory3::setHostContext()`
- All other mandatory interfaces
diff --git a/meson.build b/meson.build
index b6b09d2a..17f46217 100644
--- a/meson.build
+++ b/meson.build
@@ -116,6 +116,7 @@ if with_vst3
'src/common/serialization/vst3/component.cpp',
'src/common/serialization/vst3/host-application.cpp',
'src/common/serialization/vst3/plugin-factory.cpp',
+ 'src/wine-host/bridges/vst3-impls/host-application.cpp',
'src/wine-host/bridges/vst3.cpp',
]
endif
diff --git a/src/common/serialization/vst3/host-application.h b/src/common/serialization/vst3/host-application.h
index 9f2e989a..6a88644f 100644
--- a/src/common/serialization/vst3/host-application.h
+++ b/src/common/serialization/vst3/host-application.h
@@ -94,7 +94,7 @@ class YaHostApplication : public Steinberg::Vst::IHostApplication {
* and we also track a `YaHostApplicationHostImpl` for the component with
* instance id `x`, then that should also be dropped.
*/
- ~YaHostApplication();
+ virtual ~YaHostApplication();
DECLARE_FUNKNOWN_METHODS
diff --git a/src/wine-host/bridges/vst3-impls/host-application.cpp b/src/wine-host/bridges/vst3-impls/host-application.cpp
new file mode 100644
index 00000000..b53e5b73
--- /dev/null
+++ b/src/wine-host/bridges/vst3-impls/host-application.cpp
@@ -0,0 +1,47 @@
+// yabridge: a Wine VST bridge
+// Copyright (C) 2020 Robbert van der Helm
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#include "host-application.h"
+
+#include
+
+YaHostApplicationHostImpl::YaHostApplicationHostImpl(
+ Vst3Bridge& bridge,
+ YaHostApplication::ConstructArgs&& args)
+ : YaHostApplication(std::move(args)), bridge(bridge) {
+ // The lifecycle is thos object is managed together with that of the
+ // `IComponent` instance this belongs to
+}
+
+tresult PLUGIN_API
+YaHostApplicationHostImpl::queryInterface(const Steinberg::TUID _iid,
+ void** obj) {
+ const tresult result = YaHostApplication::queryInterface(_iid, obj);
+ if (result != Steinberg::kResultOk) {
+ std::cerr << "TODO: Implement unknown interface logging on Wine side"
+ << std::endl;
+ }
+
+ return result;
+}
+
+tresult PLUGIN_API
+YaHostApplicationHostImpl::createInstance(Steinberg::TUID cid,
+ Steinberg::TUID _iid,
+ void** obj) {
+ // TODO: Implement
+ return Steinberg::kNotImplemented;
+}
diff --git a/src/wine-host/bridges/vst3-impls/host-application.h b/src/wine-host/bridges/vst3-impls/host-application.h
new file mode 100644
index 00000000..c9c302f9
--- /dev/null
+++ b/src/wine-host/bridges/vst3-impls/host-application.h
@@ -0,0 +1,41 @@
+// yabridge: a Wine VST bridge
+// Copyright (C) 2020 Robbert van der Helm
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#pragma once
+
+#include
+
+#include "../vst3.h"
+
+class YaHostApplicationHostImpl : public YaHostApplication {
+ public:
+ YaHostApplicationHostImpl(Vst3Bridge& bridge,
+ YaHostApplication::ConstructArgs&& args);
+
+ /**
+ * We'll override the query interface to log queries for interfaces we do
+ * not (yet) support.
+ */
+ tresult PLUGIN_API queryInterface(const Steinberg::TUID _iid,
+ void** obj) override;
+
+ tresult PLUGIN_API createInstance(Steinberg::TUID cid,
+ Steinberg::TUID _iid,
+ void** obj) override;
+
+ private:
+ Vst3Bridge& bridge;
+};