Add WantsConfiguration logging for CLAP

This commit is contained in:
Robbert van der Helm
2022-08-28 19:40:25 +02:00
parent 7a60cf37ea
commit 8ef8a61e2b
2 changed files with 17 additions and 2 deletions
+11
View File
@@ -29,7 +29,18 @@ ClapLogger::ClapLogger(Logger& generic_logger) : logger_(generic_logger) {}
// });
// }
bool ClapLogger::log_request(bool is_host_plugin, const WantsConfiguration&) {
return log_request_base(is_host_plugin, [&](auto& message) {
message << "Requesting <Configuration>";
});
}
// void ClapLogger::log_response(bool is_host_plugin, const Ack&) {
// log_response_base(is_host_plugin, [&](auto& message) { message << "ACK";
// });
// }
void ClapLogger::log_response(bool is_host_plugin, const Configuration&) {
log_response_base(is_host_plugin,
[&](auto& message) { message << "<Configuration>"; });
}
+6 -2
View File
@@ -18,7 +18,7 @@
#include <sstream>
// #include "../serialization/clap.h"
#include "../serialization/clap.h"
#include "common.h"
/**
@@ -45,7 +45,7 @@ class ClapLogger {
// `log_request()` call returned `true`. This way we can filter out the
// log message for the response together with the request.
// TODO: M ain thread rquests
// TODO: Main thread rquests
// bool log_request(bool is_host_plugin,
// const ClapPluginFactoryProxy::Construct&);
@@ -53,6 +53,8 @@ class ClapLogger {
// bool log_request(bool is_host_plugin,
// const YaAudioProcessor::SetBusArrangements&);
bool log_request(bool is_host_plugin, const WantsConfiguration&);
// TOOD: Main thread responses
// void log_response(bool is_host_plugin, const Ack&);
// void log_response(bool is_host_plugin,
@@ -63,6 +65,8 @@ class ClapLogger {
// void log_response(bool is_host_plugin,
// const YaAudioProcessor::GetBusArrangementResponse&);
void log_response(bool is_host_plugin, const Configuration&);
// TODO: Universal response
// template <typename T>
// void log_response(bool is_host_plugin,