sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t
Change-Id: Ieff0241e0cd818d95cb42fac5a10c65efa99fde9
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/host_error_monitor.hpp b/include/host_error_monitor.hpp
index 0710ff2..a7710f9 100644
--- a/include/host_error_monitor.hpp
+++ b/include/host_error_monitor.hpp
@@ -101,15 +101,15 @@
static RecoveryType recovery;
recovery = requestedRecovery;
std::cerr << "Starting crashdump\n";
- static std::shared_ptr<sdbusplus::bus::match::match> crashdumpCompleteMatch;
+ static std::shared_ptr<sdbusplus::bus::match_t> crashdumpCompleteMatch;
if (!crashdumpCompleteMatch)
{
- crashdumpCompleteMatch = std::make_shared<sdbusplus::bus::match::match>(
+ crashdumpCompleteMatch = std::make_shared<sdbusplus::bus::match_t>(
*conn,
"type='signal',interface='com.intel.crashdump',member='"
"CrashdumpComplete'",
- [conn](sdbusplus::message::message& /*msg*/) {
+ [conn](sdbusplus::message_t& /*msg*/) {
std::cerr << "Crashdump completed\n";
handleRecovery(recovery, conn);
crashdumpCompleteMatch.reset();
diff --git a/src/host_error_monitor.cpp b/src/host_error_monitor.cpp
index 998f748..00177b9 100644
--- a/src/host_error_monitor.cpp
+++ b/src/host_error_monitor.cpp
@@ -72,13 +72,13 @@
"xyz.openbmc_project.State.Host", "CurrentHostState");
}
-static std::shared_ptr<sdbusplus::bus::match::match> startHostStateMonitor()
+static std::shared_ptr<sdbusplus::bus::match_t> startHostStateMonitor()
{
- return std::make_shared<sdbusplus::bus::match::match>(
+ return std::make_shared<sdbusplus::bus::match_t>(
*conn,
"type='signal',interface='org.freedesktop.DBus.Properties',"
"member='PropertiesChanged',arg0='xyz.openbmc_project.State.Host'",
- [](sdbusplus::message::message& msg) {
+ [](sdbusplus::message_t& msg) {
std::string interfaceName;
boost::container::flat_map<std::string, std::variant<std::string>>
propertiesChanged;
@@ -132,7 +132,7 @@
sdbusplus::asio::object_server(host_error_monitor::conn);
// Start tracking host state
- std::shared_ptr<sdbusplus::bus::match::match> hostStateMonitor =
+ std::shared_ptr<sdbusplus::bus::match_t> hostStateMonitor =
host_error_monitor::startHostStateMonitor();
// Initialize the signal monitors