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: Ibd2a0b512bfb7caf65bfab64b271d194da520aac
diff --git a/softoff/mainapp.cpp b/softoff/mainapp.cpp
index 563ccd1..7ff90b0 100644
--- a/softoff/mainapp.cpp
+++ b/softoff/mainapp.cpp
@@ -33,7 +33,7 @@
auto bus = sdbusplus::bus::new_default();
// Add systemd object manager.
- sdbusplus::server::manager::manager(bus, SOFTOFF_OBJPATH);
+ sdbusplus::server::manager_t(bus, SOFTOFF_OBJPATH);
// Get default event loop
auto event = sdeventplus::Event::get_default();
diff --git a/softoff/softoff.cpp b/softoff/softoff.cpp
index e6ed0eb..333d4d7 100644
--- a/softoff/softoff.cpp
+++ b/softoff/softoff.cpp
@@ -53,7 +53,7 @@
}
// Function called on host control signals
-void SoftPowerOff::hostControlEvent(sdbusplus::message::message& msg)
+void SoftPowerOff::hostControlEvent(sdbusplus::message_t& msg)
{
std::string cmdCompleted{};
std::string cmdStatus{};
diff --git a/softoff/softoff.hpp b/softoff/softoff.hpp
index bf3fbdd..23ff5db 100644
--- a/softoff/softoff.hpp
+++ b/softoff/softoff.hpp
@@ -35,8 +35,7 @@
* @param[in] event - sd_event handler
* @param[in] objPath - The Dbus path hosting SoftPowerOff function
*/
- SoftPowerOff(sdbusplus::bus::bus& bus, sd_event* event,
- const char* objPath) :
+ SoftPowerOff(sdbusplus::bus_t& bus, sd_event* event, const char* objPath) :
SoftPowerOffInherit(bus, objPath,
SoftPowerOffInherit::action::defer_emit),
bus(bus), timer(event),
@@ -99,7 +98,7 @@
static constexpr auto HOST_IPMI_INTF = "org.openbmc.HostIpmi";
/* @brief sdbusplus handle */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Reference to Timer object */
Timer timer;
@@ -139,7 +138,7 @@
* @param[in] msg - Data associated with subscribed signal
*
*/
- void hostControlEvent(sdbusplus::message::message& msg);
+ void hostControlEvent(sdbusplus::message_t& msg);
};
} // namespace ipmi
} // namespace phosphor