mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-17 06:00:03 +02:00
Log successful FUnknown::queryInterface calls
This commit is contained in:
@@ -29,13 +29,9 @@ Vst3ComponentHandlerProxyImpl::Vst3ComponentHandlerProxyImpl(
|
||||
tresult PLUGIN_API
|
||||
Vst3ComponentHandlerProxyImpl::queryInterface(const Steinberg::TUID _iid,
|
||||
void** obj) {
|
||||
// TODO: Successful queries should also be logged
|
||||
const tresult result = Vst3ComponentHandlerProxy::queryInterface(_iid, obj);
|
||||
if (result != Steinberg::kResultOk) {
|
||||
bridge.logger.log_unknown_interface(
|
||||
"In IComponentHandler::queryInterface()",
|
||||
Steinberg::FUID::fromTUID(_iid));
|
||||
}
|
||||
bridge.logger.log_query_interface("In IComponentHandler::queryInterface()",
|
||||
result, Steinberg::FUID::fromTUID(_iid));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -26,13 +26,9 @@ Vst3ConnectionPointProxyImpl::Vst3ConnectionPointProxyImpl(
|
||||
tresult PLUGIN_API
|
||||
Vst3ConnectionPointProxyImpl::queryInterface(const Steinberg::TUID _iid,
|
||||
void** obj) {
|
||||
// TODO: Successful queries should also be logged
|
||||
const tresult result = Vst3ConnectionPointProxy::queryInterface(_iid, obj);
|
||||
if (result != Steinberg::kResultOk) {
|
||||
bridge.logger.log_unknown_interface(
|
||||
"In IConnectionPoint::queryInterface()",
|
||||
Steinberg::FUID::fromTUID(_iid));
|
||||
}
|
||||
bridge.logger.log_query_interface("In IConnectionPoint::queryInterface()",
|
||||
result, Steinberg::FUID::fromTUID(_iid));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -34,12 +34,9 @@ Vst3HostContextProxyImpl::queryInterface(const Steinberg::TUID _iid,
|
||||
void** obj) {
|
||||
// I don't think it's expected of a host to implement multiple interfaces on
|
||||
// this object, so if we do get a call here it's important that it's logged
|
||||
// TODO: Successful queries should also be logged
|
||||
const tresult result = Vst3HostContextProxy::queryInterface(_iid, obj);
|
||||
if (result != Steinberg::kResultOk) {
|
||||
bridge.logger.log_unknown_interface("In FUnknown::queryInterface()",
|
||||
Steinberg::FUID::fromTUID(_iid));
|
||||
}
|
||||
bridge.logger.log_query_interface("In FUnknown::queryInterface()", result,
|
||||
Steinberg::FUID::fromTUID(_iid));
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -83,8 +80,9 @@ Vst3HostContextProxyImpl::createInstance(Steinberg::TUID /*cid*/,
|
||||
// When the host requests an interface we do not (yet) implement,
|
||||
// we'll print a recognizable log message
|
||||
const Steinberg::FUID uid = Steinberg::FUID::fromTUID(_iid);
|
||||
bridge.logger.log_unknown_interface(
|
||||
"In IHostApplication::createInstance()", uid);
|
||||
bridge.logger.log_query_interface(
|
||||
"In IHostApplication::createInstance()", Steinberg::kNotImplemented,
|
||||
uid);
|
||||
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
@@ -28,12 +28,9 @@ Vst3PlugFrameProxyImpl::Vst3PlugFrameProxyImpl(
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3PlugFrameProxyImpl::queryInterface(const Steinberg::TUID _iid, void** obj) {
|
||||
// TODO: Successful queries should also be logged
|
||||
const tresult result = Vst3PlugFrameProxy::queryInterface(_iid, obj);
|
||||
if (result != Steinberg::kResultOk) {
|
||||
bridge.logger.log_unknown_interface("In IPlugFrame::queryInterface()",
|
||||
Steinberg::FUID::fromTUID(_iid));
|
||||
}
|
||||
bridge.logger.log_query_interface("In IPlugFrame::queryInterface()", result,
|
||||
Steinberg::FUID::fromTUID(_iid));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user