diff vamp-hostsdk/PluginConfiguration.h @ 428:4912b698f3f7 vampipe

Configuration request/response structs
author Chris Cannam
date Tue, 17 May 2016 13:52:51 +0100
parents 8c45dee08a95
children fbdb06ce1e9a
line wrap: on
line diff
--- 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;
+};
+
 }
 
 }