r274@gandalf: fugalh | 2006-08-07 19:53:48 -0600
[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 #include <ardour/audio_unit.h>
11
12 namespace ARDOUR {
13
14 class Plugin;
15 class Session;
16 class AudioEngine;
17
18 class PluginManager {
19   public:
20         PluginManager ();
21         ~PluginManager ();
22
23         ARDOUR::PluginInfoList &vst_plugin_info () { return _vst_plugin_info; }
24         ARDOUR::PluginInfoList &ladspa_plugin_info () { return _ladspa_plugin_info; }
25
26         void refresh ();
27
28         int add_ladspa_directory (std::string dirpath);
29         int add_vst_directory (std::string dirpath);
30
31         static PluginManager* the_manager() { return _manager; }
32
33   private:
34         ARDOUR::PluginInfoList _vst_plugin_info;
35         ARDOUR::PluginInfoList _ladspa_plugin_info;
36         std::map<uint32_t, std::string> rdf_type;
37
38         std::string ladspa_path;
39         std::string vst_path;
40
41         void ladspa_refresh ();
42         void vst_refresh ();
43
44         void add_lrdf_data (const std::string &path);
45         void add_ladspa_presets ();
46         void add_vst_presets ();
47         void add_presets (std::string domain);
48
49         int vst_discover_from_path (std::string path);
50         int vst_discover (std::string path);
51
52         int ladspa_discover_from_path (std::string path);
53         int ladspa_discover (std::string path);
54
55         std::string get_ladspa_category (uint32_t id);
56
57         static PluginManager* _manager; // singleton
58 };
59
60 } /* namespace ARDOUR */
61
62 #endif /* __ardour_plugin_manager_h__ */
63