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/ADCSensorMain.cpp b/src/ADCSensorMain.cpp
index fe8334d..80838bf 100644
--- a/src/ADCSensorMain.cpp
+++ b/src/ADCSensorMain.cpp
@@ -316,7 +316,7 @@
systemBus->request_name("xyz.openbmc_project.ADCSensor");
sdbusplus::asio::object_server objectServer(systemBus);
boost::container::flat_map<std::string, std::shared_ptr<ADCSensor>> sensors;
- 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>>();
@@ -326,8 +326,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";
@@ -353,8 +353,8 @@
});
};
- std::function<void(sdbusplus::message::message&)> cpuPresenceHandler =
- [&](sdbusplus::message::message& message) {
+ std::function<void(sdbusplus::message_t&)> cpuPresenceHandler =
+ [&](sdbusplus::message_t& message) {
std::string path = message.get_path();
boost::to_lower(path);
@@ -403,15 +403,15 @@
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);
matches.emplace_back(std::move(match));
}
- matches.emplace_back(std::make_unique<sdbusplus::bus::match::match>(
- static_cast<sdbusplus::bus::bus&>(*systemBus),
+ matches.emplace_back(std::make_unique<sdbusplus::bus::match_t>(
+ static_cast<sdbusplus::bus_t&>(*systemBus),
"type='signal',member='PropertiesChanged',path_namespace='" +
std::string(cpuInventoryPath) +
"',arg0namespace='xyz.openbmc_project.Inventory.Item'",