Clear inventory data on removal

In case any FRU is removed from the system, the data w.r.t the
FRU, as it is persisted continues to stay on DBus. This sometimes
can be mis-leading as data is displayed for FRU which is actually
not present in the system.

The commit, in case the FRU is removed via delete FRU procedure,
clears all the VPD related data for the FRU and update its
present and functional status.

Test:
Delete any FRU using "deleteFRUVPD" exposed via VPD-Manager,
check the DBus, data related to VPD should be cleared.

Change-Id: Ic61e9a9934333ef9558ac4294a1935575042cb11
Signed-off-by: Anupama B R <anupama.b.r1@ibm.com>
diff --git a/ibm_vpd_utils.hpp b/ibm_vpd_utils.hpp
index 5dd413e..b441b76 100644
--- a/ibm_vpd_utils.hpp
+++ b/ibm_vpd_utils.hpp
@@ -87,6 +87,17 @@
     getObjectSubtreeForInterfaces(const std::string& root, const int32_t depth,
                                   const std::vector<std::string>& interfaces);
 
+/**
+ * @brief API to call GetObject API of mapper.
+ *
+ * @param[in] objectPath - inventory path.
+ * @param[in] interfaces - List of interfaces.
+ *
+ * @return - response of the API call.
+ */
+MapperGetObjectResponse getObject(const std::string& objectPath,
+                                  const std::vector<std::string>& interfaces);
+
 } // namespace inventory
 
 /**@brief This API reads 2 Bytes of data and swap the read data
@@ -520,5 +531,13 @@
  */
 std::string getDbusNameForThisKw(const std::string& keyword);
 
+/**
+ * @brief API to remove VPD data from Dbus on removal of FRU.
+ *
+ * @param[in] objPath - Inventory path of the FRU.
+ * @param[out] interfacesPropMap - Map of interface, property and value.
+ */
+void clearVpdOnRemoval(const std::string& objPath,
+                       inventory::InterfaceMap& interfacesPropMap);
 } // namespace vpd
 } // namespace openpower