Refactor BMC dump entry to accomodate more locally stored dumps

Split the BMC dump entry to a base class bmc_stored::Manager
and bmc::Manager. All the functions common to the all BMC
stored dumps are kept in the new base class

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: Ibe2e2a7bf6f92bac1aec174cfe998b6363a6c9f8
diff --git a/bmc_dump_entry.hpp b/bmc_dump_entry.hpp
index eb140e8..82312e0 100644
--- a/bmc_dump_entry.hpp
+++ b/bmc_dump_entry.hpp
@@ -1,11 +1,7 @@
 #pragma once
 
-#include "dump_entry.hpp"
-#include "xyz/openbmc_project/Common/FilePath/server.hpp"
+#include "bmcstored_dump_entry.hpp"
 #include "xyz/openbmc_project/Dump/Entry/BMC/server.hpp"
-#include "xyz/openbmc_project/Dump/Entry/server.hpp"
-#include "xyz/openbmc_project/Object/Delete/server.hpp"
-#include "xyz/openbmc_project/Time/EpochTime/server.hpp"
 
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
@@ -22,8 +18,7 @@
 using ServerObject = typename sdbusplus::server::object_t<T>;
 
 using EntryIfaces = sdbusplus::server::object_t<
-    sdbusplus::xyz::openbmc_project::Dump::Entry::server::BMC,
-    sdbusplus::xyz::openbmc_project::Common::server::FilePath>;
+    sdbusplus::xyz::openbmc_project::Dump::Entry::server::BMC>;
 
 using originatorTypes = sdbusplus::xyz::openbmc_project::Common::server::
     OriginatedBy::OriginatorTypes;
@@ -35,7 +30,9 @@
  *  @details A concrete implementation for the
  *  xyz.openbmc_project.Dump.Entry DBus API
  */
-class Entry : virtual public EntryIfaces, virtual public phosphor::dump::Entry
+class Entry :
+    virtual public EntryIfaces,
+    virtual public phosphor::dump::bmc_stored::Entry
 {
   public:
     Entry() = delete;
@@ -64,42 +61,13 @@
           phosphor::dump::OperationStatus status, std::string originatorId,
           originatorTypes originatorType, phosphor::dump::Manager& parent) :
         EntryIfaces(bus, objPath.c_str(), EntryIfaces::action::defer_emit),
-        phosphor::dump::Entry(bus, objPath.c_str(), dumpId, timeStamp, fileSize,
-                              status, originatorId, originatorType, parent)
+        phosphor::dump::bmc_stored::Entry(bus, objPath.c_str(), dumpId,
+                                          timeStamp, fileSize, file, status,
+                                          originatorId, originatorType, parent)
     {
-        path(file);
         // Emit deferred signal.
         this->phosphor::dump::bmc::EntryIfaces::emit_object_added();
     }
-
-    /** @brief Delete this d-bus object.
-     */
-    void delete_() override;
-
-    /** @brief Method to initiate the offload of dump
-     *  @param[in] uri - URI to offload dump
-     */
-    void initiateOffload(std::string uri) override;
-
-    /** @brief Method to update an existing dump entry, once the dump creation
-     *  is completed this function will be used to update the entry which got
-     *  created during the dump request.
-     *  @param[in] timeStamp - Dump creation timestamp
-     *  @param[in] fileSize - Dump file size in bytes.
-     *  @param[in] file - Name of dump file.
-     */
-    void update(uint64_t timeStamp, uint64_t fileSize,
-                const std::filesystem::path& filePath)
-    {
-        elapsed(timeStamp);
-        size(fileSize);
-        // TODO: Handled dump failed case with #ibm-openbmc/2808
-        status(OperationStatus::Completed);
-        path(filePath);
-        // TODO: serialization of this property will be handled with
-        // #ibm-openbmc/2597
-        completedTime(timeStamp);
-    }
 };
 
 } // namespace bmc