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
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9029cc722e7712633c15436bd3868d8c3209f567
diff --git a/monitor/system.cpp b/monitor/system.cpp
index 9da828b..77f3fab 100644
--- a/monitor/system.cpp
+++ b/monitor/system.cpp
@@ -33,6 +33,7 @@
#include <nlohmann/json.hpp>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
+#include <sdbusplus/bus/match.hpp>
#include <sdeventplus/event.hpp>
#include <sdeventplus/source/signal.hpp>
@@ -44,7 +45,7 @@
using namespace phosphor::logging;
-System::System(Mode mode, sdbusplus::bus::bus& bus,
+System::System(Mode mode, sdbusplus::bus_t& bus,
const sdeventplus::Event& event) :
_mode(mode),
_bus(bus), _event(event),
@@ -59,7 +60,7 @@
namespace match = sdbusplus::bus::match;
// must be done before service detection
- _inventoryMatch = std::make_unique<match::match>(
+ _inventoryMatch = std::make_unique<sdbusplus::bus::match_t>(
_bus, match::rules::nameOwnerChanged(util::INVENTORY_SVC),
std::bind(&System::inventoryOnlineCb, this, std::placeholders::_1));
@@ -177,7 +178,7 @@
for (const auto& [serviceName, unused] : sensorMap)
{
// map its service name to the sensor
- _sensorMatch.emplace_back(std::make_unique<match::match>(
+ _sensorMatch.emplace_back(std::make_unique<sdbusplus::bus::match_t>(
_bus, match::rules::nameOwnerChanged(serviceName),
std::bind(&System::tachSignalOffline, this,
std::placeholders::_1, sensorMap)));
@@ -190,7 +191,7 @@
}
}
-void System::inventoryOnlineCb(sdbusplus::message::message& msg)
+void System::inventoryOnlineCb(sdbusplus::message_t& msg)
{
namespace match = sdbusplus::bus::match;
@@ -283,7 +284,7 @@
// Determine on/offline status, set all sensors for that service
// to new state
//
-void System::tachSignalOffline(sdbusplus::message::message& msg,
+void System::tachSignalOffline(sdbusplus::message_t& msg,
SensorMapType const& sensorMap)
{
std::string serviceName, oldOwner, newOwner;