diff plugin/PluginScan.h @ 1246:75aefcc9f07d piper

Use plugin scan results to inform the list requests issued to Piper servers
author Chris Cannam
date Thu, 03 Nov 2016 14:14:09 +0000
parents c6bdf247016a
children d45a16c232bd
line wrap: on
line diff
--- a/plugin/PluginScan.h	Tue Nov 01 16:02:15 2016 +0000
+++ b/plugin/PluginScan.h	Thu Nov 03 14:14:09 2016 +0000
@@ -16,7 +16,9 @@
 #define PLUGIN_SCAN_H
 
 #include <QStringList>
+#include <QMutex>
 #include <vector>
+#include <map>
 
 class KnownPlugins;
 
@@ -34,7 +36,11 @@
 	LADSPAPlugin,
 	DSSIPlugin
     };
-    QStringList getCandidateLibrariesFor(PluginType) const;
+    struct Candidate {
+        QString libraryPath;
+        QString helperTag;
+    };
+    QList<Candidate> getCandidateLibrariesFor(PluginType) const;
 
     QString getStartupFailureReport() const;
 
@@ -43,8 +49,10 @@
     ~PluginScan();
 
     void clear();
+
+    mutable QMutex m_mutex; // while scanning; definitely can't multi-thread this
     
-    std::vector<KnownPlugins *> m_kp;
+    std::map<QString, KnownPlugins *> m_kp; // tag -> KnownPlugins client
     bool m_succeeded;
 
     class Logger;