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: I2d7ce287e0adc0be60796a80e9bb4cca908434ce
diff --git a/sdbusplus.hpp b/sdbusplus.hpp
index 186a88d..c0a1848 100644
--- a/sdbusplus.hpp
+++ b/sdbusplus.hpp
@@ -20,10 +20,10 @@
{
public:
template <typename T>
- static auto
- setProperty(sdbusplus::bus::bus& bus, const std::string& busName,
- const std::string& objPath, const std::string& interface,
- const std::string& property, const T& value)
+ static auto setProperty(sdbusplus::bus_t& bus, const std::string& busName,
+ const std::string& objPath,
+ const std::string& interface,
+ const std::string& property, const T& value)
{
std::variant<T> data = value;
@@ -47,10 +47,10 @@
}
template <typename Property>
- static auto
- getProperty(sdbusplus::bus::bus& bus, const std::string& busName,
- const std::string& objPath, const std::string& interface,
- const std::string& property)
+ static auto getProperty(sdbusplus::bus_t& bus, const std::string& busName,
+ const std::string& objPath,
+ const std::string& interface,
+ const std::string& property)
{
auto methodCall = bus.new_method_call(busName.c_str(), objPath.c_str(),
DBUS_PROPERTY_IFACE, "Get");
@@ -76,7 +76,7 @@
}
template <typename... Args>
- static auto CallMethod(sdbusplus::bus::bus& bus, const std::string& busName,
+ static auto CallMethod(sdbusplus::bus_t& bus, const std::string& busName,
const std::string& objPath,
const std::string& interface,
const std::string& method, Args&&... args)