1 #pragma once 2 3 #include "dump_entry.hpp" 4 5 #include <sdbusplus/bus.hpp> 6 #include <sdbusplus/server/object.hpp> 7 #include <xyz/openbmc_project/Object/Delete/server.hpp> 8 #include <xyz/openbmc_project/Time/EpochTime/server.hpp> 9 10 #include <filesystem> 11 12 namespace phosphor 13 { 14 namespace dump 15 { 16 namespace faultlog 17 { 18 template <typename T> 19 using ServerObject = typename sdbusplus::server::object_t<T>; 20 21 /** @class Entry 22 * @brief OpenBMC Fault Log Dump Entry implementation. 23 */ 24 class Entry : virtual public phosphor::dump::Entry 25 { 26 public: 27 Entry() = delete; 28 Entry(const Entry&) = delete; 29 Entry& operator=(const Entry&) = delete; 30 Entry(Entry&&) = delete; 31 Entry& operator=(Entry&&) = delete; 32 ~Entry() = default; 33 34 /** @brief Constructor for the Dump Entry Object 35 * @param[in] bus - Bus to attach to. 36 * @param[in] objPath - Object path to attach to 37 * @param[in] dumpId - Dump id. 38 * @param[in] timeStamp - Dump creation timestamp 39 * in microseconds since the epoch. 40 * @param[in] fileSize - Dump file size in bytes. 41 * @param[in] file - Full path of dump file. 42 * @param[in] status - status of the dump. 43 * @param[in] originatorId - Id of the originator of the dump 44 * @param[in] originatorType - Originator type 45 * @param[in] parent - The dump entry's parent. 46 */ 47 Entry(sdbusplus::bus_t& bus, const std::string& objPath, uint32_t dumpId, 48 uint64_t timeStamp, uint64_t fileSize, 49 const std::filesystem::path& file, 50 phosphor::dump::OperationStatus status, std::string originatorId, 51 originatorTypes originatorType, phosphor::dump::Manager& parent) : 52 phosphor::dump::Entry(bus, objPath.c_str(), dumpId, timeStamp, fileSize, 53 file, status, originatorId, originatorType, 54 parent) 55 {} 56 57 /** @brief Delete this d-bus object. 58 */ 59 void delete_() override; 60 }; 61 62 } // namespace faultlog 63 } // namespace dump 64 } // namespace phosphor 65