Add constructors for reading extension support

This commit is contained in:
Robbert van der Helm
2022-09-10 15:28:28 +02:00
parent 7ea29cdfed
commit bc2bad3e94
4 changed files with 23 additions and 0 deletions
+3
View File
@@ -26,5 +26,8 @@ Host::Host(const clap_host_t& original)
url(original.url ? std::optional(original.url) : std::nullopt),
version((assert(original.version), original.version)) {}
// TODO: Add extensions
SupportedHostExtensions::SupportedHostExtensions(const clap_host& host) {}
} // namespace host
} // namespace clap
+8
View File
@@ -77,6 +77,14 @@ struct Host {
* same extensions available to the bridged CLAP plugins using proxies.
*/
struct SupportedHostExtensions {
/**
* Read the supported extensions from a native CLAP host. This is only valid
* once the native host has called `clap_host::init()`.
*/
SupportedHostExtensions(const clap_host& host);
SupportedHostExtensions() noexcept {}
// Don't forget to add new extensions to the log output
// TODO: Support extensions
+4
View File
@@ -74,5 +74,9 @@ const clap_plugin_descriptor_t* Descriptor::get() const {
return &clap_descriptor;
}
// TODO: Add extensions
SupportedPluginExtensions::SupportedPluginExtensions(
const clap_plugin& plugin) {}
} // namespace plugin
} // namespace clap
+8
View File
@@ -110,6 +110,14 @@ struct Descriptor {
* Extensions supported by the plugin. Queried after `clap_plugin::init()`.
*/
struct SupportedPluginExtensions {
/**
* Read the supported extensions from a CLAP plugin. This is only valid
* after `clap_plugin::init()` has been called on the plugin.
*/
SupportedPluginExtensions(const clap_plugin& plugin);
SupportedPluginExtensions() noexcept {}
// Don't forget to add new extensions to the log output
// TODO: Support extensions