forked from openbmc/phosphor-state-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.hpp
40 lines (35 loc) · 1.04 KB
/
utils.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
39
40
#pragma once
#include <sdbusplus/bus.hpp>
namespace phosphor
{
namespace state
{
namespace manager
{
namespace utils
{
/** @brief Get service name from object path and interface
*
* @param[in] bus - The Dbus bus object
* @param[in] path - The Dbus object path
* @param[in] interface - The Dbus interface
*
* @return The name of the service
*/
std::string getService(sdbusplus::bus::bus& bus, std::string path,
std::string interface);
/** @brief Set the value of property
*
* @param[in] bus - The Dbus bus object
* @param[in] path - The Dbus object path
* @param[in] interface - The Dbus interface
* @param[in] property - The property name to set
* @param[in] value - The value of property
*/
void setProperty(sdbusplus::bus::bus& bus, const std::string& path,
const std::string& interface, const std::string& property,
const std::string& value);
} // namespace utils
} // namespace manager
} // namespace state
} // namespace phosphor