Add system dump entry.
Add support for system dump entry by implementing
sdbusplus::xyz::openbmc_project::Dump::Entry::server::System
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I9d16dab0e383651c906a21a2facefdb6482df12f
diff --git a/dump_entry.hpp b/dump_entry.hpp
index 1f5aab8..a8273d0 100644
--- a/dump_entry.hpp
+++ b/dump_entry.hpp
@@ -26,7 +26,7 @@
class Manager;
/** @class Entry
- * @brief OpenBMC Dump Entry implementation.
+ * @brief Base Dump Entry implementation.
* @details A concrete implementation for the
* xyz.openbmc_project.Dump.Entry DBus API
*/
diff --git a/system_dump_entry.hpp b/system_dump_entry.hpp
new file mode 100644
index 0000000..f2e4545
--- /dev/null
+++ b/system_dump_entry.hpp
@@ -0,0 +1,63 @@
+#pragma once
+
+#include "dump_entry.hpp"
+#include "xyz/openbmc_project/Dump/Entry/System/server.hpp"
+
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server/object.hpp>
+
+namespace phosphor
+{
+namespace dump
+{
+namespace system
+{
+template <typename T>
+using ServerObject = typename sdbusplus::server::object::object<T>;
+
+using EntryIfaces = sdbusplus::server::object::object<
+ sdbusplus::xyz::openbmc_project::Dump::Entry::server::System>;
+
+namespace fs = std::experimental::filesystem;
+
+class Manager;
+
+/** @class Entry
+ * @brief System Dump Entry implementation.
+ * @details A concrete implementation for the
+ * xyz.openbmc_project.Dump.Entry DBus API
+ */
+class Entry : virtual public EntryIfaces, virtual public phosphor::dump::Entry
+{
+ public:
+ Entry() = delete;
+ Entry(const Entry&) = delete;
+ Entry& operator=(const Entry&) = delete;
+ Entry(Entry&&) = delete;
+ Entry& operator=(Entry&&) = delete;
+ ~Entry() = default;
+
+ /** @brief Constructor for the Dump Entry Object
+ * @param[in] bus - Bus to attach to.
+ * @param[in] objPath - Object path to attach to
+ * @param[in] dumpId - Dump id.
+ * @param[in] timeStamp - Dump creation timestamp
+ * since the epoch.
+ * @param[in] dumpSize - Dump size in bytes.
+ * @param[in] sourceId - DumpId provided by the source..
+ * @param[in] parent - The dump entry's parent.
+ */
+ Entry(sdbusplus::bus::bus& bus, const std::string& objPath, uint32_t dumpId,
+ uint64_t timeStamp, uint64_t dumpSize, const uint32_t sourceId,
+ phosphor::dump::Manager& parent) :
+ EntryIfaces(bus, objPath.c_str(), true),
+ phosphor::dump::Entry(bus, objPath.c_str(), dumpId, timeStamp, dumpSize,
+ parent)
+ {
+ sourceDumpId(sourceId);
+ };
+};
+
+} // namespace system
+} // namespace dump
+} // namespace phosphor