29 return Steinberg::kInvalidArgument;
30 if(mTarget.get() !=
nullptr)
31 return Steinberg::kResultFalse;
36 auto result = mSource->connect(
this);
37 if(result != Steinberg::kResultOk)
45 return Steinberg::kInvalidArgument;
46 if(other != mTarget.get())
47 return Steinberg::kResultFalse;
49 auto result = mSource->disconnect(
this);
50 if(result == Steinberg::kResultOk)
57 if(mTarget.get() ==
nullptr ||
58 std::this_thread::get_id() != mThreadId)
59 return Steinberg::kResultFalse;
61 return mTarget->notify(message);
IMPLEMENT_FUNKNOWN_METHODS(internal::ConnectionProxy, Steinberg::Vst::IConnectionPoint, Steinberg::Vst::IConnectionPoint::iid)
Host's proxy object between connection points.
ConnectionProxy(Steinberg::Vst::IConnectionPoint *source)
virtual ~ConnectionProxy()
Steinberg::tresult PLUGIN_API connect(IConnectionPoint *other) override
std::thread::id mThreadId
Steinberg::tresult PLUGIN_API disconnect(IConnectionPoint *other) override
Steinberg::tresult PLUGIN_API notify(Steinberg::Vst::IMessage *message) override