summaryrefslogtreecommitdiffstats
path: root/utils.hpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-08-07 15:53:25 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-08-11 17:29:08 +0000
commit01d4bd1a6301ebbd892b9c15cf4e5501e96da79b (patch)
treec262a73bc638540a056fabd641d45c230736ce31 /utils.hpp
parent11ddbd21ede92a1d46a4df5fa3d9328b9fe08486 (diff)
downloadphosphor-host-ipmid-01d4bd1a6301ebbd892b9c15cf4e5501e96da79b.tar.gz
phosphor-host-ipmid-01d4bd1a6301ebbd892b9c15cf4e5501e96da79b.zip
Take bus as input parameter in util function
Change-Id: I2de92a1d82939a539e19aca69561ad58a171a5d0 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'utils.hpp')
-rw-r--r--utils.hpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/utils.hpp b/utils.hpp
index 628b241..0c7ae76 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -36,47 +36,55 @@ std::string getService(sdbusplus::bus::bus& bus,
/** @brief Gets the dbus object info implementing the given interface
* from the given subtree.
+ * @param[in] bus - DBUS Bus Object.
* @param[in] interface - Dbus interface.
* @param[in] subtreePath - subtree from where the search should start.
* @param[in] match - identifier for object.
* @return On success returns the object having objectpath and servicename.
*/
-DbusObjectInfo getDbusObject(const std::string& interface,
+DbusObjectInfo getDbusObject(sdbusplus::bus::bus& bus,
+ const std::string& interface,
const std::string& subtreePath = ROOT,
const std::string& match = {});
/** @brief Gets the value associated with the given object
* and the interface.
+ * @param[in] bus - DBUS Bus Object.
* @param[in] service - Dbus service name.
* @param[in] objPath - Dbus object path.
* @param[in] interface - Dbus interface.
* @param[in] property - name of the property.
* @return On success returns the value of the property.
*/
-Value getDbusProperty(const std::string& service,
+Value getDbusProperty(sdbusplus::bus::bus& bus,
+ const std::string& service,
const std::string& objPath,
const std::string& interface,
const std::string& property);
/** @brief Gets all the properties associated with the given object
* and the interface.
+ * @param[in] bus - DBUS Bus Object.
* @param[in] service - Dbus service name.
* @param[in] objPath - Dbus object path.
* @param[in] interface - Dbus interface.
* @return On success returns the map of name value pair.
*/
-PropertyMap getAllDbusProperties(const std::string& service,
+PropertyMap getAllDbusProperties(sdbusplus::bus::bus& bus,
+ const std::string& service,
const std::string& objPath,
const std::string& interface);
/** @brief Sets the property value of the given object.
+ * @param[in] bus - DBUS Bus Object.
* @param[in] service - Dbus service name.
* @param[in] objPath - Dbus object path.
* @param[in] interface - Dbus interface.
* @param[in] property - name of the property.
* @param[in] value - value which needs to be set.
*/
-void setDbusProperty(const std::string& service,
+void setDbusProperty(sdbusplus::bus::bus& bus,
+ const std::string& service,
const std::string& objPath,
const std::string& interface,
const std::string& property,
OpenPOWER on IntegriCloud