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
Change-Id: Ie38db6cd54835ce4f3a4eae520e9ad834e0751c1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/healthMonitor.cpp b/healthMonitor.cpp
index ec83ac5..1477323 100644
--- a/healthMonitor.cpp
+++ b/healthMonitor.cpp
@@ -43,7 +43,7 @@
// Example values for iface:
// BMC_CONFIGURATION
// BMC_INVENTORY_ITEM
-std::vector<std::string> findPathsWithType(sdbusplus::bus::bus& bus,
+std::vector<std::string> findPathsWithType(sdbusplus::bus_t& bus,
const std::string& iface)
{
PHOSPHOR_LOG2_USING;
@@ -52,7 +52,7 @@
// Find all BMCs (DBus objects implementing the
// Inventory.Item.Bmc interface that may be created by
// configuring the Inventory Manager)
- sdbusplus::message::message msg = bus.new_method_call(
+ sdbusplus::message_t msg = bus.new_method_call(
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetSubTreePaths");
@@ -689,8 +689,7 @@
} // namespace phosphor
void sensorRecreateTimerCallback(
- std::shared_ptr<boost::asio::deadline_timer> timer,
- sdbusplus::bus::bus& bus)
+ std::shared_ptr<boost::asio::deadline_timer> timer, sdbusplus::bus_t& bus)
{
timer->expires_from_now(boost::posix_time::seconds(TIMER_INTERVAL));
timer->async_wait([timer, &bus](const boost::system::error_code& ec) {
@@ -765,7 +764,7 @@
sdbusplus::bus::match_t>(
static_cast<sdbusplus::bus_t&>(*conn),
sdbusplus::bus::match::rules::interfacesAdded(),
- [conn](sdbusplus::message::message& msg) {
+ [conn](sdbusplus::message_t& msg) {
using Association =
std::tuple<std::string, std::string, std::string>;
using InterfacesAdded = std::vector<std::pair<
diff --git a/healthMonitor.hpp b/healthMonitor.hpp
index 321e3a5..bba3b52 100644
--- a/healthMonitor.hpp
+++ b/healthMonitor.hpp
@@ -64,7 +64,7 @@
sdbusplus::server::object_t<ValueIface, CriticalInterface, WarningInterface,
AssociationDefinitionInterface>;
-using BmcInterface = sdbusplus::server::object::object<
+using BmcInterface = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Inventory::Item::server::Bmc>;
using AssociationTuple = std::tuple<std::string, std::string, std::string>;
@@ -139,7 +139,7 @@
{
public:
BmcInventory() = delete;
- BmcInventory(sdbusplus::bus::bus& bus, const char* objPath) :
+ BmcInventory(sdbusplus::bus_t& bus, const char* objPath) :
BmcInterface(bus, objPath)
{}
};