util::dbus: Make common the hostRunningState code

Move the code for getting the host running state from attention handler
specific code to common utility code.

Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: I457662cc13aa4dc89b321f238cd060e7e7486d1b
diff --git a/attn/attn_handler.cpp b/attn/attn_handler.cpp
index c1a4b48..85172ea 100644
--- a/attn/attn_handler.cpp
+++ b/attn/attn_handler.cpp
@@ -14,6 +14,7 @@
 #include <attn/bp_handler.hpp>
 #include <attn/ti_handler.hpp>
 #include <attn/vital_handler.hpp>
+#include <util/dbus.hpp>
 
 #include <algorithm>
 #include <iomanip>
@@ -271,13 +272,17 @@
                 {
                     trace<level::INFO>("TI info data ptr is invalid");
 
-                    HostRunningState runningState = hostRunningState();
-                    std::string stateString       = "host state unknown";
+                    util::dbus::HostRunningState runningState =
+                        util::dbus::hostRunningState();
 
-                    if ((HostRunningState::Started == runningState) ||
-                        (HostRunningState::Unknown == runningState))
+                    std::string stateString = "host state unknown";
+
+                    if ((util::dbus::HostRunningState::Started ==
+                         runningState) ||
+                        (util::dbus::HostRunningState::Unknown == runningState))
                     {
-                        if (HostRunningState::Started == runningState)
+                        if (util::dbus::HostRunningState::Started ==
+                            runningState)
                         {
                             stateString = "host started";
                         }