1 #pragma once 2 3 #include <sdbusplus/bus.hpp> 4 5 namespace phosphor 6 { 7 namespace state 8 { 9 namespace manager 10 { 11 namespace 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 */ 22 std::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 */ 33 void 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