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: Id8497e7fed0c6a278e29528d07486f5159687696
diff --git a/presence/gpio_presence.cpp b/presence/gpio_presence.cpp
index 765ca55..e473fea 100644
--- a/presence/gpio_presence.cpp
+++ b/presence/gpio_presence.cpp
@@ -28,7 +28,7 @@
constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper";
std::string getService(const std::string& path, const std::string& interface,
- sdbusplus::bus::bus& bus)
+ sdbusplus::bus_t& bus)
{
auto mapperCall = bus.new_method_call(MAPPER_BUSNAME, MAPPER_PATH,
MAPPER_INTERFACE, "GetObject");
diff --git a/presence/gpio_presence.hpp b/presence/gpio_presence.hpp
index ec26fde..4b9b24c 100644
--- a/presence/gpio_presence.hpp
+++ b/presence/gpio_presence.hpp
@@ -5,6 +5,7 @@
#include <cstdlib>
#include <experimental/filesystem>
+#include <sdbusplus/bus.hpp>
#include <string>
namespace phosphor
@@ -64,7 +65,7 @@
* @param[in] handler - IO callback handler. Defaults to one in this
* class
*/
- Presence(sdbusplus::bus::bus& bus, const std::string& inventory,
+ Presence(sdbusplus::bus_t& bus, const std::string& inventory,
const std::string& path, const unsigned int key,
const std::string& name, EventPtr& event,
const std::vector<Driver>& drivers,
@@ -117,7 +118,7 @@
ObjectMap getObjectMap(bool present);
/** @brief Connection for sdbusplus bus */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/**
* @brief Read the GPIO device to determine initial presence and set
@@ -171,7 +172,7 @@
* @return The service name
*/
std::string getService(const std::string& path, const std::string& interface,
- sdbusplus::bus::bus& bus);
+ sdbusplus::bus_t& bus);
} // namespace presence
} // namespace gpio