blob: bd3915c97306a7140d1a712bda5830cce51c3ac4 [file] [log] [blame]
Adriana Kobylak88d7cf82017-01-24 12:30:15 -06001#pragma once
2
3#include <sdbusplus/bus.hpp>
4#include <sdbusplus/server/object.hpp>
5#include "xyz/openbmc_project/Logging/Entry/server.hpp"
6
7namespace phosphor
8{
9namespace logging
10{
11namespace details
12{
13
14template <typename T>
15using ServerObject = typename sdbusplus::server::object::object<T>;
16
17using EntryIface =
18 sdbusplus::xyz::openbmc_project::Logging::server::Entry;
19
20} // namespace details
21
22/** @class Entry
23 * @brief OpenBMC logging entry implementation.
24 * @details A concrete implementation for the
25 * xyz.openbmc_project.Logging.Entry DBus API.
26 */
Adriana Kobylakdf995fa2017-01-08 15:14:02 -060027class Entry : public details::ServerObject<details::EntryIface>
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060028{
29 public:
30 Entry() = delete;
31 Entry(const Entry&) = delete;
32 Entry& operator=(const Entry&) = delete;
33 Entry(Entry&&) = delete;
34 Entry& operator=(Entry&&) = delete;
35 virtual ~Entry() = default;
36
Adriana Kobylakdf995fa2017-01-08 15:14:02 -060037 /** @brief Constructor to put object onto bus at a dbus path.
38 * @param[in] bus - Bus to attach to.
39 * @param[in] path - Path to attach at.
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060040 */
Adriana Kobylakdf995fa2017-01-08 15:14:02 -060041 Entry(sdbusplus::bus::bus& bus, const char* path) :
42 details::ServerObject<details::EntryIface>(bus, path) {};
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060043};
44
45} // namespace logging
46} // namespace phosphor