item_updater: Added erase method

Implements Object.Delete, so item_updater deletes
ReadWrite, ReadOnly partitions, and removes
Version, and Activation from maps.

Resolves openbmc/openbmc#1550

Change-Id: If6d08bc7d380d043c28a26570e4698201cd7f5b0
Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
diff --git a/item_updater.hpp b/item_updater.hpp
index e4fdd69..5b2a71b 100644
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -66,6 +66,14 @@
      */
     void processBMCImage();
 
+    /**
+     * @brief Erase specified entry d-bus object
+     *        if Action property is not set to Active
+     *
+     * @param[in] entryId - unique identifier of the entry
+     */
+    void erase(std::string entryId);
+
     private:
         /** @brief Callback function for Software.Version match.
          *  @details Creates an Activation dbus object.
@@ -105,6 +113,20 @@
         /** @brief sdbusplus signal match for Software.Version */
         sdbusplus::bus::match_t versionMatch;
 
+        /** @brief Clears read only partition for
+          * given Activation dbus object.
+          *
+          * @param[in]  versionId - The version id.
+          */
+        void removeReadOnlyPartition(std::string versionId);
+
+        /** @brief Clears read write partition for
+          * given Activation dbus object.
+          *
+          * @param[in]  versionId - The version id.
+          */
+        void removeReadWritePartition(std::string versionId);
+
 };