31struct HostApp final :
public Steinberg::Vst::IHostApplication
33 Steinberg::Vst::PlugInterfaceSupport m_support;
36 Steinberg::tresult getName(Steinberg::Vst::String128 name)
override
38 Steinberg::String str(
"ossia score");
39 str.copyTo16(name, 0, 127);
40 return Steinberg::kResultTrue;
44 createInstance(Steinberg::TUID cid, Steinberg::TUID _iid,
void** obj)
override
46 using namespace Steinberg;
47 using namespace Steinberg::Vst;
48 FUID classID(FUID::fromTUID(cid));
49 FUID interfaceID(FUID::fromTUID(_iid));
50 if(classID == Vst::IMessage::iid && interfaceID == Vst::IMessage::iid)
52 *obj =
new HostMessage;
56 classID == Vst::IAttributeList::iid && interfaceID == Vst::IAttributeList::iid)
58 *obj = Vst::HostAttributeList::make();
65 Steinberg::tresult queryInterface(
const char* _iid,
void** obj)
override
67 using namespace Steinberg;
68 using namespace Steinberg::Vst;
69 QUERY_INTERFACE(_iid, obj, FUnknown::iid, IHostApplication)
70 QUERY_INTERFACE(_iid, obj, IHostApplication::iid, IHostApplication)
72 if(m_support.isPlugInterfaceSupported(_iid) == kResultTrue)
79 Steinberg::uint32 addRef()
override {
return 1; }
81 Steinberg::uint32 release()
override {
return 1; }
94 VST3::Hosting::Module::Ptr getModule(
const std::string& path);
97 void rescan(
const QStringList& paths);
98 void vstChanged() W_SIGNAL(vstChanged)
100 void processIncomingMessage(
const QString& txt);
101 void addInvalidVST(
const QString& path);
102 void addVST(
const QString& path,
const QJsonObject& json);
104 void scanVSTsEvent();
106 std::pair<const AvailablePlugin*, const VST3::Hosting::ClassInfo*>
107 classInfo(
const VST3::UID& uid)
const noexcept;
108 QString pathForClass(
const VST3::UID& uid)
const noexcept;
109 std::optional<VST3::UID>
110 uidForPathAndClassName(
const QString& path,
const QString& cls)
const noexcept;
112#if QT_CONFIG(process)
113 struct ScanningProcess
116 std::unique_ptr<QProcess> process;
121 std::vector<ScanningProcess> m_processes;
122 QWebSocketServer m_wsServer;
126 ossia::string_map<VST3::Hosting::Module::Ptr> modules;
127 std::vector<AvailablePlugin> vst_infos;
Used to access all the application-wide state and structures.
Definition ApplicationContext.hpp:24