summaryrefslogtreecommitdiffstats
path: root/utils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils.hpp')
-rw-r--r--utils.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/utils.hpp b/utils.hpp
new file mode 100644
index 0000000..51f9832
--- /dev/null
+++ b/utils.hpp
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <sdbusplus/bus.hpp>
+#include <string>
+namespace open_power
+{
+namespace occ
+{
+/**
+ * @brief Gets the D-Bus Service name for the input D-Bus path
+ *
+ * @param[in] bus - Bus handler
+ * @param[in] intf - Interface
+ * @param[in] path - Object Path
+ *
+ * @return Service name
+ * @error InternalFailure exception thrown
+ */
+std::string getService(sdbusplus::bus::bus& bus,
+ const std::string& intf,
+ const std::string& path);
+} // namespace occ
+} // namespace open_power
OpenPOWER on IntegriCloud