-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathutil.hpp
38 lines (32 loc) · 898 Bytes
/
util.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <sdbusplus/bus.hpp>
#include <string>
namespace openpower
{
namespace util
{
/**
* Get D-Bus service name for the specified object and interface
*
* @param[in] bus - sdbusplus D-Bus to attach to
* @param[in] objectPath - D-Bus object path
* @param[in] interface - D-Bus interface name
*
* @return service name on success and exception on failure
*/
std::string getService(sdbusplus::bus_t& bus, const std::string& objectPath,
const std::string& interface);
/**
* Returns true if host is in poweringoff state else false
*
* @return bool - true if host is powering off else false. if failed
* to read property false will be returned.
*/
bool isHostPoweringOff();
/**
* @brief Returns the power state for chassis0
* @return The chassis power state.
*/
std::string getChassisPowerState();
} // namespace util
} // namespace openpower