Jayanth Othayoth | c483181 | 2021-06-08 01:33:40 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/bus.hpp> |
| 4 | |
| 5 | #include <string> |
| 6 | |
| 7 | namespace openpower |
| 8 | { |
| 9 | namespace util |
| 10 | { |
| 11 | /** |
| 12 | * Get D-Bus service name for the specified object and interface |
| 13 | * |
| 14 | * @param[in] bus - sdbusplus D-Bus to attach to |
| 15 | * @param[in] objectPath - D-Bus object path |
| 16 | * @param[in] interface - D-Bus interface name |
| 17 | * |
| 18 | * @return service name on success and exception on failure |
| 19 | */ |
Patrick Williams | aaea686 | 2022-07-22 19:26:54 -0500 | [diff] [blame] | 20 | std::string getService(sdbusplus::bus_t& bus, const std::string& objectPath, |
Jayanth Othayoth | c483181 | 2021-06-08 01:33:40 -0500 | [diff] [blame] | 21 | const std::string& interface); |
Marri Devender Rao | 4d5b5bf | 2022-05-23 09:23:31 -0500 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Returns true if host is in poweringoff state else false |
| 25 | * |
| 26 | * @return bool - true if host is powering off else false. if failed |
| 27 | * to read property false will be returned. |
| 28 | */ |
| 29 | bool isHostPoweringOff(); |
| 30 | |
Jayanth Othayoth | 8744123 | 2022-09-08 23:47:11 -0500 | [diff] [blame] | 31 | /** |
| 32 | * @brief Returns the power state for chassis0 |
| 33 | * @return The chassis power state. |
| 34 | */ |
| 35 | std::string getChassisPowerState(); |
| 36 | |
Jayanth Othayoth | c483181 | 2021-06-08 01:33:40 -0500 | [diff] [blame] | 37 | } // namespace util |
| 38 | } // namespace openpower |