Mercurial > hg > vamp-plugin-sdk
changeset 428:4912b698f3f7 vampipe
Configuration request/response structs
author | Chris Cannam |
---|---|
date | Tue, 17 May 2016 13:52:51 +0100 |
parents | 56a23abf8283 |
children | 9c25e2289faa |
files | vamp-hostsdk/LoadRequest.h vamp-hostsdk/PluginConfiguration.h |
diffstat | 2 files changed, 41 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vamp-hostsdk/LoadRequest.h Thu May 12 16:41:12 2016 +0100 +++ b/vamp-hostsdk/LoadRequest.h Tue May 17 13:52:51 2016 +0100 @@ -102,7 +102,7 @@ }; /** - * \class LoadResponse LoadResponse.h <vamp-hostsdk/LoadResponse.h> + * \class LoadResponse LoadRequest.h <vamp-hostsdk/LoadRequest.h> * * Vamp::HostExt::LoadResponse is a structure containing the * information returned by PluginLoader when asked to load a plugin
--- a/vamp-hostsdk/PluginConfiguration.h Thu May 12 16:41:12 2016 +0100 +++ b/vamp-hostsdk/PluginConfiguration.h Tue May 17 13:52:51 2016 +0100 @@ -39,6 +39,8 @@ #include "hostguard.h" +#include "Plugin.h" + #include <map> #include <string> @@ -102,6 +104,44 @@ } }; +/** + * \class ConfigurationRequest PluginConfiguration.h <vamp-hostsdk/PluginConfiguration.h> + * + * A wrapper for a plugin pointer and PluginConfiguration, bundling up + * the data needed to configure a plugin after it has been loaded. + * + * \see PluginConfiguration, ConfigurationResponse, LoadRequest, LoadResponse + */ +struct ConfigurationRequest +{ +public: + ConfigurationRequest() : // invalid request by default + plugin(0) { } + + Plugin *plugin; + PluginConfiguration configuration; +}; + +/** + * \class ConfigurationResponse PluginConfiguration.h <vamp-hostsdk/PluginConfiguration.h> + * + * The return value from a configuration request (i.e. setting the + * parameters and initialising the plugin). If the configuration was + * successful, the output list will contain the final + * post-initialisation output descriptors. If configuration failed, + * the output list will be empty. + * + * \see PluginConfiguration, ConfigurationRequest, LoadRequest, LoadResponse + */ +struct ConfigurationResponse +{ +public: + ConfigurationResponse() // failed by default + { } + + Plugin::OutputList outputs; +}; + } }