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/pldm.cpp b/pldm.cpp
index 39437ad..729f292 100644
--- a/pldm.cpp
+++ b/pldm.cpp
@@ -73,6 +73,7 @@
{
PdrList pdrs{};
+ auto& bus = utils::getBus();
try
{
auto method = bus.new_method_call(
@@ -244,6 +245,7 @@
{
PdrList pdrs{};
+ auto& bus = utils::getBus();
try
{
auto method = bus.new_method_call(
@@ -284,6 +286,7 @@
uint8_t instanceId{};
+ auto bus& = utils::getBus();
try
{
auto method = bus.new_method_call(