blob: a3b7efa11a4ed4913f7e00bc6d287dc0d929ebf2 [file] [log] [blame]
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -05001#pragma once
2
3#include <sdbusplus/bus.hpp>
4#include <xyz/openbmc_project/Control/Host/server.hpp>
5
6namespace phosphor
7{
8namespace host
9{
10
11/** @class Host
12 * @brief OpenBMC control host interface implementation.
13 * @details A concrete implementation for xyz.openbmc_project.Control.Host
14 * DBus API.
15 */
16class Host : public sdbusplus::server::object::object<
17 sdbusplus::xyz::openbmc_project::Control::server::Host>
18{
19 public:
20 /** @brief Constructs Host Control Interface
21 *
22 * @param[in] bus - The Dbus bus object
23 * @param[in] objPath - The Dbus object path
24 */
25 Host(sdbusplus::bus::bus& bus,
26 const char* objPath) :
27 sdbusplus::server::object::object<
28 sdbusplus::xyz::openbmc_project::Control::server::Host>(
Andrew Geissler1b9d4e52017-03-21 15:04:05 -050029 bus, objPath),
30 bus(bus)
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -050031 {}
Andrew Geissler62817fa92017-03-20 14:20:49 -050032
33 /** @brief Send input command to host
34 *
35 * Note that the command will be queued in a FIFO if other commands
36 * to the host have yet to be run
37 *
38 * @param[in] command - Input command to execute
39 */
40 void execute(Command command) override;
Andrew Geissler1b9d4e52017-03-21 15:04:05 -050041
42 private:
43
44 /** @brief Persistent sdbusplus DBus bus connection. */
45 sdbusplus::bus::bus& bus;
Andrew Geisslerdd2c6fd2017-03-16 15:53:20 -050046};
47
48} // namespace host
49} // namespace phosphor