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: I9cedddf4dc9b224ecbc2f68e6b00c0ab1885a826
diff --git a/utils.hpp b/utils.hpp
index 9639cbf..6f2fc62 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -23,7 +23,7 @@
* @return The value of the property
*/
template <typename T>
-T getProperty(sdbusplus::bus::bus& bus, const char* service, const char* path,
+T getProperty(sdbusplus::bus_t& bus, const char* service, const char* path,
const char* interface, const char* propertyName)
{
auto method = bus.new_method_call(service, path,
@@ -36,7 +36,7 @@
reply.read(value);
return std::get<T>(value);
}
- catch (const sdbusplus::exception::exception& ex)
+ catch (const sdbusplus::exception_t& ex)
{
lg2::error("GetProperty call failed, path:{PATH}, interface:{INTF}, "
"propertyName:{NAME}, error:{ERROR}",
@@ -54,7 +54,7 @@
*
* @return The name of the service
*/
-std::string getService(sdbusplus::bus::bus& bus, const char* path,
+std::string getService(sdbusplus::bus_t& bus, const char* path,
const char* interface);
/** @brief Convert a string to enum Mode