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: Ie7375047bd567aa052d3bd35a6dd7008779a05b4
diff --git a/src/firmware-update.cpp b/src/firmware-update.cpp
index ea51288..b622d31 100644
--- a/src/firmware-update.cpp
+++ b/src/firmware-update.cpp
@@ -376,11 +376,11 @@
std::shared_ptr<sdbusplus::asio::connection> busp = getSdBus();
fwUpdateState = fwStateProgram;
progressPercent = 0;
- match = std::make_shared<sdbusplus::bus::match::match>(
+ match = std::make_shared<sdbusplus::bus::match_t>(
*busp,
sdbusplus::bus::match::rules::propertiesChanged(
objPath, "xyz.openbmc_project.Software.ActivationProgress"),
- [&](sdbusplus::message::message& msg) {
+ [&](sdbusplus::message_t& msg) {
std::map<std::string, ipmi::DbusVariant> props;
std::vector<std::string> inVal;
std::string iface;
@@ -445,7 +445,7 @@
protected:
std::shared_ptr<sdbusplus::asio::connection> busp;
- std::shared_ptr<sdbusplus::bus::match::match> match;
+ std::shared_ptr<sdbusplus::bus::match_t> match;
uint8_t fwUpdateState = 0;
uint8_t progressPercent = 0;
bool deferRestartState = false;
@@ -561,7 +561,7 @@
}
static void postTransferCompleteHandler(
- std::unique_ptr<sdbusplus::bus::match::match>& fwUpdateMatchSignal)
+ std::unique_ptr<sdbusplus::bus::match_t>& fwUpdateMatchSignal)
{
// Setup timer for watching signal
static phosphor::Timer timer(
@@ -579,7 +579,7 @@
timer.start(std::chrono::microseconds(5000000), false);
// callback function for capturing signal
- auto callback = [&](sdbusplus::message::message& m) {
+ auto callback = [&](sdbusplus::message_t& m) {
bool flag = false;
std::vector<std::pair<
@@ -638,7 +638,7 @@
};
// Adding matcher
- fwUpdateMatchSignal = std::make_unique<sdbusplus::bus::match::match>(
+ fwUpdateMatchSignal = std::make_unique<sdbusplus::bus::match_t>(
*getSdBus(),
"interface='org.freedesktop.DBus.ObjectManager',type='signal',"
"member='InterfacesAdded',path='/xyz/openbmc_project/software'",
@@ -650,7 +650,7 @@
// the code gets to this point, the file should be transferred start the
// request (creating a new file in /tmp/images causes the update manager to
// check if it is ready for activation)
- static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateMatchSignal;
+ static std::unique_ptr<sdbusplus::bus::match_t> fwUpdateMatchSignal;
postTransferCompleteHandler(fwUpdateMatchSignal);
std::filesystem::rename(
uri, "/tmp/images/" +