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: Ie7375047bd567aa052d3bd35a6dd7008779a05b4
diff --git a/src/smbiosmdrv2handler.cpp b/src/smbiosmdrv2handler.cpp
index fa250c6..59f38fa 100644
--- a/src/smbiosmdrv2handler.cpp
+++ b/src/smbiosmdrv2handler.cpp
@@ -64,15 +64,15 @@
const std::string& service)
{
std::shared_ptr<sdbusplus::asio::connection> bus = getSdBus();
- sdbusplus::message::message method =
+ sdbusplus::message_t method =
bus->new_method_call(service.c_str(), mdrv2Path, dbusProperties, "Get");
method.append(mdrv2Interface, name);
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(value);
}
catch (const sdbusplus::exception_t& e)
@@ -91,14 +91,14 @@
{
std::vector<uint32_t> commonData;
std::shared_ptr<sdbusplus::asio::connection> bus = getSdBus();
- sdbusplus::message::message method =
+ sdbusplus::message_t method =
bus->new_method_call(service.c_str(), mdrv2Path, mdrv2Interface,
"SynchronizeDirectoryCommonData");
method.append(idIndex, size);
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(commonData);
}
catch (const sdbusplus::exception_t& e)
@@ -135,7 +135,7 @@
}
std::shared_ptr<sdbusplus::asio::connection> bus = getSdBus();
- sdbusplus::message::message method = bus->new_method_call(
+ sdbusplus::message_t method = bus->new_method_call(
service.c_str(), mdrv2Path, mdrv2Interface, "FindIdIndex");
std::vector<uint8_t> info;
info.resize(len);
@@ -144,7 +144,7 @@
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(idIndex);
}
catch (const sdbusplus::exception_t& e)
@@ -316,7 +316,7 @@
return ipmi::responseParmOutOfRange();
}
- sdbusplus::message::message method = bus->new_method_call(
+ sdbusplus::message_t method = bus->new_method_call(
service.c_str(), mdrv2Path, mdrv2Interface, "GetDirectoryInformation");
method.append(dirIndex);
@@ -324,7 +324,7 @@
std::vector<uint8_t> dataOut;
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(dataOut);
}
catch (const sdbusplus::exception_t& e)
@@ -403,7 +403,7 @@
return ipmi::response(ccStorageLeak);
}
- sdbusplus::message::message method = bus->new_method_call(
+ sdbusplus::message_t method = bus->new_method_call(
service.c_str(), mdrv2Path, mdrv2Interface, "SendDirectoryInformation");
method.append(dirVersion, dirIndex, returnedEntries, remainingEntries,
dataInfo);
@@ -411,7 +411,7 @@
bool terminate = false;
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(terminate);
}
catch (const sdbusplus::exception_t& e)
@@ -469,7 +469,7 @@
return ipmi::responseParmOutOfRange();
}
- sdbusplus::message::message method = bus->new_method_call(
+ sdbusplus::message_t method = bus->new_method_call(
service.c_str(), mdrv2Path, mdrv2Interface, "GetDataInformation");
method.append(static_cast<uint8_t>(idIndex));
@@ -477,7 +477,7 @@
std::vector<uint8_t> res;
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(res);
}
catch (const sdbusplus::exception_t& e)
@@ -524,13 +524,13 @@
return ipmi::responseParmOutOfRange();
}
- sdbusplus::message::message method = bus->new_method_call(
+ sdbusplus::message_t method = bus->new_method_call(
service.c_str(), mdrv2Path, mdrv2Interface, "GetDataOffer");
std::vector<uint8_t> dataOut;
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(dataOut);
}
catch (const sdbusplus::exception_t& e)
@@ -602,7 +602,7 @@
return ipmi::responseParmOutOfRange();
}
- sdbusplus::message::message method = bus->new_method_call(
+ sdbusplus::message_t method = bus->new_method_call(
service.c_str(), mdrv2Path, mdrv2Interface, "SendDataInformation");
method.append((uint8_t)idIndex, validFlag, dataLength, dataVersion,
@@ -611,7 +611,7 @@
bool entryChanged = true;
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(entryChanged);
}
catch (const sdbusplus::exception_t& e)
@@ -1243,12 +1243,12 @@
bool status = false;
std::shared_ptr<sdbusplus::asio::connection> bus = getSdBus();
std::string service = ipmi::getService(*bus, mdrv2Interface, mdrv2Path);
- sdbusplus::message::message method = bus->new_method_call(
+ sdbusplus::message_t method = bus->new_method_call(
service.c_str(), mdrv2Path, mdrv2Interface, "AgentSynchronizeData");
try
{
- sdbusplus::message::message reply = bus->call(method);
+ sdbusplus::message_t reply = bus->call(method);
reply.read(status);
}
catch (const sdbusplus::exception_t& e)