blob: db7b361cc23b98099f5c160c73f850d946a080b4 [file] [log] [blame]
Carol Wangdc059392020-03-13 17:39:17 +08001#pragma once
2
3#include <sdbusplus/bus.hpp>
4
5namespace phosphor
6{
7namespace state
8{
9namespace manager
10{
11namespace utils
12{
13
14/** @brief Get service name from object path and interface
15 *
16 * @param[in] bus - The Dbus bus object
17 * @param[in] path - The Dbus object path
18 * @param[in] interface - The Dbus interface
19 *
20 * @return The name of the service
21 */
22std::string getService(sdbusplus::bus::bus& bus, std::string path,
23 std::string interface);
24
25/** @brief Set the value of property
26 *
27 * @param[in] bus - The Dbus bus object
28 * @param[in] path - The Dbus object path
29 * @param[in] interface - The Dbus interface
30 * @param[in] property - The property name to set
31 * @param[in] value - The value of property
32 */
33void setProperty(sdbusplus::bus::bus& bus, const std::string& path,
34 const std::string& interface, const std::string& property,
35 const std::string& value);
36
37} // namespace utils
38} // namespace manager
39} // namespace state
40} // namespace phosphor