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 Manager; 22 23 /** @class Entry 24 * @brief OpenBMC Fault Log Dump Entry implementation. 25 */ 26 class Entry : virtual public phosphor::dump::Entry 27 { 28 public: 29 Entry() = delete; 30 Entry(const Entry&) = delete; 31 Entry& operator=(const Entry&) = delete; 32 Entry(Entry&&) = delete; 33 Entry& operator=(Entry&&) = delete; 34 ~Entry() = default; 35 36 /** @brief Constructor for the Dump Entry Object 37 * @param[in] bus - Bus to attach to. 38 * @param[in] objPath - Object path to attach to 39 * @param[in] dumpId - Dump id. 40 * @param[in] timeStamp - Dump creation timestamp 41 * in microseconds since the epoch. 42 * @param[in] fileSize - Dump file size in bytes. 43 * @param[in] file - Full path of dump file. 44 * @param[in] status - status of the dump. 45 * @param[in] originatorId - Id of the originator of the dump 46 * @param[in] originatorType - Originator type 47 * @param[in] parent - The dump entry's parent. 48 */ 49 Entry(sdbusplus::bus_t& bus, const std::string& objPath, uint32_t dumpId, 50 uint64_t timeStamp, uint64_t fileSize, 51 const std::filesystem::path& file, 52 phosphor::dump::OperationStatus status, std::string originatorId, 53 originatorTypes originatorType, phosphor::dump::Manager& parent) : 54 phosphor::dump::Entry(bus, objPath.c_str(), dumpId, timeStamp, fileSize, 55 status, originatorId, originatorType, parent), 56 file(file) 57 {} 58 59 /** @brief Delete this d-bus object. 60 */ 61 void delete_() override; 62 63 private: 64 /** @Dump file path */ 65 std::filesystem::path file; 66 }; 67 68 } // namespace faultlog 69 } // namespace dump 70 } // namespace phosphor 71