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: I3be9475e7639ae8f52bceb1d5ff843a8dffde0a5
diff --git a/watchdog/watchdog_dbus.cpp b/watchdog/watchdog_dbus.cpp
index ea1ea21..7a4c6d6 100644
--- a/watchdog/watchdog_dbus.cpp
+++ b/watchdog/watchdog_dbus.cpp
@@ -15,7 +15,7 @@
using namespace phosphor::logging;
int dbusMethod(const std::string& path, const std::string& interface,
- const std::string& function, sdbusplus::message::message& method,
+ const std::string& function, sdbusplus::message_t& method,
const std::string& extended)
{
int rc = RC_DBUS_ERROR; // assume error
@@ -77,7 +77,7 @@
log<level::INFO>(traceMsgIface.c_str());
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error in dbusMethod", entry("ERROR=%s", e.what()));
}
@@ -99,7 +99,7 @@
constexpr auto interface = "org.open_power.Logging.PEL";
constexpr auto function = "CreatePELWithFFDCFiles";
- sdbusplus::message::message method;
+ sdbusplus::message_t method;
if (0 == dbusMethod(pathLogging, interface, function, method))
{
@@ -119,7 +119,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>("Error in createPel CreatePELWithFFDCFiles",
entry("ERROR=%s", e.what()));
diff --git a/watchdog/watchdog_dbus.hpp b/watchdog/watchdog_dbus.hpp
index f9568f7..88d2ca6 100644
--- a/watchdog/watchdog_dbus.hpp
+++ b/watchdog/watchdog_dbus.hpp
@@ -33,7 +33,7 @@
*
**/
int dbusMethod(const std::string& path, const std::string& interface,
- const std::string& function, sdbusplus::message::message& method,
+ const std::string& function, sdbusplus::message_t& method,
const std::string& extended = "");
/**
diff --git a/watchdog/watchdog_handler.cpp b/watchdog/watchdog_handler.cpp
index cb22446..a0641df 100644
--- a/watchdog/watchdog_handler.cpp
+++ b/watchdog/watchdog_handler.cpp
@@ -22,7 +22,7 @@
* @param progressStatus - dump progress status
* @return Always non-zero indicating no error, no cascading callbacks
*/
-uint dumpStatusChanged(sdbusplus::message::message& msg, std::string path,
+uint dumpStatusChanged(sdbusplus::message_t& msg, std::string path,
DumpProgressStatus& progressStatus)
{
// reply (msg) will be a property change message
@@ -125,7 +125,7 @@
constexpr auto interface = "xyz.openbmc_project.Dump.Create";
constexpr auto function = "CreateDump";
- sdbusplus::message::message method;
+ sdbusplus::message_t method;
if (0 == dbusMethod(path, interface, function, method))
{
@@ -165,7 +165,7 @@
// monitor dump progress
monitorDump(reply, dumpParameters.timeout);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
constexpr auto ERROR_DUMP_DISABLED =
"xyz.openbmc_project.Dump.Create.Error.Disabled";