control: Add interfacesRemoved signal support
Subscribe to and handle interfacesRemoved signals to trigger event
actions.
Change-Id: I270dc02bfa78c1801c545712710b27a3d2ba2180
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index 294ba7d..88a2b1f 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -274,6 +274,22 @@
}
/**
+ * @brief Remove an object's interface
+ *
+ * @param[in] path - Dbus object's path
+ * @param[in] intf - Dbus object's interface
+ */
+ inline void removeInterface(const std::string& path,
+ const std::string& intf)
+ {
+ auto itPath = _objects.find(path);
+ if (itPath != std::end(_objects))
+ {
+ _objects[path].erase(intf);
+ }
+ }
+
+ /**
* @brief Get the object's property value as a variant
*
* @param[in] path - Path of the object containing the property