Refactor D-Bus object
- The intent behind this commit is to refactor D-Bus, and abstract
the bus, getService, getProperty and other methods into the utils
file, and other file operations D-Bus only need to include
uitls.hpp.
- We can also continue to add other general methods such as
setPropery, getSubTree in the utils file in the future.
- Also, removed redundant files(occ_finder.hpp and occ_finder.cpp).
Tested: built openpower-occ-control successfully and worked.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I53e61e30a76173c154a9f47fc122936468abbc4b
diff --git a/occ_pass_through.hpp b/occ_pass_through.hpp
index 0c01ae4..ef31826 100644
--- a/occ_pass_through.hpp
+++ b/occ_pass_through.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "occ_command.hpp"
+#include "utils.hpp"
#include <fmt/core.h>
@@ -35,10 +36,9 @@
PassThrough& operator=(PassThrough&&) = default;
/** @brief Ctor to put pass-through d-bus object on the bus
- * @param[in] bus - Bus to attach to
* @param[in] path - Path to attach at
*/
- PassThrough(sdbusplus::bus::bus& bus, const char* path);
+ PassThrough(const char* path);
/** @brief Pass through command to OCC from dbus
* @param[in] command - command to pass-through