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
Change-Id: I32e5f22829c03325295b180504ab5e3b5745dc95
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/inc/button_handler.hpp b/inc/button_handler.hpp
index 819a433..1f74f18 100644
--- a/inc/button_handler.hpp
+++ b/inc/button_handler.hpp
@@ -91,7 +91,7 @@
* @param[in] msg - sdbusplus message from signal
*/
- void debugHostSelectorReleased(sdbusplus::message::message& msg);
+ void debugHostSelectorReleased(sdbusplus::message_t& msg);
/**
* @brief Checks if system is powered on
diff --git a/inc/debugHostSelector_button.hpp b/inc/debugHostSelector_button.hpp
index bdd9dfa..fa13d02 100644
--- a/inc/debugHostSelector_button.hpp
+++ b/inc/debugHostSelector_button.hpp
@@ -24,8 +24,8 @@
{
public:
- DebugHostSelector(sdbusplus::bus::bus& bus, const char* path,
- EventPtr& event, buttonConfig& buttonCfg) :
+ DebugHostSelector(sdbusplus::bus_t& bus, const char* path, EventPtr& event,
+ buttonConfig& buttonCfg) :
sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Chassis::Buttons::server::Button>(
bus, path, action::defer_emit),
diff --git a/src/button_handler.cpp b/src/button_handler.cpp
index 4a477fa..29ae1bc 100644
--- a/src/button_handler.cpp
+++ b/src/button_handler.cpp
@@ -113,7 +113,7 @@
this, std::placeholders::_1));
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
// The button wasn't implemented
}
@@ -136,7 +136,7 @@
result.read(objectData);
return objectData.begin()->first;
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
return std::string();
}
@@ -409,20 +409,20 @@
method.append(HSPositionVariant);
result = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
lg2::error("Error modifying host selector position : {ERROR}", "ERROR",
e);
}
}
-void Handler::debugHostSelectorReleased(sdbusplus::message::message& /* msg */)
+void Handler::debugHostSelectorReleased(sdbusplus::message_t& /* msg */)
{
try
{
increaseHostSelectorPosition();
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
lg2::error(
"Failed power process debug host selector button press : {ERROR}",