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: I223d58649a21565678bd7ef78d955b30d3fd6d84
diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
index e1941cf..d0f5d00 100644
--- a/fault-monitor/fru-fault-monitor.cpp
+++ b/fault-monitor/fru-fault-monitor.cpp
@@ -47,7 +47,7 @@
using InvalidArgumentErr =
sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument;
-std::string getService(sdbusplus::bus::bus& bus, const std::string& path)
+std::string getService(sdbusplus::bus_t& bus, const std::string& path)
{
auto mapper = bus.new_method_call(MAPPER_BUSNAME, MAPPER_OBJ_PATH,
MAPPER_IFACE, "GetObject");
@@ -59,7 +59,7 @@
auto mapperResponseMsg = bus.call(mapper);
mapperResponseMsg.read(mapperResponse);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
lg2::error(
"Failed to parse getService mapper response, ERROR = {ERROR}",
@@ -77,7 +77,7 @@
return mapperResponse.cbegin()->first;
}
-void action(sdbusplus::bus::bus& bus, const std::string& path, bool assert)
+void action(sdbusplus::bus_t& bus, const std::string& path, bool assert)
{
std::string service;
try
@@ -116,7 +116,7 @@
{
bus.call_noreply(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
// Log an info message, system may not have all the LED Groups defined
lg2::info("Failed to Assert LED Group, ERROR = {ERROR}", "ERROR", e);
@@ -125,7 +125,7 @@
return;
}
-void Add::created(sdbusplus::message::message& msg)
+void Add::created(sdbusplus::message_t& msg)
{
auto bus = msg.get_bus();
@@ -135,7 +135,7 @@
{
msg.read(objectPath, interfaces);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
lg2::error("Failed to parse created message, ERROR = {ERROR}", "ERROR",
e);
@@ -186,7 +186,7 @@
return;
}
-void getLoggingSubTree(sdbusplus::bus::bus& bus, MapperResponseType& subtree)
+void getLoggingSubTree(sdbusplus::bus_t& bus, MapperResponseType& subtree)
{
auto depth = 0;
auto mapperCall = bus.new_method_call(MAPPER_BUSNAME, MAPPER_OBJ_PATH,
@@ -200,7 +200,7 @@
auto mapperResponseMsg = bus.call(mapperCall);
mapperResponseMsg.read(subtree);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
lg2::error(
"Failed to parse existing callouts subtree message, ERROR = {ERROR}",
@@ -208,7 +208,7 @@
}
}
-void Add::processExistingCallouts(sdbusplus::bus::bus& bus)
+void Add::processExistingCallouts(sdbusplus::bus_t& bus)
{
MapperResponseType mapperResponse;
@@ -239,7 +239,7 @@
{
reply.read(assoc);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
lg2::error(
"Failed to parse existing callouts associations message, ERROR = {ERROR}",
@@ -265,7 +265,7 @@
}
}
-void Remove::removed(sdbusplus::message::message& msg)
+void Remove::removed(sdbusplus::message_t& msg)
{
auto bus = msg.get_bus();