blob: 442bd226481fcf3694b1143431b50665c33165fd [file] [log] [blame]
Jayanth Othayothc4831812021-06-08 01:33:40 -05001#pragma once
2
3#include <sdbusplus/bus.hpp>
4
5#include <string>
6
7namespace openpower
8{
9namespace 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 */
20std::string getService(sdbusplus::bus::bus& bus, const std::string& objectPath,
21 const std::string& interface);
Marri Devender Rao4d5b5bf2022-05-23 09:23:31 -050022
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 */
29bool isHostPoweringOff();
30
Jayanth Othayothc4831812021-06-08 01:33:40 -050031} // namespace util
32} // namespace openpower