reduce dbus string constants
There are a large number of dbus constants scattered throughout the
code that could/should be obtained from phosphor-dbus-interface values.
Perform minor refactoring to greatly reduce the number of string
constants.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie8700bc90611d21eee7160f4686bc978fe0a0eb4
diff --git a/hypervisor_state_manager.hpp b/hypervisor_state_manager.hpp
index 3c7d896..88ea57c 100644
--- a/hypervisor_state_manager.hpp
+++ b/hypervisor_state_manager.hpp
@@ -3,9 +3,10 @@
#include "config.h"
#include "settings.hpp"
-#include "xyz/openbmc_project/State/Host/server.hpp"
#include <sdbusplus/bus.hpp>
+#include <xyz/openbmc_project/State/Boot/Progress/client.hpp>
+#include <xyz/openbmc_project/State/Host/server.hpp>
namespace phosphor
{
@@ -16,6 +17,8 @@
using HypervisorInherit = sdbusplus::server::object_t<
sdbusplus::server::xyz::openbmc_project::state::Host>;
+using BootProgress =
+ sdbusplus::client::xyz::openbmc_project::state::boot::Progress<>;
namespace server = sdbusplus::server::xyz::openbmc_project::state;
namespace sdbusRule = sdbusplus::bus::match::rules;
@@ -46,9 +49,8 @@
bus(bus),
bootProgressChangeSignal(
bus,
- sdbusRule::propertiesChanged(
- "/xyz/openbmc_project/state/host0",
- "xyz.openbmc_project.State.Boot.Progress"),
+ sdbusRule::propertiesChanged("/xyz/openbmc_project/state/host0",
+ BootProgress::interface),
[this](sdbusplus::message_t& m) { bootProgressChangeEvent(m); })
{}