Tag_reset() should be FromPlug, not FromGui.
[ardour.git] / libs / ardour / ardour / plugin_manager.h
index 532f6b205df9c631cbe98780c83d87774c7bab3d..a66e2d0674e38863152daa5968bc438290140d4b 100644 (file)
@@ -85,19 +85,32 @@ public:
        void load_tags ();
        void save_tags ();
 
-       void set_tags (ARDOUR::PluginType type, std::string unique_id, std::string tags, bool factory, bool force = false);
+       enum TagType {
+               FromPlug,           //tag info is being set from plugin metadata
+               FromFactoryFile,    // ... from the factory metadata file
+               FromUserFile,       // ... from the user's config data
+               FromGui             // ... from the UI, in realtime: will emit a signal so ui can show "sanitized" string as it is generated
+       };
+       void set_tags (ARDOUR::PluginType type, std::string unique_id, std::string tags, std::string name, TagType tagtype);
        void reset_tags (PluginInfoPtr const&);
        std::string get_tags_as_string (PluginInfoPtr const&) const;
        std::vector<std::string> get_tags (PluginInfoPtr const&) const;
-       std::vector<std::string> get_all_tags (bool favorites_only) const;
 
-       /** plugins were added to or removed from one of the PluginInfoLists */
+       enum TagFilter {
+               All,
+               OnlyFavorites,
+               NoHidden
+       };
+       std::vector<std::string> get_all_tags (enum TagFilter) const;
+
+       /** plugins were added to or removed from one of the PluginInfoLists, OR the user has made changes to the status/tags */
        PBD::Signal0<void> PluginListChanged;
 
-       /** Plugin Hidden/Favorite status changed */
-       PBD::Signal3<void, ARDOUR::PluginType, std::string, PluginStatusType> PluginStatusesChanged; //PluginType t, string id, string tag
+       /** A single plugin's Hidden/Favorite status changed */
+       PBD::Signal3<void, ARDOUR::PluginType, std::string, PluginStatusType> PluginStatusChanged; //PluginType t, string id, string tag
 
-       PBD::Signal3<void, ARDOUR::PluginType, std::string, std::string> PluginTagsChanged; //PluginType t, string id, string tag
+       /** A single plugin's Tags status changed */
+       PBD::Signal3<void, ARDOUR::PluginType, std::string, std::string> PluginTagChanged; //PluginType t, string id, string tag
 
 private:
 
@@ -105,10 +118,11 @@ private:
            ARDOUR::PluginType type;
            std::string unique_id;
            std::string tags;
-                       bool user_set;
+           std::string name;
+               TagType tagtype;
 
-           PluginTag (ARDOUR::PluginType t, std::string id, std::string s, bool user_set)
-           : type (t), unique_id (id), tags (s), user_set (user_set) {}
+           PluginTag (ARDOUR::PluginType t, std::string id, std::string tag, std::string n, TagType tt)
+           : type (t), unique_id (id), tags (tag), name(n), tagtype (tt) {}
 
            bool operator== (PluginTag const& other) const {
                    return other.type == type && other.unique_id == unique_id;