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: I728089e5aefdb363993e3b338aed803f2553bdcd
diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp
index f8d5142..023cf35 100644
--- a/ipmbbridged.cpp
+++ b/ipmbbridged.cpp
@@ -376,7 +376,7 @@
{
auto ipmbMessageReceived = IpmbRequest();
ipmbMessageReceived.i2cToIpmbConstruct(ipmbFrame, r);
- sdbusplus::message::message msg =
+ sdbusplus::message_t msg =
conn->new_signal(ipmbObj, ipmbDbusIntf, "receiveBroadcast");
msg.append(ipmbMessageReceived.netFn, ipmbMessageReceived.cmd,
ipmbMessageReceived.data);
@@ -891,8 +891,8 @@
void addUpdateSlaveAddrHandler()
{
// callback to handle dbus signal of updating slave addr
- std::function<void(sdbusplus::message::message &)> updateSlaveAddrHandler =
- [](sdbusplus::message::message &message) {
+ std::function<void(sdbusplus::message_t &)> updateSlaveAddrHandler =
+ [](sdbusplus::message_t &message) {
uint8_t reqChannel, busId, slaveAddr;
// valid source of signal, check whether from multi-node manager
@@ -932,16 +932,16 @@
channel->ipmbChannelUpdateSlaveAddress(slaveAddr);
};
- static auto match = std::make_unique<sdbusplus::bus::match::match>(
- static_cast<sdbusplus::bus::bus &>(*conn),
+ static auto match = std::make_unique<sdbusplus::bus::match_t>(
+ static_cast<sdbusplus::bus_t &>(*conn),
"type='signal',member='updateBmcSlaveAddr',", updateSlaveAddrHandler);
}
void addSendBroadcastHandler()
{
// callback to handle dbus signal of sending broadcast message
- std::function<void(sdbusplus::message::message &)> sendBroadcastHandler =
- [](sdbusplus::message::message &message) {
+ std::function<void(sdbusplus::message_t &)> sendBroadcastHandler =
+ [](sdbusplus::message_t &message) {
uint8_t reqChannel, netFn, lun, cmd;
std::vector<uint8_t> dataReceived;
message.read(reqChannel, netFn, lun, cmd, dataReceived);
@@ -976,8 +976,8 @@
channel->ipmbSendI2cFrame(buffer);
};
- static auto match = std::make_unique<sdbusplus::bus::match::match>(
- static_cast<sdbusplus::bus::bus &>(*conn),
+ static auto match = std::make_unique<sdbusplus::bus::match_t>(
+ static_cast<sdbusplus::bus_t &>(*conn),
"type='signal',member='sendBroadcast',", sendBroadcastHandler);
}