Fixes to bundle manager to make it vaguely usable.
[ardour.git] / libs / ardour / ardour / plugin_manager.h
index 892c8bd75ac7572b1de095ae5f13b5d792908841..858decd0e5faf819e931b92b710f3b9d43ac16ee 100644 (file)
@@ -23,6 +23,7 @@
 #include <list>
 #include <map>
 #include <string>
+#include <set>
 
 #include <ardour/types.h>
 #include <ardour/plugin.h>
@@ -54,7 +55,31 @@ class PluginManager {
 
        static PluginManager* the_manager() { return _manager; }
 
+       void load_favorites ();
+       void save_favorites ();
+       void add_favorite (ARDOUR::PluginType type, std::string unique_id);
+       void remove_favorite (ARDOUR::PluginType type, std::string unique_id);
+       bool is_a_favorite_plugin (const PluginInfoPtr&);
+       
   private:
+       struct FavoritePlugin {
+           ARDOUR::PluginType type;
+           std::string unique_id;
+
+           FavoritePlugin (ARDOUR::PluginType t, std::string id) 
+           : type (t), unique_id (id) {}
+           
+           bool operator==(const FavoritePlugin& other) const {
+                   return other.type == type && other.unique_id == unique_id;
+           }
+
+           bool operator<(const FavoritePlugin& other) const {
+                   return other.type < type || other.unique_id < unique_id;
+           }
+       };
+       typedef std::set<FavoritePlugin> FavoritePluginList;
+       FavoritePluginList favorites;
+
        ARDOUR::PluginInfoList _vst_plugin_info;
        ARDOUR::PluginInfoList _ladspa_plugin_info;
        ARDOUR::PluginInfoList _lv2_plugin_info;