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: Ie911ba4e02ffc382e6f6440dd3ae8e3108fde2f7
diff --git a/service/src/mainapp.cpp b/service/src/mainapp.cpp
index 54bdf33..3749c93 100644
--- a/service/src/mainapp.cpp
+++ b/service/src/mainapp.cpp
@@ -399,12 +399,12 @@
{
// Monitor Boot finished signal and set the checkpoint 9 to
// notify CPLD about BMC boot finish.
- auto bootFinishedSignal = std::make_unique<sdbusplus::bus::match::match>(
- static_cast<sdbusplus::bus::bus&>(*conn),
+ auto bootFinishedSignal = std::make_unique<sdbusplus::bus::match_t>(
+ static_cast<sdbusplus::bus_t&>(*conn),
"type='signal',"
"member='StartupFinished',path='/org/freedesktop/systemd1',"
"interface='org.freedesktop.systemd1.Manager'",
- [&server, &conn](sdbusplus::message::message& msg) {
+ [&server, &conn](sdbusplus::message_t& msg) {
if (!finishedSettingChkPoint)
{
phosphor::logging::log<phosphor::logging::level::INFO>(
@@ -419,13 +419,13 @@
// Capture the Chassis state and Start the monitor timer
// if state changed to 'On'. Run timer until OS boot.
// Stop timer if state changed to 'Off'.
- static auto matchChassisState = sdbusplus::bus::match::match(
- static_cast<sdbusplus::bus::bus&>(*conn),
+ static auto matchChassisState = sdbusplus::bus::match_t(
+ static_cast<sdbusplus::bus_t&>(*conn),
"type='signal',member='PropertiesChanged', "
"interface='org.freedesktop.DBus.Properties', "
"sender='xyz.openbmc_project.State.Chassis', "
"arg0namespace='xyz.openbmc_project.State.Chassis'",
- [&server, &conn](sdbusplus::message::message& message) {
+ [&server, &conn](sdbusplus::message_t& message) {
std::string intfName;
std::map<std::string, std::variant<std::string>> properties;
message.read(intfName, properties);
@@ -462,13 +462,13 @@
// Capture the Host state and Start the monitor timer
// if state changed to 'Running'. Run timer until OS boot.
// Stop timer if state changed to 'Off'.
- static auto matchHostState = sdbusplus::bus::match::match(
- static_cast<sdbusplus::bus::bus&>(*conn),
+ static auto matchHostState = sdbusplus::bus::match_t(
+ static_cast<sdbusplus::bus_t&>(*conn),
"type='signal',member='PropertiesChanged', "
"interface='org.freedesktop.DBus.Properties', "
"sender='xyz.openbmc_project.State.Chassis', "
"arg0namespace='xyz.openbmc_project.State.Host'",
- [&server, &conn](sdbusplus::message::message& message) {
+ [&server, &conn](sdbusplus::message_t& message) {
std::string intfName;
std::map<std::string, std::variant<std::string>> properties;
message.read(intfName, properties);
@@ -507,13 +507,13 @@
// Capture the OS state change and stop monitor timer
// if OS boots completly or becomes Inactive.
// start timer in other cases to mnitor states.
- static auto matchOsState = sdbusplus::bus::match::match(
- static_cast<sdbusplus::bus::bus&>(*conn),
+ static auto matchOsState = sdbusplus::bus::match_t(
+ static_cast<sdbusplus::bus_t&>(*conn),
"type='signal',member='PropertiesChanged', "
"interface='org.freedesktop.DBus.Properties', "
"sender='xyz.openbmc_project.State.Chassis', "
"arg0namespace='xyz.openbmc_project.State.OperatingSystem.Status'",
- [&server, &conn](sdbusplus::message::message& message) {
+ [&server, &conn](sdbusplus::message_t& message) {
std::string intfName;
std::map<std::string, std::variant<std::string>> properties;
message.read(intfName, properties);