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_command.hpp b/occ_command.hpp
index 8420e3b..2c925f6 100644
--- a/occ_command.hpp
+++ b/occ_command.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "occ_errors.hpp"
+#include "utils.hpp"
#include <org/open_power/OCC/PassThrough/server.hpp>
#include <sdbusplus/bus.hpp>
@@ -47,10 +48,9 @@
/** @brief Ctor to set up which OCC the command will go to
*
* @param[in] instance - OCC instance
- * @param[in] bus - Bus to attach to
* @param[in] path - Path to attach at
*/
- OccCommand(uint8_t instance, sdbusplus::bus::bus& bus, const char* path);
+ OccCommand(uint8_t instance, const char* path);
/** @brief Dtor to clean up and close device */
~OccCommand()