Add utility for D-Bus
Putting all D-Bus related operation to the utils file.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I934e519bca43b73da01ed09fc73f6c7cdc795e1f
diff --git a/led-main.cpp b/led-main.cpp
index 0b060dc..7dc0488 100644
--- a/led-main.cpp
+++ b/led-main.cpp
@@ -9,13 +9,14 @@
#include "ledlayout.hpp"
#include "manager.hpp"
#include "serialize.hpp"
+#include "utils.hpp"
#include <iostream>
int main(void)
{
/** @brief Dbus constructs used by LED Group manager */
- sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
+ auto& bus = phosphor::led::utils::DBusHandler::getBus();
#ifdef LED_USE_JSON
auto systemLedMap = loadJsonConfig(LED_JSON_FILE);