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: Id93b8dfb6c81f62647dd56f1ce04c1a4fda4f7f4
diff --git a/inc/post_code.hpp b/inc/post_code.hpp
index 3e82ab5..462e8cd 100644
--- a/inc/post_code.hpp
+++ b/inc/post_code.hpp
@@ -90,7 +90,7 @@
PostCodeDataHolder postcodeDataHolderObj =
PostCodeDataHolder::getInstance();
- PostCode(sdbusplus::bus::bus &bus, const char *path, EventPtr & /*event*/) :
+ PostCode(sdbusplus::bus_t &bus, const char *path, EventPtr & /*event*/) :
sdbusplus::server::object_t<post_code, delete_all>(bus, path), bus(bus),
propertiesChangedSignalRaw(
bus,
@@ -101,7 +101,7 @@
std::to_string(postcodeDataHolderObj.node)) +
sdbusplus::bus::match::rules::interface(
postcodeDataHolderObj.PropertiesIntf),
- [this](sdbusplus::message::message &msg) {
+ [this](sdbusplus::message_t &msg) {
std::string objectName;
std::map<std::string, std::variant<postcode_t>> msgData;
msg.read(objectName, msgData);
@@ -124,7 +124,7 @@
std::to_string(postcodeDataHolderObj.node)) +
sdbusplus::bus::match::rules::interface(
postcodeDataHolderObj.PropertiesIntf),
- [this](sdbusplus::message::message &msg) {
+ [this](sdbusplus::message_t &msg) {
std::string objectName;
std::map<std::string, std::variant<std::string>> msgData;
msg.read(objectName, msgData);
@@ -189,7 +189,7 @@
void incrBootCycle();
uint16_t getBootNum(const uint16_t index) const;
- sdbusplus::bus::bus &bus;
+ sdbusplus::bus_t &bus;
std::chrono::time_point<std::chrono::steady_clock> firstPostCodeTimeSteady;
uint64_t firstPostCodeUsSinceEpoch;
std::map<uint64_t, postcode_t> postCodes;
diff --git a/src/main.cpp b/src/main.cpp
index d808498..7048dd2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -57,7 +57,7 @@
EventPtr eventP{event};
event = nullptr;
- sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
+ sdbusplus::bus_t bus = sdbusplus::bus::new_default();
sdbusplus::server::manager_t m{bus, DBUS_OBJECT_NAME};
intfName = DBUS_INTF_NAME + std::to_string(postcodeDataHolderObj.node);