summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
Diffstat (limited to 'ingen')
-rw-r--r--ingen/Resource.hpp9
-rw-r--r--ingen/client/ObjectModel.hpp2
2 files changed, 11 insertions, 0 deletions
diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp
index 756419d8..3d6d6cd2 100644
--- a/ingen/Resource.hpp
+++ b/ingen/Resource.hpp
@@ -152,6 +152,15 @@ public:
*/
virtual void on_property(const Raul::URI& uri, const Atom& value) {}
+ /** Hook called whenever a property value is removed.
+ *
+ * If all values of a given key are removed, then value will be the wildcard.
+ *
+ * This can be used by derived classes to implement special behaviour for
+ * particular properties (e.g. ingen:value for ports).
+ */
+ virtual void on_property_removed(const Raul::URI& uri, const Atom& value) {}
+
/** Get the ingen type from a set of Properties.
*
* If some coherent ingen type is found, true is returned and the appropriate
diff --git a/ingen/client/ObjectModel.hpp b/ingen/client/ObjectModel.hpp
index 66c3db7c..6c582812 100644
--- a/ingen/client/ObjectModel.hpp
+++ b/ingen/client/ObjectModel.hpp
@@ -62,6 +62,7 @@ public:
const Atom& get_property(const Raul::URI& key) const;
void on_property(const Raul::URI& uri, const Atom& value);
+ void on_property_removed(const Raul::URI& uri, const Atom& value);
const Raul::Path& path() const { return _path; }
const Raul::Symbol& symbol() const { return _symbol; }
@@ -74,6 +75,7 @@ public:
INGEN_SIGNAL(new_child, void, SPtr<ObjectModel>);
INGEN_SIGNAL(removed_child, void, SPtr<ObjectModel>);
INGEN_SIGNAL(property, void, const Raul::URI&, const Atom&);
+ INGEN_SIGNAL(property_removed, void, const Raul::URI&, const Atom&);
INGEN_SIGNAL(destroyed, void);
INGEN_SIGNAL(moved, void);