xref: /openbmc/phosphor-debug-collector/dump_entry.hpp (revision 224882b0a744bbee8b1a8229f54a854cac4aea30)
1 #pragma once
2 
3 #include <sdbusplus/server/object.hpp>
4 #include "xyz/openbmc_project/Dump/Entry/server.hpp"
5 #include "xyz/openbmc_project/Object/Delete/server.hpp"
6 #include "xyz/openbmc_project/Time/EpochTime/server.hpp"
7 
8 namespace phosphor
9 {
10 namespace dump
11 {
12 
13 template <typename T>
14 using ServerObject = typename sdbusplus::server::object::object<T>;
15 
16 using EntryIfaces = sdbusplus::server::object::object<
17                     sdbusplus::xyz::openbmc_project::Dump::server::Entry,
18                     sdbusplus::xyz::openbmc_project::Object::server::Delete,
19                     sdbusplus::xyz::openbmc_project::Time::server::EpochTime>;
20 
21 /** @class Entry
22  *  @brief OpenBMC Dump Entry implementation.
23  *  @details A concrete implementation for the
24  *  xyz.openbmc_project.Dump.Entry DBus API
25  */
26 class Entry : public EntryIfaces
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         virtual ~Entry() = default;
35 
36         /** @brief Constructor for the Dump Entry Object
37          *  @param[in] bus - Bus to attach to.
38          *  @param[in] obj - Object path to attach to
39          */
40         Entry(sdbusplus::bus::bus& bus, const char* obj);
41 
42         /** @brief Delete this d-bus object.
43          */
44         void delete_() override ;
45 
46 };
47 
48 } // namespace dump
49 } // namespace phosphor
50