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: Ief05bd757cffb1453e058a719ee4b060861752e7
diff --git a/utility.cpp b/utility.cpp
index 04cb6ae..ad8e232 100644
--- a/utility.cpp
+++ b/utility.cpp
@@ -34,7 +34,7 @@
using json = nlohmann::json;
std::string getService(const std::string& path, const std::string& interface,
- sdbusplus::bus::bus& bus, bool logError)
+ sdbusplus::bus_t& bus, bool logError)
{
auto method = bus.new_method_call(MAPPER_BUSNAME, MAPPER_PATH,
MAPPER_INTERFACE, "GetObject");
@@ -63,8 +63,7 @@
return response.begin()->first;
}
-DbusPropertyMap getAllProperties(sdbusplus::bus::bus& bus,
- const std::string& path,
+DbusPropertyMap getAllProperties(sdbusplus::bus_t& bus, const std::string& path,
const std::string& interface,
const std::string& service)
{
@@ -88,7 +87,7 @@
return properties;
}
-DbusSubtree getSubTree(sdbusplus::bus::bus& bus, const std::string& path,
+DbusSubtree getSubTree(sdbusplus::bus_t& bus, const std::string& path,
const std::string& interface, int32_t depth)
{
auto mapperCall = bus.new_method_call(MAPPER_BUSNAME, MAPPER_PATH,
@@ -157,7 +156,7 @@
return type;
}
-bool isPoweredOn(sdbusplus::bus::bus& bus, bool defaultState)
+bool isPoweredOn(sdbusplus::bus_t& bus, bool defaultState)
{
int32_t state = defaultState;
@@ -175,7 +174,7 @@
return state != 0;
}
-std::vector<std::string> getPSUInventoryPaths(sdbusplus::bus::bus& bus)
+std::vector<std::string> getPSUInventoryPaths(sdbusplus::bus_t& bus)
{
std::vector<std::string> paths;
auto method = bus.new_method_call(MAPPER_BUSNAME, MAPPER_PATH,