Andrew Geissler | 6a0ef6f | 2020-04-06 15:06:31 -0500 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #include "xyz/openbmc_project/Logging/ErrorBlocksTransition/server.hpp" |
| 4 | |
| 5 | #include <sdbusplus/bus.hpp> |
| 6 | #include <sdbusplus/server/object.hpp> |
| 7 | |
| 8 | namespace phosphor |
| 9 | { |
| 10 | namespace logging |
| 11 | { |
| 12 | |
| 13 | using BlockIface = sdbusplus::server::object::object< |
| 14 | sdbusplus::xyz::openbmc_project::Logging::server::ErrorBlocksTransition>; |
| 15 | |
| 16 | /** @class Block |
| 17 | * @brief OpenBMC logging Block implementation. |
| 18 | * @details A concrete implementation for the |
| 19 | * xyz.openbmc_project.Logging.ErrorBlocksTransition DBus API |
| 20 | */ |
| 21 | class Block : public BlockIface |
| 22 | { |
| 23 | public: |
| 24 | Block() = delete; |
| 25 | Block(const Block&) = delete; |
| 26 | Block& operator=(const Block&) = delete; |
| 27 | Block(Block&&) = delete; |
| 28 | Block& operator=(Block&&) = delete; |
| 29 | virtual ~Block() = default; |
| 30 | |
| 31 | /** @brief Constructor to put object onto bus at a dbus path. |
| 32 | * @param[in] bus - Bus to attach to. |
| 33 | * @param[in] path - Path to attach at. |
| 34 | * @param[in] entryId - Distinct ID of the error. |
| 35 | */ |
| 36 | Block(sdbusplus::bus::bus& bus, const std::string& path, uint32_t entryId) : |
| 37 | BlockIface(bus, path.c_str()), entryId(entryId){}; |
| 38 | |
| 39 | uint32_t entryId; |
| 40 | |
| 41 | private: |
| 42 | }; |
| 43 | |
| 44 | } // namespace logging |
| 45 | } // namespace phosphor |