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: Ie36d234f4580029a7832a0cd179f3bb78a1a403f
diff --git a/dbus/dbuspassive.cpp b/dbus/dbuspassive.cpp
index a5da100..038b1d7 100644
--- a/dbus/dbuspassive.cpp
+++ b/dbus/dbuspassive.cpp
@@ -33,7 +33,7 @@
{
std::unique_ptr<ReadInterface> DbusPassive::createDbusPassive(
- sdbusplus::bus::bus& bus, const std::string& type, const std::string& id,
+ sdbusplus::bus_t& bus, const std::string& type, const std::string& id,
std::unique_ptr<DbusHelperInterface> helper, const conf::SensorConfig* info,
const std::shared_ptr<DbusPassiveRedundancy>& redundancy)
{
@@ -79,7 +79,7 @@
}
DbusPassive::DbusPassive(
- sdbusplus::bus::bus& bus, const std::string& type, const std::string& id,
+ sdbusplus::bus_t& bus, const std::string& type, const std::string& id,
std::unique_ptr<DbusHelperInterface> helper,
const SensorProperties& settings, bool failed, const std::string& path,
const std::shared_ptr<DbusPassiveRedundancy>& redundancy) :
@@ -248,7 +248,7 @@
setValue(value);
}
-int handleSensorValue(sdbusplus::message::message& msg, DbusPassive* owner)
+int handleSensorValue(sdbusplus::message_t& msg, DbusPassive* owner)
{
std::string msgSensor;
std::map<std::string, std::variant<int64_t, double, bool>> msgData;
@@ -325,7 +325,7 @@
int dbusHandleSignal(sd_bus_message* msg, void* usrData, sd_bus_error* err)
{
- auto sdbpMsg = sdbusplus::message::message(msg);
+ auto sdbpMsg = sdbusplus::message_t(msg);
DbusPassive* obj = static_cast<DbusPassive*>(usrData);
return handleSensorValue(sdbpMsg, obj);