Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
1245:0492e54ccd56 | 1246:75aefcc9f07d |
---|---|
14 | 14 |
15 #ifndef PLUGIN_SCAN_H | 15 #ifndef PLUGIN_SCAN_H |
16 #define PLUGIN_SCAN_H | 16 #define PLUGIN_SCAN_H |
17 | 17 |
18 #include <QStringList> | 18 #include <QStringList> |
19 #include <QMutex> | |
19 #include <vector> | 20 #include <vector> |
21 #include <map> | |
20 | 22 |
21 class KnownPlugins; | 23 class KnownPlugins; |
22 | 24 |
23 class PluginScan | 25 class PluginScan |
24 { | 26 { |
32 enum PluginType { | 34 enum PluginType { |
33 VampPlugin, | 35 VampPlugin, |
34 LADSPAPlugin, | 36 LADSPAPlugin, |
35 DSSIPlugin | 37 DSSIPlugin |
36 }; | 38 }; |
37 QStringList getCandidateLibrariesFor(PluginType) const; | 39 struct Candidate { |
40 QString libraryPath; | |
41 QString helperTag; | |
42 }; | |
43 QList<Candidate> getCandidateLibrariesFor(PluginType) const; | |
38 | 44 |
39 QString getStartupFailureReport() const; | 45 QString getStartupFailureReport() const; |
40 | 46 |
41 private: | 47 private: |
42 PluginScan(); | 48 PluginScan(); |
43 ~PluginScan(); | 49 ~PluginScan(); |
44 | 50 |
45 void clear(); | 51 void clear(); |
52 | |
53 mutable QMutex m_mutex; // while scanning; definitely can't multi-thread this | |
46 | 54 |
47 std::vector<KnownPlugins *> m_kp; | 55 std::map<QString, KnownPlugins *> m_kp; // tag -> KnownPlugins client |
48 bool m_succeeded; | 56 bool m_succeeded; |
49 | 57 |
50 class Logger; | 58 class Logger; |
51 Logger *m_logger; | 59 Logger *m_logger; |
52 }; | 60 }; |