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: I9029cc722e7712633c15436bd3868d8c3209f567
diff --git a/control/json/dbus_zone.hpp b/control/json/dbus_zone.hpp
index 8dfce1a..83abb53 100644
--- a/control/json/dbus_zone.hpp
+++ b/control/json/dbus_zone.hpp
@@ -18,7 +18,7 @@
#include "xyz/openbmc_project/Control/ThermalMode/server.hpp"
/* Extend the Control::ThermalMode interface */
-using ThermalModeIntf = sdbusplus::server::object::object<
+using ThermalModeIntf = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Control::server::ThermalMode>;
namespace phosphor::fan::control::json
diff --git a/control/json/event.hpp b/control/json/event.hpp
index 0873c06..e0bdd06 100644
--- a/control/json/event.hpp
+++ b/control/json/event.hpp
@@ -150,7 +150,7 @@
private:
/* The sdbusplus bus object */
- sdbusplus::bus::bus& _bus;
+ sdbusplus::bus_t& _bus;
/* The event's manager */
Manager* _manager;
diff --git a/control/json/fan.cpp b/control/json/fan.cpp
index cf5a7e3..b9c5a58 100644
--- a/control/json/fan.cpp
+++ b/control/json/fan.cpp
@@ -103,7 +103,7 @@
_bus, sensor.second, sensor.first, _interface,
FAN_TARGET_PROPERTY, std::move(value));
}
- catch (const sdbusplus::exception::exception&)
+ catch (const sdbusplus::exception_t&)
{
throw util::DBusPropertyError{
fmt::format("Failed to set target for fan {}", _name).c_str(),
diff --git a/control/json/fan.hpp b/control/json/fan.hpp
index 116e50f..124a916 100644
--- a/control/json/fan.hpp
+++ b/control/json/fan.hpp
@@ -128,7 +128,7 @@
void unlockTarget(uint64_t target);
/* The sdbusplus bus object */
- sdbusplus::bus::bus& _bus;
+ sdbusplus::bus_t& _bus;
/**
* Interface containing the `Target` property
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index 19d9d9b..0b1c45f 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -764,7 +764,7 @@
}
}
-void Manager::handleSignal(sdbusplus::message::message& msg,
+void Manager::handleSignal(sdbusplus::message_t& msg,
const std::vector<SignalPkg>* pkgs)
{
for (auto& pkg : *pkgs)
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index 78963a4..5b6aaac 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -93,8 +93,8 @@
* Signal handler function that handles parsing a signal's message for a
* particular signal object and stores the results in the manager
*/
-using SignalHandler = std::function<bool(sdbusplus::message::message&,
- const SignalObject&, Manager&)>;
+using SignalHandler =
+ std::function<bool(sdbusplus::message_t&, const SignalObject&, Manager&)>;
/**
* Package of data required when a signal is received
* Tuple constructed of:
@@ -465,7 +465,7 @@
* @param[in] msg - Signal message containing the signal's data
* @param[in] pkgs - Signal packages associated to the signal being handled
*/
- void handleSignal(sdbusplus::message::message& msg,
+ void handleSignal(sdbusplus::message_t& msg,
const std::vector<SignalPkg>* pkgs);
/**
@@ -593,13 +593,13 @@
void insertFilteredObjects(ManagedObjects& ref);
/* The sdbusplus bus object to use */
- sdbusplus::bus::bus& _bus;
+ sdbusplus::bus_t& _bus;
/* The sdeventplus even loop to use */
sdeventplus::Event _event;
/* The sdbusplus manager object to set the ObjectManager interface */
- sdbusplus::server::manager::manager _mgr;
+ sdbusplus::server::manager_t _mgr;
/* Whether loading the config files is allowed or not */
bool _loadAllowed;