Revert "Remove the interfaces removed handler"
Listening for the interfaces removed signal is required so
that ibm-logging can remove its objects when phosphor-logging
prunes its entries after hitting capacity.
Previously, ibm-logging depended on someone calling Delete or
DeleteAll to remove objects.
This reverts commit 19ff79fafee4bdf695ae71522715e16bedb1349a.
Tested: Delete xyz.openbmc_project.Logging entries and verify
these logs get deleted too.
Change-Id: Ib172100cc455563fc026330182d46b96f97679b5
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/manager.hpp b/manager.hpp
index d09d103..0320b0c 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -66,6 +66,16 @@
void interfaceAdded(sdbusplus::message::message& msg);
/**
+ * The callback for an interfaces removed signal
+ *
+ * Removes the IBM interfaces for the log entry
+ * that was just removed.
+ *
+ * @param[in] msg - the sdbusplus message
+ */
+ void interfaceRemoved(sdbusplus::message::message& msg);
+
+ /**
* Creates the IBM interfaces for all existing error log
* entries.
*/
@@ -135,6 +145,11 @@
*/
sdbusplus::bus::match_t addMatch;
+ /**
+ * The match object for interfacesRemoved
+ */
+ sdbusplus::bus::match_t removeMatch;
+
using EntryID = uint32_t;
using InterfaceMap = std::map<InterfaceType, std::experimental::any>;
using EntryMap = std::map<EntryID, InterfaceMap>;