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: I46a5eec210002af84239af74a93c830b1d4a13f1
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 1beef2e..6cf15d6 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -28,8 +28,8 @@
{
// Match signals added on software path
-static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateMatcher;
-static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateErrorMatcher;
+static std::unique_ptr<sdbusplus::bus::match_t> fwUpdateMatcher;
+static std::unique_ptr<sdbusplus::bus::match_t> fwUpdateErrorMatcher;
// Only allow one update at a time
static bool fwUpdateInProgress = false;
// Timer for software available
@@ -63,8 +63,7 @@
// then no asyncResp updates will occur
static void
softwareInterfaceAdded(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- sdbusplus::message::message& m,
- task::Payload&& payload)
+ sdbusplus::message_t& m, task::Payload&& payload)
{
dbus::utility::DBusInteracesMap interfacesProperties;
@@ -120,7 +119,7 @@
std::shared_ptr<task::TaskData> task =
task::TaskData::createTask(
[](boost::system::error_code ec,
- sdbusplus::message::message& msg,
+ sdbusplus::message_t& msg,
const std::shared_ptr<task::TaskData>&
taskData) {
if (ec)
@@ -296,26 +295,25 @@
}
});
task::Payload payload(req);
- auto callback =
- [asyncResp, payload](sdbusplus::message::message& m) mutable {
+ auto callback = [asyncResp, payload](sdbusplus::message_t& m) mutable {
BMCWEB_LOG_DEBUG << "Match fired";
softwareInterfaceAdded(asyncResp, m, std::move(payload));
};
fwUpdateInProgress = true;
- fwUpdateMatcher = std::make_unique<sdbusplus::bus::match::match>(
+ fwUpdateMatcher = std::make_unique<sdbusplus::bus::match_t>(
*crow::connections::systemBus,
"interface='org.freedesktop.DBus.ObjectManager',type='signal',"
"member='InterfacesAdded',path='/xyz/openbmc_project/software'",
callback);
- fwUpdateErrorMatcher = std::make_unique<sdbusplus::bus::match::match>(
+ fwUpdateErrorMatcher = std::make_unique<sdbusplus::bus::match_t>(
*crow::connections::systemBus,
"interface='org.freedesktop.DBus.ObjectManager',type='signal',"
"member='InterfacesAdded',"
"path='/xyz/openbmc_project/logging'",
- [asyncResp, url](sdbusplus::message::message& m) {
+ [asyncResp, url](sdbusplus::message_t& m) {
std::vector<std::pair<std::string, dbus::utility::DBusPropertiesMap>>
interfacesProperties;
sdbusplus::message::object_path objPath;