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: Idf165747d0fd6079ba217992f2c46a388ce2d906
diff --git a/hsbp-manager/include/utils.hpp b/hsbp-manager/include/utils.hpp
index 73bd957..bfe549c 100644
--- a/hsbp-manager/include/utils.hpp
+++ b/hsbp-manager/include/utils.hpp
@@ -23,6 +23,7 @@
#include <cstdint>
#include <iostream>
#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/bus.hpp>
#include <sdbusplus/bus/match.hpp>
#include <string>
#include <variant>
@@ -138,11 +139,11 @@
}
powerMatch = std::make_unique<sdbusplus::bus::match_t>(
- static_cast<sdbusplus::bus::bus&>(*conn),
+ static_cast<sdbusplus::bus_t&>(*conn),
"type='signal',interface='" + std::string(properties::interface) +
"',path='" + std::string(power::path) + "',arg0='" +
std::string(power::interface) + "'",
- [](sdbusplus::message::message& message) {
+ [](sdbusplus::message_t& message) {
std::string objectName;
boost::container::flat_map<std::string, std::variant<std::string>>
values;
diff --git a/hsbp-manager/src/hsbp_manager.cpp b/hsbp-manager/src/hsbp_manager.cpp
index ad1aea2..9bb1367 100644
--- a/hsbp-manager/src/hsbp_manager.cpp
+++ b/hsbp-manager/src/hsbp_manager.cpp
@@ -1455,11 +1455,11 @@
conn->request_name(busName);
- sdbusplus::bus::match::match match(
+ sdbusplus::bus::match_t match(
*conn,
"type='signal',member='PropertiesChanged',arg0='" +
std::string(configType) + "'",
- [&callbackTimer](sdbusplus::message::message&) {
+ [&callbackTimer](sdbusplus::message_t&) {
callbackTimer.expires_after(std::chrono::seconds(2));
callbackTimer.async_wait([](const boost::system::error_code ec) {
if (ec == boost::asio::error::operation_aborted)
@@ -1476,11 +1476,11 @@
});
});
- sdbusplus::bus::match::match drive(
+ sdbusplus::bus::match_t drive(
*conn,
"type='signal',member='PropertiesChanged',arg0='xyz.openbmc_project."
"Inventory.Item.NVMe'",
- [&callbackTimer](sdbusplus::message::message& message) {
+ [&callbackTimer](sdbusplus::message_t& message) {
callbackTimer.expires_after(std::chrono::seconds(2));
if (message.get_sender() == conn->get_unique_name())
{