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: Ic0fe1ed7e19cf114b8666d49d4d670c7d9ec595d
diff --git a/power-sequencer/pgood_monitor.hpp b/power-sequencer/pgood_monitor.hpp
index 70a6f89..5575cbc 100644
--- a/power-sequencer/pgood_monitor.hpp
+++ b/power-sequencer/pgood_monitor.hpp
@@ -43,7 +43,7 @@
* @param[in] t - time to allow PGOOD to come up
*/
PGOODMonitor(std::unique_ptr<witherspoon::power::Device>&& d,
- sdbusplus::bus::bus& b, const sdeventplus::Event& e,
+ sdbusplus::bus_t& b, const sdeventplus::Event& e,
std::chrono::milliseconds& t) :
DeviceMonitor(std::move(d), e, t),
bus(b)
@@ -97,7 +97,7 @@
/**
* The D-Bus object
*/
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/**
* The match object for the properties changed signal
diff --git a/power-sequencer/runtime_monitor.cpp b/power-sequencer/runtime_monitor.cpp
index fa9ecfe..2f78659 100644
--- a/power-sequencer/runtime_monitor.cpp
+++ b/power-sequencer/runtime_monitor.cpp
@@ -40,7 +40,7 @@
#endif
}
-void RuntimeMonitor::onPowerLost(sdbusplus::message::message&)
+void RuntimeMonitor::onPowerLost(sdbusplus::message_t&)
{
log<level::INFO>("PGOOD failure detected. Checking for faults.");
diff --git a/power-sequencer/runtime_monitor.hpp b/power-sequencer/runtime_monitor.hpp
index 93e398f..78f2c1d 100644
--- a/power-sequencer/runtime_monitor.hpp
+++ b/power-sequencer/runtime_monitor.hpp
@@ -49,7 +49,7 @@
* @param[in] i - poll interval
*/
RuntimeMonitor(std::unique_ptr<witherspoon::power::Device>&& d,
- sdbusplus::bus::bus& b, const sdeventplus::Event& e,
+ sdbusplus::bus_t& b, const sdeventplus::Event& e,
std::chrono::milliseconds& i) :
DeviceMonitor(std::move(d), e, i),
bus(b), match(bus, getMatchString(),
@@ -75,7 +75,7 @@
*
* @param[in] msg - D-Bus message for callback
*/
- void onPowerLost(sdbusplus::message::message& msg);
+ void onPowerLost(sdbusplus::message_t& msg);
/**
* Returns the match string for the PowerLost signal
@@ -94,7 +94,7 @@
/**
* The D-Bus object
*/
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/**
* Match object for PowerLost signals
diff --git a/power-sequencer/ucd90160.cpp b/power-sequencer/ucd90160.cpp
index c060ebe..773b22c 100644
--- a/power-sequencer/ucd90160.cpp
+++ b/power-sequencer/ucd90160.cpp
@@ -50,7 +50,7 @@
namespace device_error = sdbusplus::xyz::openbmc_project::Common::Device::Error;
namespace power_error = sdbusplus::org::open_power::Witherspoon::Fault::Error;
-UCD90160::UCD90160(size_t instance, sdbusplus::bus::bus& bus) :
+UCD90160::UCD90160(size_t instance, sdbusplus::bus_t& bus) :
Device(DEVICE_NAME, instance),
interface(std::get<ucd90160::pathField>(deviceMap.find(instance)->second),
DRIVER_NAME, instance),
diff --git a/power-sequencer/ucd90160.hpp b/power-sequencer/ucd90160.hpp
index b66bb82..6ad85f2 100644
--- a/power-sequencer/ucd90160.hpp
+++ b/power-sequencer/ucd90160.hpp
@@ -43,7 +43,7 @@
* @param[in] instance - the device instance number
* @param[in] bus - D-Bus bus object
*/
- UCD90160(size_t instance, sdbusplus::bus::bus& bus);
+ UCD90160(size_t instance, sdbusplus::bus_t& bus);
/**
* Analyzes the device for errors when the device is
@@ -301,7 +301,7 @@
/**
* The D-Bus bus object
*/
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/**
* Map of device instance to the instance specific data