cleanup the code related to emit_interface_added

sdbusplus now supports action::emit_interface_added() when an object is
constructed, so the code that manually invokes emit_interface_added()
could be cleaned up and use the above action instead.

Tested:Tested on fp5280g2,and pnor code update works fine.

Signed-off-by: Albert Zhang <zhanghaodi@inspur.com>
Change-Id: I5a68090d7e1bbd31c0df351d553ef6fa6d63e277
diff --git a/version.hpp b/version.hpp
index 13f772f..85dccda 100644
--- a/version.hpp
+++ b/version.hpp
@@ -45,17 +45,9 @@
      *  @param[in] parent - Parent object.
      */
     Delete(sdbusplus::bus::bus& bus, const std::string& path, Version& parent) :
-        DeleteInherit(bus, path.c_str(), true), parent(parent), bus(bus),
-        path(path)
+        DeleteInherit(bus, path.c_str(), action::emit_interface_added),
+        parent(parent)
     {
-        std::vector<std::string> interfaces({interface});
-        bus.emit_interfaces_added(path.c_str(), interfaces);
-    }
-
-    ~Delete()
-    {
-        std::vector<std::string> interfaces({interface});
-        bus.emit_interfaces_removed(path.c_str(), interfaces);
     }
 
     /**
@@ -68,11 +60,6 @@
   private:
     /** @brief Parent Object. */
     Version& parent;
-
-    // TODO Remove once openbmc/openbmc#1975 is resolved
-    static constexpr auto interface = "xyz.openbmc_project.Object.Delete";
-    sdbusplus::bus::bus& bus;
-    std::string path;
 };
 
 /** @class Version