Merged with trunk R1612.
[ardour.git] / libs / ardour / ardour / plugin_manager.h
1 #ifndef __ardour_plugin_manager_h__
2 #define __ardour_plugin_manager_h__
3
4 #include <list>
5 #include <map>
6 #include <string>
7
8 #include <ardour/types.h>
9 #include <ardour/plugin.h>
10
11 namespace ARDOUR {
12
13 class Plugin;
14 class Session;
15 class AudioEngine;
16
17 class PluginManager {
18   public:
19         PluginManager ();
20         ~PluginManager ();
21
22         ARDOUR::PluginInfoList &vst_plugin_info () { return _vst_plugin_info; }
23         ARDOUR::PluginInfoList &ladspa_plugin_info () { return _ladspa_plugin_info; }
24
25         void refresh ();
26
27         int add_ladspa_directory (std::string dirpath);
28         int add_vst_directory (std::string dirpath);
29
30         static PluginManager* the_manager() { return _manager; }
31
32   private:
33         ARDOUR::PluginInfoList _vst_plugin_info;
34         ARDOUR::PluginInfoList _ladspa_plugin_info;
35         std::map<uint32_t, std::string> rdf_type;
36
37         std::string ladspa_path;
38         std::string vst_path;
39
40         void ladspa_refresh ();
41         void vst_refresh ();
42
43         void add_lrdf_data (const std::string &path);
44         void add_ladspa_presets ();
45         void add_vst_presets ();
46         void add_presets (std::string domain);
47
48         int vst_discover_from_path (std::string path);
49         int vst_discover (std::string path);
50
51         int ladspa_discover_from_path (std::string path);
52         int ladspa_discover (std::string path);
53
54         std::string get_ladspa_category (uint32_t id);
55
56         static PluginManager* _manager; // singleton
57 };
58
59 } /* namespace ARDOUR */
60
61 #endif /* __ardour_plugin_manager_h__ */
62