diff vamp-support/LoaderRequests.h @ 133:74a7c2a8d6b6

Merge from branch listargs
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 04 Nov 2016 10:43:49 +0000
parents 5b113c87b6e6
children 3dcf0394971d
line wrap: on
line diff
--- a/vamp-support/LoaderRequests.h	Fri Oct 28 14:31:58 2016 +0100
+++ b/vamp-support/LoaderRequests.h	Fri Nov 04 10:43:49 2016 +0000
@@ -51,12 +51,18 @@
 {
 public:
     ListResponse
-    listPluginData() {
+    listPluginData(ListRequest req) {
 
 	auto loader = Vamp::HostExt::PluginLoader::getInstance();
-	auto keys = loader->listPlugins();
+        
+        std::vector<std::string> keys;
+        if (req.from.empty()) {
+            keys = loader->listPlugins();
+        } else {
+            keys = loader->listPluginsIn(req.from);
+        }
+
 	ListResponse response;
-
 	for (std::string key: keys) {
 	    Vamp::Plugin *p = loader->loadPlugin(key, 44100, 0);
 	    if (!p) continue;