Reading of MIDI CC from MIDI regions (MidiModel). UI still needs work though..
[ardour.git] / libs / ardour / ardour / plugin_manager.h
1 /*
2     Copyright (C) 2000-2007 Paul Davis 
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef __ardour_plugin_manager_h__
21 #define __ardour_plugin_manager_h__
22
23 #include <list>
24 #include <map>
25 #include <string>
26
27 #include <ardour/types.h>
28 #include <ardour/plugin.h>
29
30 namespace ARDOUR {
31
32 class Plugin;
33 class Session;
34 class AudioEngine;
35
36 class PluginManager {
37   public:
38         PluginManager ();
39         ~PluginManager ();
40
41         ARDOUR::PluginInfoList &vst_plugin_info () { return _vst_plugin_info; }
42         ARDOUR::PluginInfoList &ladspa_plugin_info () { return _ladspa_plugin_info; }
43
44         void refresh ();
45
46         int add_ladspa_directory (std::string dirpath);
47         int add_vst_directory (std::string dirpath);
48
49         static PluginManager* the_manager() { return _manager; }
50
51   private:
52         ARDOUR::PluginInfoList _vst_plugin_info;
53         ARDOUR::PluginInfoList _ladspa_plugin_info;
54         std::map<uint32_t, std::string> rdf_type;
55
56         std::string ladspa_path;
57         std::string vst_path;
58
59         void ladspa_refresh ();
60         void vst_refresh ();
61
62         void add_lrdf_data (const std::string &path);
63         void add_ladspa_presets ();
64         void add_vst_presets ();
65         void add_presets (std::string domain);
66
67         int vst_discover_from_path (std::string path);
68         int vst_discover (std::string path);
69
70         int ladspa_discover_from_path (std::string path);
71         int ladspa_discover (std::string path);
72
73         std::string get_ladspa_category (uint32_t id);
74
75         static PluginManager* _manager; // singleton
76 };
77
78 } /* namespace ARDOUR */
79
80 #endif /* __ardour_plugin_manager_h__ */
81