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: I29672cb229bd07022b00f52105ac1d50ecacca62
diff --git a/extensions/phal/create_pel.cpp b/extensions/phal/create_pel.cpp
index 75ee064..6cbf305 100644
--- a/extensions/phal/create_pel.cpp
+++ b/extensions/phal/create_pel.cpp
@@ -115,7 +115,7 @@
method.append(event, level, additionalData, pelCalloutInfo);
auto resp = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
fmt::format("D-Bus call exception",
@@ -222,7 +222,7 @@
response.read(reply);
plid = std::get<1>(reply); // platform log id is tuple "second"
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(fmt::format("D-Bus call exception",
"OBJPATH={}, INTERFACE={}, EXCEPTION={}",
@@ -263,7 +263,7 @@
method.append(event, level, additionalData);
auto resp = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(fmt::format("sdbusplus D-Bus call exception",
"OBJPATH={}, INTERFACE={}, EXCEPTION={}",
diff --git a/extensions/phal/dump_utils.cpp b/extensions/phal/dump_utils.cpp
index 6356de1..11051ae 100644
--- a/extensions/phal/dump_utils.cpp
+++ b/extensions/phal/dump_utils.cpp
@@ -22,8 +22,8 @@
* @param[out] inProgress Used to break out of our dbus wait loop
* @reutn Always non-zero indicating no error, no cascading callbacks
*/
-uint32_t dumpStatusChanged(sdbusplus::message::message& msg,
- const std::string& path, bool& inProgress)
+uint32_t dumpStatusChanged(sdbusplus::message_t& msg, const std::string& path,
+ bool& inProgress)
{
// reply (msg) will be a property change message
std::string interface;
@@ -108,7 +108,7 @@
constexpr auto interface = "xyz.openbmc_project.Dump.Create";
constexpr auto function = "CreateDump";
- sdbusplus::message::message method;
+ sdbusplus::message_t method;
auto bus = sdbusplus::bus::new_default();
@@ -140,7 +140,7 @@
// monitor dump progress
monitorDump(reply, dumpParameters.timeout);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(fmt::format("D-Bus call createDump exception",
"OBJPATH={}, INTERFACE={}, EXCEPTION={}",
diff --git a/extensions/phal/fw_update_watch.cpp b/extensions/phal/fw_update_watch.cpp
index b778734..b85c2f0 100644
--- a/extensions/phal/fw_update_watch.cpp
+++ b/extensions/phal/fw_update_watch.cpp
@@ -33,7 +33,7 @@
using InterfaceName = std::string;
using InterfaceMap = std::map<InterfaceName, PropertyMap>;
-void Watch::fwIntfAddedCallback(sdbusplus::message::message& msg)
+void Watch::fwIntfAddedCallback(sdbusplus::message_t& msg)
{
// DBusInterfaceAdded interfaces;
sdbusplus::message::object_path objectPath;
@@ -43,7 +43,7 @@
{
msg.read(objectPath, interfaceMap);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(fmt::format("Failed to parse software add signal"
"Exception [{}] REPLY_SIG [{}]",
diff --git a/extensions/phal/fw_update_watch.hpp b/extensions/phal/fw_update_watch.hpp
index 615e10c..d8d056e 100644
--- a/extensions/phal/fw_update_watch.hpp
+++ b/extensions/phal/fw_update_watch.hpp
@@ -40,7 +40,7 @@
* @param[in] bus - The Dbus bus object
*/
- Watch(sdbusplus::bus::bus& bus) :
+ Watch(sdbusplus::bus_t& bus) :
addMatch(bus,
sdbusplus::bus::match::rules::interfacesAdded() +
sdbusplus::bus::match::rules::path(OBJ_SOFTWARE),
@@ -73,7 +73,7 @@
*
* @param[in] msg - Data associated with subscribed signal
*/
- void fwIntfAddedCallback(sdbusplus::message::message& msg);
+ void fwIntfAddedCallback(sdbusplus::message_t& msg);
/** @brief sdbusplus signal match for software path add */
sdbusplus::bus::match_t addMatch;