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: Ibd2a0b512bfb7caf65bfab64b271d194da520aac
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index 7f558cd..83a251f 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -406,7 +406,7 @@
"ListNames");
}
-void nameChangeHandler(sdbusplus::message::message& message)
+void nameChangeHandler(sdbusplus::message_t& message)
{
std::string name;
std::string oldOwner;
@@ -449,7 +449,7 @@
} // anonymous namespace
static constexpr const char intraBmcName[] = "INTRABMC";
-uint8_t channelFromMessage(sdbusplus::message::message& msg)
+uint8_t channelFromMessage(sdbusplus::message_t& msg)
{
// channel name for ipmitool to resolve to
std::string sender = msg.get_sender();
@@ -470,9 +470,8 @@
} // namespace ipmi
/* called from sdbus async server context */
-auto executionEntry(boost::asio::yield_context yield,
- sdbusplus::message::message& m, NetFn netFn, uint8_t lun,
- Cmd cmd, ipmi::SecureBuffer& data,
+auto executionEntry(boost::asio::yield_context yield, sdbusplus::message_t& m,
+ NetFn netFn, uint8_t lun, Cmd cmd, ipmi::SecureBuffer& data,
std::map<std::string, ipmi::Value>& options)
{
const auto dbusResponse =
@@ -755,13 +754,13 @@
} // namespace oem
/* legacy alternative to executionEntry */
-void handleLegacyIpmiCommand(sdbusplus::message::message& m)
+void handleLegacyIpmiCommand(sdbusplus::message_t& m)
{
// make a copy so the next two moves don't wreak havoc on the stack
- sdbusplus::message::message b{m};
+ sdbusplus::message_t b{m};
boost::asio::spawn(*getIoContext(), [b = std::move(b)](
boost::asio::yield_context yield) {
- sdbusplus::message::message m{std::move(b)};
+ sdbusplus::message_t m{std::move(b)};
unsigned char seq = 0, netFn = 0, lun = 0, cmd = 0;
ipmi::SecureBuffer data;
@@ -851,12 +850,12 @@
// listen on deprecated signal interface for kcs/bt commands
constexpr const char* FILTER = "type='signal',interface='org.openbmc."
"HostIpmi',member='ReceivedMessage'";
- sdbusplus::bus::match::match oldIpmiInterface(*sdbusp, FILTER,
- handleLegacyIpmiCommand);
+ sdbusplus::bus::match_t oldIpmiInterface(*sdbusp, FILTER,
+ handleLegacyIpmiCommand);
#endif /* ALLOW_DEPRECATED_API */
// set up bus name watching to match channels with bus names
- sdbusplus::bus::match::match nameOwnerChanged(
+ sdbusplus::bus::match_t nameOwnerChanged(
*sdbusp,
sdbusplus::bus::match::rules::nameOwnerChanged() +
sdbusplus::bus::match::rules::arg0namespace(