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: Ieb6587e32446a758676f67d9c868289cc02e50bf
diff --git a/src/FanMain.cpp b/src/FanMain.cpp
index c55757c..9367aac 100644
--- a/src/FanMain.cpp
+++ b/src/FanMain.cpp
@@ -521,7 +521,7 @@
tachSensors;
boost::container::flat_map<std::string, std::unique_ptr<PwmSensor>>
pwmSensors;
- std::vector<std::unique_ptr<sdbusplus::bus::match::match>> matches;
+ std::vector<std::unique_ptr<sdbusplus::bus::match_t>> matches;
auto sensorsChanged =
std::make_shared<boost::container::flat_set<std::string>>();
@@ -531,8 +531,8 @@
});
boost::asio::deadline_timer filterTimer(io);
- std::function<void(sdbusplus::message::message&)> eventHandler =
- [&](sdbusplus::message::message& message) {
+ std::function<void(sdbusplus::message_t&)> eventHandler =
+ [&](sdbusplus::message_t& message) {
if (message.is_method_error())
{
std::cerr << "callback method error\n";
@@ -560,8 +560,8 @@
for (const char* type : sensorTypes)
{
- auto match = std::make_unique<sdbusplus::bus::match::match>(
- static_cast<sdbusplus::bus::bus&>(*systemBus),
+ auto match = std::make_unique<sdbusplus::bus::match_t>(
+ static_cast<sdbusplus::bus_t&>(*systemBus),
"type='signal',member='PropertiesChanged',path_namespace='" +
std::string(inventoryPath) + "',arg0namespace='" + type + "'",
eventHandler);
@@ -569,13 +569,12 @@
}
// redundancy sensor
- std::function<void(sdbusplus::message::message&)> redundancyHandler =
- [&tachSensors, &systemBus,
- &objectServer](sdbusplus::message::message&) {
+ std::function<void(sdbusplus::message_t&)> redundancyHandler =
+ [&tachSensors, &systemBus, &objectServer](sdbusplus::message_t&) {
createRedundancySensor(tachSensors, systemBus, objectServer);
};
- auto match = std::make_unique<sdbusplus::bus::match::match>(
- static_cast<sdbusplus::bus::bus&>(*systemBus),
+ auto match = std::make_unique<sdbusplus::bus::match_t>(
+ static_cast<sdbusplus::bus_t&>(*systemBus),
"type='signal',member='PropertiesChanged',path_namespace='" +
std::string(inventoryPath) + "',arg0namespace='" +
redundancyConfiguration + "'",