use PDI constants for State.Host

Tested: Inspection only.

Change-Id: I0be6d281b49f30814dd40309cc9af540d7d6ea86
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/host-cmd-manager.cpp b/host-cmd-manager.cpp
index 3b3304f..4bbbb55 100644
--- a/host-cmd-manager.cpp
+++ b/host-cmd-manager.cpp
@@ -14,6 +14,8 @@
 
 #include <chrono>
 
+using HostState = sdbusplus::common::xyz::openbmc_project::state::Host;
+
 namespace phosphor
 {
 namespace host
@@ -21,10 +23,6 @@
 namespace command
 {
 
-constexpr auto HOST_STATE_PATH = "/xyz/openbmc_project/state/host0";
-constexpr auto HOST_STATE_INTERFACE = "xyz.openbmc_project.State.Host";
-constexpr auto HOST_TRANS_PROP = "RequestedHostTransition";
-
 // For throwing exceptions
 using namespace phosphor::logging;
 using InternalFailure =
@@ -36,7 +34,8 @@
     bus(bus), timer(std::bind(&Manager::hostTimeout, this)),
     hostTransitionMatch(
         bus,
-        sdbusRule::propertiesChanged(HOST_STATE_PATH, HOST_STATE_INTERFACE),
+        sdbusRule::propertiesChanged("/xyz/openbmc_project/state/host0",
+                                     HostState::interface),
         std::bind(&Manager::clearQueueOnPowerOn, this, std::placeholders::_1))
 {
     // Nothing to do here.
@@ -175,13 +174,14 @@
 
     msg.read(interface, properties);
 
-    if (properties.find(HOST_TRANS_PROP) == properties.end())
+    if (properties.find(HostState::property_names::requested_host_transition) ==
+        properties.end())
     {
         return;
     }
 
-    auto& requestedState =
-        std::get<std::string>(properties.at(HOST_TRANS_PROP));
+    auto& requestedState = std::get<std::string>(
+        properties.at(HostState::property_names::requested_host_transition));
 
     if (server::Host::convertTransitionFromString(requestedState) ==
         server::Host::Transition::On)