item_updater : Implementing Object.Delete for version
Change-Id: If962dec1da2d2fe925374bb37f89ed23f04c5ab6
Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
diff --git a/item_updater.hpp b/item_updater.hpp
index 213b456..934ec3c 100755
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -65,6 +65,14 @@
*/
void processPNORImage();
+ /** @brief Deletes version
+ *
+ * @param[in] entryId - Id of the version to delete
+ *
+ * @return None
+ */
+ void erase(std::string entryId);
+
private:
/** @brief Callback function for Software.Version match.
* @details Creates an Activation dbus object.
@@ -96,6 +104,23 @@
/** @brief sdbusplus signal match for Software.Version */
sdbusplus::bus::match_t versionMatch;
+ /** @brief Clears read only PNOR partition for
+ * given Activation dbus object
+ *
+ * @param[in] versionId - The id of the ro partition to remove.
+ */
+ void removeReadOnlyPartition(std::string versionId);
+
+ /** @brief Clears read write PNOR partition for
+ * given Activation dbus object
+ *
+ * @param[in] versionId - The id of the rw partition to remove.
+ */
+ void removeReadWritePartition(std::string versionId);
+
+ /** @brief Clears preserved PNOR partition */
+ void removePreservedPartition();
+
/** @brief Host factory reset - clears PNOR partitions for each
* Activation dbus object */
void reset() override;