comparison plugin/PluginScan.h @ 1249:d45a16c232bd piper

Align Sonic Annotator with the new Piper-ified subrepos (bearing in mind we want neither Piper nor the plugin load checker in Sonic Annotator itself)
author Chris Cannam
date Fri, 04 Nov 2016 14:16:01 +0000
parents 75aefcc9f07d
children 48e9f538e6e9
comparison
equal deleted inserted replaced
1248:58dd6a6fe414 1249:d45a16c232bd
25 class PluginScan 25 class PluginScan
26 { 26 {
27 public: 27 public:
28 static PluginScan *getInstance(); 28 static PluginScan *getInstance();
29 29
30 /**
31 * Carry out startup scan of available plugins. Do not call
32 * getCandidateLibrariesFor() unless this has been called and
33 * scanSucceeded() is returning true.
34 */
30 void scan(); 35 void scan();
31 36
37 /**
38 * Return true if scan() completed successfully. If the scan
39 * failed, consider using the normal plugin path to load any
40 * available plugins (as if they had all been found to be
41 * loadable) rather than rejecting all of them -- i.e. consider
42 * falling back on the behaviour of code from before the scan
43 * logic was added.
44 */
32 bool scanSucceeded() const; 45 bool scanSucceeded() const;
33 46
34 enum PluginType { 47 enum PluginType {
35 VampPlugin, 48 VampPlugin,
36 LADSPAPlugin, 49 LADSPAPlugin,
37 DSSIPlugin 50 DSSIPlugin
38 }; 51 };
39 struct Candidate { 52 struct Candidate {
40 QString libraryPath; 53 QString libraryPath; // full path, not just soname
41 QString helperTag; 54 QString helperTag; // identifies the helper that found it
55 // (see HelperExecPath)
42 }; 56 };
57
58 /**
59 * Return the candidate plugin libraries of the given type that
60 * were found by helpers during the startup scan.
61 *
62 * This could return an empty list for two reasons: the scan
63 * succeeded but no libraries were found; or the scan failed. Call
64 * scanSucceeded() to distinguish between them.
65 */
43 QList<Candidate> getCandidateLibrariesFor(PluginType) const; 66 QList<Candidate> getCandidateLibrariesFor(PluginType) const;
44 67
45 QString getStartupFailureReport() const; 68 QString getStartupFailureReport() const;
46 69
47 private: 70 private: