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: Idab99ed8fdb9bdf5cc0e130d576f55d256df9cce
diff --git a/strgfnhandler.cpp b/strgfnhandler.cpp
index 9ba2ad3..4532a30 100644
--- a/strgfnhandler.cpp
+++ b/strgfnhandler.cpp
@@ -101,7 +101,7 @@
// We received some bytes. It may be full or partial. Send a valid
// FRU file to the inventory controller on DBus for the correct number
- sdbusplus::bus::bus bus{bus_type};
+ sdbusplus::bus_t bus{bus_type};
bool bmcOnlyFru = false;
validateFRUArea(reqptr->frunum, fruFilename, bus, bmcOnlyFru);
diff --git a/writefrudata.cpp b/writefrudata.cpp
index c749013..5e698c7 100644
--- a/writefrudata.cpp
+++ b/writefrudata.cpp
@@ -127,7 +127,7 @@
* @param[in] path - the object path
* @return the dbus service that owns the interface for that path
*/
-auto getService(sdbusplus::bus::bus& bus, const std::string& intf,
+auto getService(sdbusplus::bus_t& bus, const std::string& intf,
const std::string& path)
{
auto mapperCall =
@@ -144,7 +144,7 @@
auto mapperResponseMsg = bus.call(mapperCall);
mapperResponseMsg.read(mapperResponse);
}
- catch (const sdbusplus::exception::exception& ex)
+ catch (const sdbusplus::exception_t& ex)
{
log<level::ERR>("Exception from sdbus call",
entry("WHAT=%s", ex.what()));
@@ -167,7 +167,7 @@
* @param[in] bus - handle to sdbus for calling methods, etc
* @return return non-zero of failure
*/
-int updateInventory(FruAreaVector& areaVector, sdbusplus::bus::bus& bus)
+int updateInventory(FruAreaVector& areaVector, sdbusplus::bus_t& bus)
{
// Generic error reporter
int rc = 0;
@@ -288,7 +288,7 @@
{
auto inventoryMgrResponseMsg = bus.call(pimMsg);
}
- catch (const sdbusplus::exception::exception& ex)
+ catch (const sdbusplus::exception_t& ex)
{
log<level::ERR>("Error in notify call", entry("WHAT=%s", ex.what()),
entry("SERVICE=%s", service.c_str()),
@@ -624,7 +624,7 @@
}
int validateFRUArea(const uint8_t fruid, const char* fruFilename,
- sdbusplus::bus::bus& bus, const bool bmcOnlyFru)
+ sdbusplus::bus_t& bus, const bool bmcOnlyFru)
{
size_t dataLen = 0;
size_t bytesRead = 0;
diff --git a/writefrudata.hpp b/writefrudata.hpp
index 0628cdf..af3ba1c 100644
--- a/writefrudata.hpp
+++ b/writefrudata.hpp
@@ -51,6 +51,6 @@
* @param[in] bmcOnlyFru - If a particular area accessible only by BMC.
*/
int validateFRUArea(const uint8_t fruid, const char* fruFilename,
- sdbusplus::bus::bus& bus, const bool bmcOnlyFru);
+ sdbusplus::bus_t& bus, const bool bmcOnlyFru);
#endif