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: I8c73d8de128b218ee4885a5e133314ad5d9a0ff8
diff --git a/dbusUtils.hpp b/dbusUtils.hpp
index 72546e1..52d19c1 100644
--- a/dbusUtils.hpp
+++ b/dbusUtils.hpp
@@ -13,7 +13,7 @@
using Value = std::variant<int64_t, double, std::string, bool>;
-std::string getService(sdbusplus::bus::bus& bus, const std::string& path,
+std::string getService(sdbusplus::bus_t& bus, const std::string& path,
const char* intf)
{
/* Get mapper object for sensor path */
@@ -30,7 +30,7 @@
auto msg = bus.call(mapper);
msg.read(resp);
}
- catch (const sdbusplus::exception::exception& ex)
+ catch (const sdbusplus::exception_t& ex)
{
if (ex.name() == std::string(sdbusplus::xyz::openbmc_project::Common::
Error::ResourceNotFound::errName))
@@ -53,7 +53,7 @@
template <typename T>
-T getDbusProperty(sdbusplus::bus::bus& bus, const std::string& service,
+T getDbusProperty(sdbusplus::bus_t& bus, const std::string& service,
const std::string& path, const std::string& intf,
const std::string& property)
{
@@ -70,7 +70,7 @@
auto msg = bus.call(method);
msg.read(value);
}
- catch (const sdbusplus::exception::exception& ex)
+ catch (const sdbusplus::exception_t& ex)
{
return std::numeric_limits<T>::quiet_NaN();
}