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: Ie530f2c63000bbfac7c5fbbc74ebe6bc8c07fb1a
diff --git a/src/activation.hpp b/src/activation.hpp
index 622474a..6af99cd 100644
--- a/src/activation.hpp
+++ b/src/activation.hpp
@@ -27,9 +27,9 @@
namespace sdbusRule = sdbusplus::bus::match::rules;
-using ActivationBlocksTransitionInherit = sdbusplus::server::object::object<
- sdbusplus::xyz::openbmc_project::Software::server::
- ActivationBlocksTransition>;
+using ActivationBlocksTransitionInherit =
+ sdbusplus::server::object_t<sdbusplus::xyz::openbmc_project::Software::
+ server::ActivationBlocksTransition>;
/** @class ActivationBlocksTransition
* @brief OpenBMC ActivationBlocksTransition implementation.
@@ -44,8 +44,7 @@
* @param[in] bus - The Dbus bus object
* @param[in] path - The Dbus object path
*/
- ActivationBlocksTransition(sdbusplus::bus::bus& bus,
- const std::string& path) :
+ ActivationBlocksTransition(sdbusplus::bus_t& bus, const std::string& path) :
ActivationBlocksTransitionInherit(bus, path.c_str(),
action::emit_interface_added),
bus(bus)
@@ -59,7 +58,7 @@
}
private:
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Enables a Guard that blocks any BMC reboot commands */
void enableRebootGuard();
@@ -68,7 +67,7 @@
void disableRebootGuard();
};
-using ActivationProgressInherit = sdbusplus::server::object::object<
+using ActivationProgressInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Software::server::ActivationProgress>;
class ActivationProgress : public ActivationProgressInherit
@@ -79,7 +78,7 @@
* @param[in] bus - The Dbus bus object
* @param[in] path - The Dbus object path
*/
- ActivationProgress(sdbusplus::bus::bus& bus, const std::string& path) :
+ ActivationProgress(sdbusplus::bus_t& bus, const std::string& path) :
ActivationProgressInherit(bus, path.c_str(),
action::emit_interface_added)
{
@@ -87,7 +86,7 @@
}
};
-using ActivationInherit = sdbusplus::server::object::object<
+using ActivationInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Software::server::ExtendedVersion,
sdbusplus::xyz::openbmc_project::Software::server::Activation,
sdbusplus::xyz::openbmc_project::Association::server::Definitions,
@@ -114,7 +113,7 @@
* @param[in] assocs - Association objects
* @param[in] filePath - The image filesystem path
*/
- Activation(sdbusplus::bus::bus& bus, const std::string& objPath,
+ Activation(sdbusplus::bus_t& bus, const std::string& objPath,
const std::string& versionId, const std::string& extVersion,
Status activationStatus, const AssociationList& assocs,
const std::string& filePath,
@@ -188,7 +187,7 @@
* @param[in] msg - Data associated with subscribed signal
*
*/
- void unitStateChange(sdbusplus::message::message& msg);
+ void unitStateChange(sdbusplus::message_t& msg);
/**
* @brief Delete the version from Image Manager and the
@@ -237,7 +236,7 @@
std::string getUpdateService(const std::string& psuInventoryPath);
/** @brief Persistent sdbusplus DBus bus connection */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Persistent DBus object path */
std::string objPath;