Vishwanatha Subbanna | 307d80b | 2017-06-28 15:56:09 +0530 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/bus.hpp> |
| 4 | #include <sdbusplus/server/object.hpp> |
| 5 | #include <org/open_power/OCC/Status/server.hpp> |
| 6 | namespace open_power |
| 7 | { |
| 8 | namespace occ |
| 9 | { |
| 10 | |
| 11 | namespace Base = sdbusplus::org::open_power::OCC::server; |
| 12 | using Interface = sdbusplus::server::object::object<Base::Status>; |
| 13 | |
| 14 | /** @class Status |
| 15 | * @brief Implementation of OCC Active Status |
| 16 | */ |
| 17 | class Status : public Interface |
| 18 | { |
| 19 | public: |
| 20 | Status() = delete; |
| 21 | ~Status() = default; |
| 22 | Status(const Status&) = delete; |
| 23 | Status& operator=(const Status&) = delete; |
| 24 | Status(Status&&) = default; |
| 25 | Status& operator=(Status&&) = default; |
| 26 | |
| 27 | /** @brief Constructs the Status object |
| 28 | * |
| 29 | * @param[in] bus - DBus bus to attach to |
| 30 | * @param[in] path - DBus object path |
| 31 | */ |
| 32 | Status(sdbusplus::bus::bus& bus, const char* path) |
| 33 | : Interface(bus, path) |
| 34 | { |
| 35 | // Nothing to do here |
| 36 | } |
| 37 | |
| 38 | /** @brief SET OccActive to True or False |
| 39 | * |
| 40 | * @param[in] value - Intended value |
| 41 | * |
| 42 | * @return - Updated value of the property |
| 43 | */ |
| 44 | bool occActive(bool value) override; |
| 45 | }; |
| 46 | |
| 47 | } // namespace occ |
| 48 | } // namespace open_power |