1919f71c6SClaire Weinan #pragma once 2919f71c6SClaire Weinan 3919f71c6SClaire Weinan #include "dump_entry.hpp" 4919f71c6SClaire Weinan 5919f71c6SClaire Weinan #include <sdbusplus/bus.hpp> 6919f71c6SClaire Weinan #include <sdbusplus/server/object.hpp> 7919f71c6SClaire Weinan #include <xyz/openbmc_project/Object/Delete/server.hpp> 8919f71c6SClaire Weinan #include <xyz/openbmc_project/Time/EpochTime/server.hpp> 9919f71c6SClaire Weinan 10919f71c6SClaire Weinan #include <filesystem> 11919f71c6SClaire Weinan 12919f71c6SClaire Weinan namespace phosphor 13919f71c6SClaire Weinan { 14919f71c6SClaire Weinan namespace dump 15919f71c6SClaire Weinan { 16919f71c6SClaire Weinan namespace faultlog 17919f71c6SClaire Weinan { 18919f71c6SClaire Weinan template <typename T> 199b18bf2dSPatrick Williams using ServerObject = typename sdbusplus::server::object_t<T>; 20919f71c6SClaire Weinan 21919f71c6SClaire Weinan /** @class Entry 22919f71c6SClaire Weinan * @brief OpenBMC Fault Log Dump Entry implementation. 23919f71c6SClaire Weinan */ 245fd768d6SEd Tanous class Entry : virtual public phosphor::dump::Entry 25919f71c6SClaire Weinan { 26919f71c6SClaire Weinan public: 27919f71c6SClaire Weinan Entry() = delete; 28919f71c6SClaire Weinan Entry(const Entry&) = delete; 29919f71c6SClaire Weinan Entry& operator=(const Entry&) = delete; 30919f71c6SClaire Weinan Entry(Entry&&) = delete; 31919f71c6SClaire Weinan Entry& operator=(Entry&&) = delete; 32919f71c6SClaire Weinan ~Entry() = default; 33919f71c6SClaire Weinan 34919f71c6SClaire Weinan /** @brief Constructor for the Dump Entry Object 35919f71c6SClaire Weinan * @param[in] bus - Bus to attach to. 36919f71c6SClaire Weinan * @param[in] objPath - Object path to attach to 37919f71c6SClaire Weinan * @param[in] dumpId - Dump id. 38919f71c6SClaire Weinan * @param[in] timeStamp - Dump creation timestamp 39919f71c6SClaire Weinan * in microseconds since the epoch. 40919f71c6SClaire Weinan * @param[in] fileSize - Dump file size in bytes. 41919f71c6SClaire Weinan * @param[in] file - Full path of dump file. 42919f71c6SClaire Weinan * @param[in] status - status of the dump. 4374a1f39cSAsmitha Karunanithi * @param[in] originatorId - Id of the originator of the dump 4474a1f39cSAsmitha Karunanithi * @param[in] originatorType - Originator type 45919f71c6SClaire Weinan * @param[in] parent - The dump entry's parent. 46919f71c6SClaire Weinan */ Entry(sdbusplus::bus_t & bus,const std::string & objPath,uint32_t dumpId,uint64_t timeStamp,uint64_t fileSize,const std::filesystem::path & file,phosphor::dump::OperationStatus status,std::string originatorId,originatorTypes originatorType,phosphor::dump::Manager & parent)479b18bf2dSPatrick Williams Entry(sdbusplus::bus_t& bus, const std::string& objPath, uint32_t dumpId, 48919f71c6SClaire Weinan uint64_t timeStamp, uint64_t fileSize, 49919f71c6SClaire Weinan const std::filesystem::path& file, 5074a1f39cSAsmitha Karunanithi phosphor::dump::OperationStatus status, std::string originatorId, 5174a1f39cSAsmitha Karunanithi originatorTypes originatorType, phosphor::dump::Manager& parent) : 52919f71c6SClaire Weinan phosphor::dump::Entry(bus, objPath.c_str(), dumpId, timeStamp, fileSize, 53*64f8da9eSDhruvaraj Subhashchandran file, status, originatorId, originatorType, 54*64f8da9eSDhruvaraj Subhashchandran parent) 555fd768d6SEd Tanous {} 56919f71c6SClaire Weinan 57919f71c6SClaire Weinan /** @brief Delete this d-bus object. 58919f71c6SClaire Weinan */ 59919f71c6SClaire Weinan void delete_() override; 60919f71c6SClaire Weinan }; 61919f71c6SClaire Weinan 62919f71c6SClaire Weinan } // namespace faultlog 63919f71c6SClaire Weinan } // namespace dump 64919f71c6SClaire Weinan } // namespace phosphor 65