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: I5055fac459cb021ea94686e058e233bcc476a32d
diff --git a/subprojects/acpi-power-state-daemon/acpi_power_state.cpp b/subprojects/acpi-power-state-daemon/acpi_power_state.cpp
index 9b5d5d2..f34bda3 100644
--- a/subprojects/acpi-power-state-daemon/acpi_power_state.cpp
+++ b/subprojects/acpi-power-state-daemon/acpi_power_state.cpp
@@ -40,7 +40,7 @@
sdbusplus::xyz::openbmc_project::Control::Power::server::ACPIPowerState>;
// Pulled and modified from arcadia-leds/poll_gpio.cpp
-static void startSystemdUnit(sdbusplus::bus::bus& bus, const std::string& unit)
+static void startSystemdUnit(sdbusplus::bus_t& bus, const std::string& unit)
{
auto method = bus.new_method_call(systemdBusName, systemdPath,
systemdInterface, "StartUnit");
@@ -51,9 +51,9 @@
struct ACPIPowerState : ACPIPowerStateInherit
{
// Keep track of the bus for starting/stopping systemd units
- sdbusplus::bus::bus& Bus;
+ sdbusplus::bus_t& Bus;
- ACPIPowerState(sdbusplus::bus::bus& bus, const char* path) :
+ ACPIPowerState(sdbusplus::bus_t& bus, const char* path) :
ACPIPowerStateInherit(bus, path), Bus(bus)
{}
diff --git a/subprojects/ncsid/src/net_config.cpp b/subprojects/ncsid/src/net_config.cpp
index 3b632c3..5b5ae93 100644
--- a/subprojects/ncsid/src/net_config.cpp
+++ b/subprojects/ncsid/src/net_config.cpp
@@ -75,8 +75,8 @@
bus(sdbusplus::bus::new_default())
{}
-sdbusplus::message::message
- PhosphorConfig::new_networkd_call(sdbusplus::bus::bus* dbus, bool get) const
+sdbusplus::message_t PhosphorConfig::new_networkd_call(sdbusplus::bus_t* dbus,
+ bool get) const
{
auto networkd_call =
dbus->new_method_call(NETWORK_SERVICE, iface_path_.c_str(),
diff --git a/subprojects/ncsid/src/net_config.h b/subprojects/ncsid/src/net_config.h
index 11ec90e..7aeb18b 100644
--- a/subprojects/ncsid/src/net_config.h
+++ b/subprojects/ncsid/src/net_config.h
@@ -72,8 +72,8 @@
virtual int set_nic_hostless(bool is_nic_hostless) override;
private:
- sdbusplus::message::message new_networkd_call(sdbusplus::bus::bus* dbus,
- bool get = false) const;
+ sdbusplus::message_t new_networkd_call(sdbusplus::bus_t* dbus,
+ bool get = false) const;
const std::string iface_name_;
const std::string iface_path_;
@@ -95,7 +95,7 @@
// Holds a reference to the bus for issuing commands to update network
// config
- sdbusplus::bus::bus bus;
+ sdbusplus::bus_t bus;
};
} // namespace net
diff --git a/subprojects/nemora-postd/src/host_manager.cpp b/subprojects/nemora-postd/src/host_manager.cpp
index b27ac21..eb0a2b9 100644
--- a/subprojects/nemora-postd/src/host_manager.cpp
+++ b/subprojects/nemora-postd/src/host_manager.cpp
@@ -39,7 +39,7 @@
post_poller_ = std::make_unique<std::thread>(post_poller_thread, this);
}
-int HostManager::DbusHandleSignal(sdbusplus::message::message& msg)
+int HostManager::DbusHandleSignal(sdbusplus::message_t& msg)
{
log<level::INFO>("Property Changed!");
std::string msgSensor, busName{POSTCODE_BUSNAME};
diff --git a/subprojects/nemora-postd/src/nemora.cpp b/subprojects/nemora-postd/src/nemora.cpp
index c5cff87..472995a 100644
--- a/subprojects/nemora-postd/src/nemora.cpp
+++ b/subprojects/nemora-postd/src/nemora.cpp
@@ -56,7 +56,7 @@
return false;
}
auto dbus = sdbusplus::bus::new_default();
- sdbusplus::message::message reply;
+ sdbusplus::message_t reply;
try
{