pinhole: move power policy service to utils
Move the getProperty() function to utils and use it for all utility
functions
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I3128d6006dc5f72a579daaf168b9976ee5bcb2e8
diff --git a/utils.hpp b/utils.hpp
index 004d97a..410f972 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -23,6 +23,19 @@
std::string getService(sdbusplus::bus::bus& bus, std::string path,
std::string interface);
+/** @brief Get the value of input 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 get
+ *
+ * @return The value of the property
+ */
+std::string getProperty(sdbusplus::bus::bus& bus, const std::string& path,
+ const std::string& interface,
+ const std::string& propertyName);
+
/** @brief Set the value of property
*
* @param[in] bus - The Dbus bus object