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: Ibd2a0b512bfb7caf65bfab64b271d194da520aac
diff --git a/app/watchdog_service.hpp b/app/watchdog_service.hpp
index 141bdb7..1a5486a 100644
--- a/app/watchdog_service.hpp
+++ b/app/watchdog_service.hpp
@@ -94,7 +94,7 @@
private:
/** @brief sdbusplus handle */
- sdbusplus::bus::bus bus;
+ sdbusplus::bus_t bus;
/** @brief The name of the mapped host watchdog service */
static ipmi::ServiceCache wd_service;
diff --git a/apphandler.cpp b/apphandler.cpp
index 8c81dc8..254697b 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -114,7 +114,7 @@
objectTree =
ipmi::getAllDbusObjects(*ctx->bus, softwareRoot, redundancyIntf);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to fetch redundancy object from dbus",
entry("INTERFACE=%s", redundancyIntf),
@@ -178,7 +178,7 @@
bool getCurrentBmcState()
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
// Get the Inventory object implementing the BMC interface
ipmi::DbusObjectInfo bmcObject =
@@ -311,7 +311,7 @@
{
auto s = static_cast<uint8_t>(acpi_state::PowerState::unknown);
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto value = acpi_state::ACPIPowerState::ACPI::Unknown;
@@ -431,7 +431,7 @@
uint8_t sysAcpiState;
uint8_t devAcpiState;
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
try
{
@@ -942,7 +942,7 @@
}
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to fetch object from dbus",
entry("INTERFACE=%s", session::sessionIntf),
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 9b2eb2a..c2ed807 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -142,7 +142,7 @@
constexpr auto powerRestoreIntf =
"xyz.openbmc_project.Control.Power.RestorePolicy";
-sdbusplus::bus::bus dbus(ipmid_get_sd_bus_connection());
+sdbusplus::bus_t dbus(ipmid_get_sd_bus_connection());
namespace cache
{
@@ -187,7 +187,7 @@
// as SETTINGS_MATCH.
// Later SETTINGS_MATCH will be replaced with busname.
- sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection());
+ sdbusplus::bus_t bus(ipmid_get_sd_bus_connection());
auto ipObjectInfo = ipmi::getDbusObject(bus, IP_INTERFACE,
SETTINGS_ROOT, SETTINGS_MATCH);
@@ -529,7 +529,7 @@
",mac="s + mac + ",addressOrigin="s +
addressOrigin;
- sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection());
+ sdbusplus::bus_t bus(ipmid_get_sd_bus_connection());
auto ipObjectInfo = ipmi::getDbusObject(bus, IP_INTERFACE,
SETTINGS_ROOT, SETTINGS_MATCH);
@@ -565,7 +565,7 @@
uint32_t getPOHCounter()
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto chassisStateObj =
ipmi::getDbusObject(bus, chassisPOHStateIntf, chassisStateRoot, match);
@@ -606,7 +606,7 @@
ipmi::PropertyMap properties;
try
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
ipmi::DbusObjectInfo chassisCapObject =
ipmi::getDbusObject(bus, chassisCapIntf);
@@ -773,7 +773,7 @@
try
{
- sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection());
+ sdbusplus::bus_t bus(ipmid_get_sd_bus_connection());
ipmi::DbusObjectInfo chassisCapObject =
ipmi::getDbusObject(bus, chassisCapIntf);
@@ -1062,7 +1062,7 @@
buttonIntf, "Enabled");
buttonDisabled = !std::get<bool>(enabled);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Fail to get button Enabled property",
entry("PATH=%s", buttonPath.c_str()),
diff --git a/dbus-sdr/sdrutils.cpp b/dbus-sdr/sdrutils.cpp
index 7de48a8..abc8671 100644
--- a/dbus-sdr/sdrutils.cpp
+++ b/dbus-sdr/sdrutils.cpp
@@ -36,17 +36,17 @@
static std::shared_ptr<SensorSubTree> sensorTreePtr;
static uint16_t sensorUpdatedIndex = 0;
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- static sdbusplus::bus::match::match sensorAdded(
+ static sdbusplus::bus::match_t sensorAdded(
*dbus,
"type='signal',member='InterfacesAdded',arg0path='/xyz/openbmc_project/"
"sensors/'",
- [](sdbusplus::message::message&) { sensorTreePtr.reset(); });
+ [](sdbusplus::message_t&) { sensorTreePtr.reset(); });
- static sdbusplus::bus::match::match sensorRemoved(
+ static sdbusplus::bus::match_t sensorRemoved(
*dbus,
"type='signal',member='InterfacesRemoved',arg0path='/xyz/"
"openbmc_project/sensors/'",
- [](sdbusplus::message::message&) { sensorTreePtr.reset(); });
+ [](sdbusplus::message_t&) { sensorTreePtr.reset(); });
if (sensorTreePtr)
{
@@ -317,7 +317,7 @@
std::vector<std::string> interfaces;
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- sdbusplus::message::message getObjectMessage =
+ sdbusplus::message_t getObjectMessage =
dbus->new_method_call("xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetObject");
@@ -325,7 +325,7 @@
try
{
- sdbusplus::message::message response = dbus->call(getObjectMessage);
+ sdbusplus::message_t response = dbus->call(getObjectMessage);
response.read(interfacesResponse);
}
catch (const std::exception& e)
@@ -344,14 +344,14 @@
std::map<std::string, Value> properties;
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- sdbusplus::message::message getProperties =
+ sdbusplus::message_t getProperties =
dbus->new_method_call("xyz.openbmc_project.EntityManager", path,
"org.freedesktop.DBus.Properties", "GetAll");
getProperties.append(interface);
try
{
- sdbusplus::message::message response = dbus->call(getProperties);
+ sdbusplus::message_t response = dbus->call(getProperties);
response.read(properties);
}
catch (const std::exception& e)
diff --git a/dbus-sdr/sensorcommands.cpp b/dbus-sdr/sensorcommands.cpp
index 1c19986..522cbb8 100644
--- a/dbus-sdr/sensorcommands.cpp
+++ b/dbus-sdr/sensorcommands.cpp
@@ -111,22 +111,22 @@
void registerSensorFunctions() __attribute__((constructor));
-static sdbusplus::bus::match::match sensorAdded(
+static sdbusplus::bus::match_t sensorAdded(
*getSdBus(),
"type='signal',member='InterfacesAdded',arg0path='/xyz/openbmc_project/"
"sensors/'",
- [](sdbusplus::message::message&) {
+ [](sdbusplus::message_t&) {
getSensorTree().clear();
sdrLastAdd = std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
.count();
});
-static sdbusplus::bus::match::match sensorRemoved(
+static sdbusplus::bus::match_t sensorRemoved(
*getSdBus(),
"type='signal',member='InterfacesRemoved',arg0path='/xyz/openbmc_project/"
"sensors/'",
- [](sdbusplus::message::message&) {
+ [](sdbusplus::message_t&) {
getSensorTree().clear();
sdrLastRemove = std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
@@ -139,11 +139,11 @@
std::string, boost::container::flat_map<std::string, std::optional<bool>>>
thresholdDeassertMap;
-static sdbusplus::bus::match::match thresholdChanged(
+static sdbusplus::bus::match_t thresholdChanged(
*getSdBus(),
"type='signal',member='PropertiesChanged',interface='org.freedesktop.DBus."
"Properties',arg0namespace='xyz.openbmc_project.Sensor.Threshold'",
- [](sdbusplus::message::message& m) {
+ [](sdbusplus::message_t& m) {
boost::container::flat_map<std::string, std::variant<bool, double>>
values;
m.read(std::string(), values);
diff --git a/dbus-sdr/storagecommands.cpp b/dbus-sdr/storagecommands.cpp
index b0849ce..6a50edf 100644
--- a/dbus-sdr/storagecommands.cpp
+++ b/dbus-sdr/storagecommands.cpp
@@ -120,7 +120,7 @@
static uint8_t writeAddr = 0XFF;
std::unique_ptr<phosphor::Timer> writeTimer = nullptr;
-static std::vector<sdbusplus::bus::match::match> fruMatches;
+static std::vector<sdbusplus::bus::match_t> fruMatches;
ManagedObjectType frus;
@@ -138,13 +138,13 @@
}
lastDevId = 0xFF;
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- sdbusplus::message::message writeFru = dbus->new_method_call(
+ sdbusplus::message_t writeFru = dbus->new_method_call(
fruDeviceServiceName, "/xyz/openbmc_project/FruDevice",
"xyz.openbmc_project.FruDeviceManager", "WriteFru");
writeFru.append(writeBus, writeAddr, fruCache);
try
{
- sdbusplus::message::message writeFruResp = dbus->call(writeFru);
+ sdbusplus::message_t writeFruResp = dbus->call(writeFru);
}
catch (const sdbusplus::exception_t&)
{
@@ -313,7 +313,7 @@
fruMatches.emplace_back(*bus,
"type='signal',arg0path='/xyz/openbmc_project/"
"FruDevice/',member='InterfacesAdded'",
- [](sdbusplus::message::message& message) {
+ [](sdbusplus::message_t& message) {
sdbusplus::message::object_path path;
ObjectType object;
try
@@ -339,7 +339,7 @@
fruMatches.emplace_back(*bus,
"type='signal',arg0path='/xyz/openbmc_project/"
"FruDevice/',member='InterfacesRemoved'",
- [](sdbusplus::message::message& message) {
+ [](sdbusplus::message_t& message) {
sdbusplus::message::object_path path;
std::set<std::string> interfaces;
try
@@ -1164,13 +1164,13 @@
// Reload rsyslog so it knows to start new log files
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- sdbusplus::message::message rsyslogReload = dbus->new_method_call(
+ sdbusplus::message_t rsyslogReload = dbus->new_method_call(
"org.freedesktop.systemd1", "/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager", "ReloadUnit");
rsyslogReload.append("rsyslog.service", "replace");
try
{
- sdbusplus::message::message reloadResponse = dbus->call(rsyslogReload);
+ sdbusplus::message_t reloadResponse = dbus->call(rsyslogReload);
}
catch (const sdbusplus::exception_t& e)
{
diff --git a/dcmihandler.cpp b/dcmihandler.cpp
index e476cfb..31f9224 100644
--- a/dcmihandler.cpp
+++ b/dcmihandler.cpp
@@ -69,7 +69,7 @@
return (gDCMIPowerMgmtSupported == data.value(gDCMIPowerMgmtCapability, 0));
}
-uint32_t getPcap(sdbusplus::bus::bus& bus)
+uint32_t getPcap(sdbusplus::bus_t& bus)
{
auto settingService = ipmi::getService(bus, PCAP_INTERFACE, PCAP_PATH);
@@ -90,7 +90,7 @@
return std::get<uint32_t>(pcap);
}
-bool getPcapEnabled(sdbusplus::bus::bus& bus)
+bool getPcapEnabled(sdbusplus::bus_t& bus)
{
auto settingService = ipmi::getService(bus, PCAP_INTERFACE, PCAP_PATH);
@@ -111,7 +111,7 @@
return std::get<bool>(pcapEnabled);
}
-void setPcap(sdbusplus::bus::bus& bus, const uint32_t powerCap)
+void setPcap(sdbusplus::bus_t& bus, const uint32_t powerCap)
{
auto service = ipmi::getService(bus, PCAP_INTERFACE, PCAP_PATH);
@@ -130,7 +130,7 @@
}
}
-void setPcapEnable(sdbusplus::bus::bus& bus, bool enabled)
+void setPcapEnable(sdbusplus::bus_t& bus, bool enabled)
{
auto service = ipmi::getService(bus, PCAP_INTERFACE, PCAP_PATH);
@@ -156,7 +156,7 @@
static constexpr auto mapperIface = "xyz.openbmc_project.ObjectMapper";
static constexpr auto inventoryRoot = "/xyz/openbmc_project/inventory/";
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto depth = 0;
auto mapperCall = bus.new_method_call(mapperBusName, mapperObjPath,
@@ -184,7 +184,7 @@
std::string readAssetTag()
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
dcmi::assettag::ObjectTree objectTree;
// Read the object tree with the inventory root to figure out the object
@@ -212,7 +212,7 @@
void writeAssetTag(const std::string& assetTag)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
dcmi::assettag::ObjectTree objectTree;
// Read the object tree with the inventory root to figure out the object
@@ -236,7 +236,7 @@
std::string getHostName(void)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto service = ipmi::getService(bus, networkConfigIntf, networkConfigObj);
auto value = ipmi::getDbusProperty(bus, service, networkConfigObj,
@@ -247,7 +247,7 @@
bool getDHCPEnabled()
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto ethdevice = ipmi::getChannelName(ethernetDefaultChannelNum);
auto ethernetObj =
@@ -261,7 +261,7 @@
bool getDHCPOption(std::string prop)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto service = ipmi::getService(bus, dhcpIntf, dhcpObj);
auto value = ipmi::getDbusProperty(bus, service, dhcpObj, dhcpIntf, prop);
@@ -271,7 +271,7 @@
void setDHCPOption(std::string prop, bool value)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto service = ipmi::getService(bus, dhcpIntf, dhcpObj);
ipmi::setDbusProperty(bus, service, dhcpObj, dhcpIntf, prop, value);
@@ -313,7 +313,7 @@
auto responseData =
reinterpret_cast<dcmi::GetPowerLimitResponse*>(outPayload.data());
- sdbusplus::bus::bus sdbus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t sdbus{ipmid_get_sd_bus_connection()};
uint32_t pcapValue = 0;
bool pcapEnable = false;
@@ -370,7 +370,7 @@
auto requestData =
reinterpret_cast<const dcmi::SetPowerLimitRequest*>(request);
- sdbusplus::bus::bus sdbus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t sdbus{ipmid_get_sd_bus_connection()};
// Only process the power limit requested in watts.
try
@@ -404,7 +404,7 @@
auto requestData =
reinterpret_cast<const dcmi::ApplyPowerLimitRequest*>(request);
- sdbusplus::bus::bus sdbus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t sdbus{ipmid_get_sd_bus_connection()};
try
{
@@ -634,7 +634,7 @@
requestData->data + requestData->bytes, '\0');
if (it != requestData->data + requestData->bytes)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
ipmi::setDbusProperty(bus, dcmi::networkServiceName,
dcmi::networkConfigObj,
dcmi::networkConfigIntf, dcmi::hostNameProp,
@@ -769,7 +769,7 @@
// formula Value * 10^Scale. The ipmi spec has the temperature as a uint8_t,
// with a separate single bit for the sign.
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto result = ipmi::getAllDbusProperties(
bus, dbusService, dbusPath, "xyz.openbmc_project.Sensor.Value");
auto temperature =
@@ -799,7 +799,7 @@
uint8_t instance)
{
Response response{};
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
if (!instance)
{
@@ -855,7 +855,7 @@
uint8_t instanceStart)
{
ResponseList response{};
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
size_t numInstances = 0;
auto data = parseJSONConfig(gDCMISensorsConfig);
@@ -977,7 +977,7 @@
return IPMI_CC_OK;
}
-int64_t getPowerReading(sdbusplus::bus::bus& bus)
+int64_t getPowerReading(sdbusplus::bus_t& bus)
{
std::ifstream sensorFile(POWER_READING_SENSOR);
std::string objectPath;
@@ -1179,7 +1179,7 @@
auto responseData =
reinterpret_cast<dcmi::GetPowerReadingResponse*>(response);
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
int64_t power = 0;
try
{
diff --git a/dcmihandler.hpp b/dcmihandler.hpp
index b006ee0..81c1e0b 100644
--- a/dcmihandler.hpp
+++ b/dcmihandler.hpp
@@ -196,7 +196,7 @@
*
* @return On success return the power cap value.
*/
-uint32_t getPcap(sdbusplus::bus::bus& bus);
+uint32_t getPcap(sdbusplus::bus_t& bus);
/** @brief Check if the power capping is enabled
*
@@ -205,7 +205,7 @@
* @return true if the powerCap is enabled and false if the powercap
* is disabled.
*/
-bool getPcapEnabled(sdbusplus::bus::bus& bus);
+bool getPcapEnabled(sdbusplus::bus_t& bus);
/** @struct GetPowerLimitResponse
*
@@ -226,7 +226,7 @@
* @param[in] bus - dbus connection
* @param[in] powerCap - power cap value
*/
-void setPcap(sdbusplus::bus::bus& bus, const uint32_t powerCap);
+void setPcap(sdbusplus::bus_t& bus, const uint32_t powerCap);
/** @struct SetPowerLimitRequest
*
@@ -248,7 +248,7 @@
* @param[in] bus - dbus connection
* @param[in] enabled - enable/disable
*/
-void setPcapEnable(sdbusplus::bus::bus& bus, bool enabled);
+void setPcapEnable(sdbusplus::bus_t& bus, bool enabled);
/** @struct ApplyPowerLimitRequest
*
@@ -474,7 +474,7 @@
*
* @return total power reading
*/
-int64_t getPowerReading(sdbusplus::bus::bus& bus);
+int64_t getPowerReading(sdbusplus::bus_t& bus);
/** @struct GetPowerReadingRequest
*
diff --git a/globalhandler.cpp b/globalhandler.cpp
index 2561e08..4012ce0 100644
--- a/globalhandler.cpp
+++ b/globalhandler.cpp
@@ -20,7 +20,7 @@
void resetBMC()
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto bmcStateObj =
ipmi::getDbusObject(bus, bmcStateIntf, bmcStateRoot, match);
diff --git a/host-cmd-manager.cpp b/host-cmd-manager.cpp
index b3aeb5a..d12583a 100644
--- a/host-cmd-manager.cpp
+++ b/host-cmd-manager.cpp
@@ -31,7 +31,7 @@
namespace sdbusRule = sdbusplus::bus::match::rules;
-Manager::Manager(sdbusplus::bus::bus& bus) :
+Manager::Manager(sdbusplus::bus_t& bus) :
bus(bus), timer(std::bind(&Manager::hostTimeout, this)),
hostTransitionMatch(
bus,
@@ -137,7 +137,7 @@
log<level::DEBUG>("SMS Attention asserted");
}
- catch (sdbusplus::exception::exception& e)
+ catch (sdbusplus::exception_t& e)
{
log<level::ERR>("Error when call setAttention method");
}
@@ -166,7 +166,7 @@
return;
}
-void Manager::clearQueueOnPowerOn(sdbusplus::message::message& msg)
+void Manager::clearQueueOnPowerOn(sdbusplus::message_t& msg)
{
namespace server = sdbusplus::xyz::openbmc_project::State::server;
diff --git a/host-cmd-manager.hpp b/host-cmd-manager.hpp
index 94cc6f1..f2fe373 100644
--- a/host-cmd-manager.hpp
+++ b/host-cmd-manager.hpp
@@ -32,7 +32,7 @@
* @param[in] bus - dbus handler
* @param[in] event - pointer to sd_event
*/
- explicit Manager(sdbusplus::bus::bus& bus);
+ explicit Manager(sdbusplus::bus_t& bus);
/** @brief Extracts the next entry in the queue and returns
* Command and data part of it.
@@ -92,10 +92,10 @@
*
* @param[in] msg - the sdbusplus message containing the property
*/
- void clearQueueOnPowerOn(sdbusplus::message::message& msg);
+ void clearQueueOnPowerOn(sdbusplus::message_t& msg);
/** @brief Reference to the dbus handler */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Queue to store the requested commands */
std::queue<CommandHandler> workQueue{};
diff --git a/host-interface.hpp b/host-interface.hpp
index 056ffe9..534f577 100644
--- a/host-interface.hpp
+++ b/host-interface.hpp
@@ -17,7 +17,7 @@
* and xyz.openbmc_project.Condition.HostFirmware DBus API's.
*/
class Host
- : public sdbusplus::server::object::object<
+ : public sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Control::server::Host,
sdbusplus::xyz::openbmc_project::Condition::server::HostFirmware>
{
@@ -27,8 +27,8 @@
* @param[in] bus - The Dbus bus object
* @param[in] objPath - The Dbus object path
*/
- Host(sdbusplus::bus::bus& bus, const char* objPath) :
- sdbusplus::server::object::object<
+ Host(sdbusplus::bus_t& bus, const char* objPath) :
+ sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Control::server::Host,
sdbusplus::xyz::openbmc_project::Condition::server::HostFirmware>(
bus, objPath),
@@ -50,7 +50,7 @@
private:
/** @brief sdbusplus DBus bus connection. */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Callback function to be invoked by command manager
*
diff --git a/include/ipmid/types.hpp b/include/ipmid/types.hpp
index 2fc37ff..fb94aeb 100644
--- a/include/ipmid/types.hpp
+++ b/include/ipmid/types.hpp
@@ -197,7 +197,7 @@
using Object = sdbusplus::message::object_path;
using ObjectMap = std::map<Object, InterfaceMap>;
-using IpmiUpdateData = sdbusplus::message::message;
+using IpmiUpdateData = sdbusplus::message_t;
struct SelData
{
diff --git a/include/ipmid/utils.hpp b/include/ipmid/utils.hpp
index 5e049c5..26a2bab 100644
--- a/include/ipmid/utils.hpp
+++ b/include/ipmid/utils.hpp
@@ -57,7 +57,7 @@
* @param[in] bus - The bus associated with and used for looking
* up the service.
*/
- const std::string& getService(sdbusplus::bus::bus& bus);
+ const std::string& getService(sdbusplus::bus_t& bus);
/** @brief Invalidates the current service name */
void invalidate();
@@ -69,16 +69,15 @@
* @param[in] method - The method name
* @return The message containing the method call.
*/
- sdbusplus::message::message newMethodCall(sdbusplus::bus::bus& bus,
- const char* intf,
- const char* method);
+ sdbusplus::message_t newMethodCall(sdbusplus::bus_t& bus, const char* intf,
+ const char* method);
/** @brief Check to see if the current cache is valid
*
* @param[in] bus - The bus used for the service lookup
* @return True if the cache is valid false otherwise.
*/
- bool isValid(sdbusplus::bus::bus& bus) const;
+ bool isValid(sdbusplus::bus_t& bus) const;
private:
/** @brief DBUS interface provided by the service */
@@ -99,7 +98,7 @@
* @param[in] path - DBUS Object Path
*
*/
-std::string getService(sdbusplus::bus::bus& bus, const std::string& intf,
+std::string getService(sdbusplus::bus_t& bus, const std::string& intf,
const std::string& path);
/** @brief Gets the dbus object info implementing the given interface
@@ -110,7 +109,7 @@
* @param[in] match - identifier for object.
* @return On success returns the object having objectpath and servicename.
*/
-DbusObjectInfo getDbusObject(sdbusplus::bus::bus& bus,
+DbusObjectInfo getDbusObject(sdbusplus::bus_t& bus,
const std::string& interface,
const std::string& subtreePath = ROOT,
const std::string& match = {});
@@ -124,7 +123,7 @@
* @param[in] property - name of the property.
* @return On success returns the value of the property.
*/
-Value getDbusProperty(sdbusplus::bus::bus& bus, const std::string& service,
+Value getDbusProperty(sdbusplus::bus_t& bus, const std::string& service,
const std::string& objPath, const std::string& interface,
const std::string& property,
std::chrono::microseconds timeout = IPMI_DBUS_TIMEOUT);
@@ -138,7 +137,7 @@
* @return On success returns the map of name value pair.
*/
PropertyMap
- getAllDbusProperties(sdbusplus::bus::bus& bus, const std::string& service,
+ getAllDbusProperties(sdbusplus::bus_t& bus, const std::string& service,
const std::string& objPath,
const std::string& interface,
std::chrono::microseconds timeout = IPMI_DBUS_TIMEOUT);
@@ -150,7 +149,7 @@
* @param[in] objPath - D-Bus object path.
* @return On success returns the map of name value pair.
*/
-ObjectValueTree getManagedObjects(sdbusplus::bus::bus& bus,
+ObjectValueTree getManagedObjects(sdbusplus::bus_t& bus,
const std::string& service,
const std::string& objPath);
@@ -162,7 +161,7 @@
* @param[in] property - name of the property.
* @param[in] value - value which needs to be set.
*/
-void setDbusProperty(sdbusplus::bus::bus& bus, const std::string& service,
+void setDbusProperty(sdbusplus::bus_t& bus, const std::string& service,
const std::string& objPath, const std::string& interface,
const std::string& property, const Value& value,
std::chrono::microseconds timeout = IPMI_DBUS_TIMEOUT);
@@ -175,7 +174,7 @@
* @param[in] match - Identifier for a path.
* @returns map of object path and service info.
*/
-ObjectTree getAllDbusObjects(sdbusplus::bus::bus& bus,
+ObjectTree getAllDbusObjects(sdbusplus::bus_t& bus,
const std::string& serviceRoot,
const std::string& interface,
const std::string& match = {});
@@ -187,8 +186,7 @@
* @param[in] interface - Dbus interface.
* @param[in] match - Identifier for object.
*/
-void deleteAllDbusObjects(sdbusplus::bus::bus& bus,
- const std::string& serviceRoot,
+void deleteAllDbusObjects(sdbusplus::bus_t& bus, const std::string& serviceRoot,
const std::string& interface,
const std::string& match = {});
@@ -199,7 +197,7 @@
* @param[in] interfaces - Dbus interface list.
* @return map of object path and service info.
*/
-ObjectTree getAllAncestors(sdbusplus::bus::bus& bus, const std::string& path,
+ObjectTree getAllAncestors(sdbusplus::bus_t& bus, const std::string& path,
InterfaceList&& interfaces);
/********* Begin co-routine yielding alternatives ***************/
@@ -434,7 +432,7 @@
* @param[in] interface - Dbus interface.
* @param[in] method - Dbus method.
*/
-void callDbusMethod(sdbusplus::bus::bus& bus, const std::string& service,
+void callDbusMethod(sdbusplus::bus_t& bus, const std::string& service,
const std::string& objPath, const std::string& interface,
const std::string& method);
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index 7f558cd..83a251f 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -406,7 +406,7 @@
"ListNames");
}
-void nameChangeHandler(sdbusplus::message::message& message)
+void nameChangeHandler(sdbusplus::message_t& message)
{
std::string name;
std::string oldOwner;
@@ -449,7 +449,7 @@
} // anonymous namespace
static constexpr const char intraBmcName[] = "INTRABMC";
-uint8_t channelFromMessage(sdbusplus::message::message& msg)
+uint8_t channelFromMessage(sdbusplus::message_t& msg)
{
// channel name for ipmitool to resolve to
std::string sender = msg.get_sender();
@@ -470,9 +470,8 @@
} // namespace ipmi
/* called from sdbus async server context */
-auto executionEntry(boost::asio::yield_context yield,
- sdbusplus::message::message& m, NetFn netFn, uint8_t lun,
- Cmd cmd, ipmi::SecureBuffer& data,
+auto executionEntry(boost::asio::yield_context yield, sdbusplus::message_t& m,
+ NetFn netFn, uint8_t lun, Cmd cmd, ipmi::SecureBuffer& data,
std::map<std::string, ipmi::Value>& options)
{
const auto dbusResponse =
@@ -755,13 +754,13 @@
} // namespace oem
/* legacy alternative to executionEntry */
-void handleLegacyIpmiCommand(sdbusplus::message::message& m)
+void handleLegacyIpmiCommand(sdbusplus::message_t& m)
{
// make a copy so the next two moves don't wreak havoc on the stack
- sdbusplus::message::message b{m};
+ sdbusplus::message_t b{m};
boost::asio::spawn(*getIoContext(), [b = std::move(b)](
boost::asio::yield_context yield) {
- sdbusplus::message::message m{std::move(b)};
+ sdbusplus::message_t m{std::move(b)};
unsigned char seq = 0, netFn = 0, lun = 0, cmd = 0;
ipmi::SecureBuffer data;
@@ -851,12 +850,12 @@
// listen on deprecated signal interface for kcs/bt commands
constexpr const char* FILTER = "type='signal',interface='org.openbmc."
"HostIpmi',member='ReceivedMessage'";
- sdbusplus::bus::match::match oldIpmiInterface(*sdbusp, FILTER,
- handleLegacyIpmiCommand);
+ sdbusplus::bus::match_t oldIpmiInterface(*sdbusp, FILTER,
+ handleLegacyIpmiCommand);
#endif /* ALLOW_DEPRECATED_API */
// set up bus name watching to match channels with bus names
- sdbusplus::bus::match::match nameOwnerChanged(
+ sdbusplus::bus::match_t nameOwnerChanged(
*sdbusp,
sdbusplus::bus::match::rules::nameOwnerChanged() +
sdbusplus::bus::match::rules::arg0namespace(
diff --git a/libipmid/utils.cpp b/libipmid/utils.cpp
index 5aebd17..11ae156 100644
--- a/libipmid/utils.cpp
+++ b/libipmid/utils.cpp
@@ -38,7 +38,7 @@
// Currently mapper doesn't give the readable busname(gives busid) so we can't
// use busname to find the object,will do later once the support is there.
-DbusObjectInfo getDbusObject(sdbusplus::bus::bus& bus,
+DbusObjectInfo getDbusObject(sdbusplus::bus_t& bus,
const std::string& interface,
const std::string& serviceRoot,
const std::string& match)
@@ -98,7 +98,7 @@
return make_pair(found->first, std::move(found->second.begin()->first));
}
-Value getDbusProperty(sdbusplus::bus::bus& bus, const std::string& service,
+Value getDbusProperty(sdbusplus::bus_t& bus, const std::string& service,
const std::string& objPath, const std::string& interface,
const std::string& property,
std::chrono::microseconds timeout)
@@ -127,7 +127,7 @@
return value;
}
-PropertyMap getAllDbusProperties(sdbusplus::bus::bus& bus,
+PropertyMap getAllDbusProperties(sdbusplus::bus_t& bus,
const std::string& service,
const std::string& objPath,
const std::string& interface,
@@ -154,7 +154,7 @@
return properties;
}
-ObjectValueTree getManagedObjects(sdbusplus::bus::bus& bus,
+ObjectValueTree getManagedObjects(sdbusplus::bus_t& bus,
const std::string& service,
const std::string& objPath)
{
@@ -177,7 +177,7 @@
return interfaces;
}
-void setDbusProperty(sdbusplus::bus::bus& bus, const std::string& service,
+void setDbusProperty(sdbusplus::bus_t& bus, const std::string& service,
const std::string& objPath, const std::string& interface,
const std::string& property, const Value& value,
std::chrono::microseconds timeout)
@@ -209,7 +209,7 @@
{
}
-const std::string& ServiceCache::getService(sdbusplus::bus::bus& bus)
+const std::string& ServiceCache::getService(sdbusplus::bus_t& bus)
{
if (!isValid(bus))
{
@@ -225,20 +225,20 @@
cachedService = std::nullopt;
}
-sdbusplus::message::message
- ServiceCache::newMethodCall(sdbusplus::bus::bus& bus, const char* intf,
- const char* method)
+sdbusplus::message_t ServiceCache::newMethodCall(sdbusplus::bus_t& bus,
+ const char* intf,
+ const char* method)
{
return bus.new_method_call(getService(bus).c_str(), path.c_str(), intf,
method);
}
-bool ServiceCache::isValid(sdbusplus::bus::bus& bus) const
+bool ServiceCache::isValid(sdbusplus::bus_t& bus) const
{
return cachedService && cachedBusName == bus.get_unique_name();
}
-std::string getService(sdbusplus::bus::bus& bus, const std::string& intf,
+std::string getService(sdbusplus::bus_t& bus, const std::string& intf,
const std::string& path)
{
auto mapperCall =
@@ -267,7 +267,7 @@
return mapperResponse.begin()->first;
}
-ipmi::ObjectTree getAllDbusObjects(sdbusplus::bus::bus& bus,
+ipmi::ObjectTree getAllDbusObjects(sdbusplus::bus_t& bus,
const std::string& serviceRoot,
const std::string& interface,
const std::string& match)
@@ -310,8 +310,7 @@
return objectTree;
}
-void deleteAllDbusObjects(sdbusplus::bus::bus& bus,
- const std::string& serviceRoot,
+void deleteAllDbusObjects(sdbusplus::bus_t& bus, const std::string& serviceRoot,
const std::string& interface,
const std::string& match)
{
@@ -326,7 +325,7 @@
"Delete");
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::INFO>("sdbusplus exception - Unable to delete the objects",
entry("ERROR=%s", e.what()),
@@ -345,7 +344,7 @@
return intfStr;
}
-ObjectTree getAllAncestors(sdbusplus::bus::bus& bus, const std::string& path,
+ObjectTree getAllAncestors(sdbusplus::bus_t& bus, const std::string& path,
InterfaceList&& interfaces)
{
auto mapperCall = bus.new_method_call(MAPPER_BUS_NAME, MAPPER_OBJ,
@@ -380,7 +379,7 @@
namespace method_no_args
{
-void callDbusMethod(sdbusplus::bus::bus& bus, const std::string& service,
+void callDbusMethod(sdbusplus::bus_t& bus, const std::string& service,
const std::string& objPath, const std::string& interface,
const std::string& method)
diff --git a/read_fru_data.cpp b/read_fru_data.cpp
index 908e54e..fe61a61 100644
--- a/read_fru_data.cpp
+++ b/read_fru_data.cpp
@@ -44,7 +44,7 @@
const std::string& path)
{
ipmi::PropertyMap properties;
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
std::string service;
std::string objPath;
@@ -68,7 +68,7 @@
auto reply = bus.call(method);
reply.read(properties);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
// If property is not found simply return empty value
log<level::ERR>("Error in reading property values",
@@ -80,7 +80,7 @@
return properties;
}
-void processFruPropChange(sdbusplus::message::message& msg)
+void processFruPropChange(sdbusplus::message_t& msg)
{
if (cache::fruMap.empty())
{
@@ -112,7 +112,7 @@
if (matchPtr == nullptr)
{
using namespace sdbusplus::bus::match::rules;
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
matchPtr = std::make_unique<sdbusplus::bus::match_t>(
bus,
path_namespace(invObjPath) + type::signal() +
diff --git a/selutility.cpp b/selutility.cpp
index 344201e..e6b28de 100644
--- a/selutility.cpp
+++ b/selutility.cpp
@@ -181,7 +181,7 @@
{
GetSELEntryResponse record{};
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto service = ipmi::getService(bus, logEntryIntf, objPath);
// Read all the log entry properties.
@@ -307,7 +307,7 @@
GetSELEntryResponse convertLogEntrytoSEL(const std::string& objPath)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
static constexpr auto assocIntf =
"xyz.openbmc_project.Association.Definitions";
@@ -368,7 +368,7 @@
std::chrono::seconds getEntryTimeStamp(const std::string& objPath)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto service = ipmi::getService(bus, logEntryIntf, objPath);
@@ -397,7 +397,7 @@
void readLoggingObjectPaths(ObjectPaths& paths)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto depth = 0;
paths.clear();
@@ -412,7 +412,7 @@
auto reply = bus.call(mapperCall);
reply.read(paths);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
if (strcmp(e.name(),
"xyz.openbmc_project.Common.Error.ResourceNotFound"))
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index f22f403..a645336 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -29,7 +29,7 @@
* @param[in] path - interested path in the list of objects
* @return pair of service path and service
*/
-ServicePath getServiceAndPath(sdbusplus::bus::bus& bus,
+ServicePath getServiceAndPath(sdbusplus::bus_t& bus,
const std::string& interface,
const std::string& path)
{
@@ -89,7 +89,7 @@
ipmi_ret_t updateToDbus(IpmiUpdateData& msg)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
try
{
auto serviceResponseMsg = bus.call(msg);
@@ -128,7 +128,7 @@
const InstancePath& path,
const DbusInterface& interface)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
GetSensorResponse response{};
enableScanning(&response);
@@ -160,7 +160,7 @@
GetSensorResponse mapDbusToEventdata2(const Info& sensorInfo)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
GetSensorResponse response{};
enableScanning(&response);
@@ -247,7 +247,7 @@
const std::string& command,
const std::string& sensorInterface)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
using namespace std::string_literals;
auto dbusService = getService(bus, sensorInterface, sensorPath);
@@ -339,7 +339,7 @@
const std::string&, const std::string& command,
const std::string&)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
using namespace std::string_literals;
static const auto dbusPath = "/xyz/openbmc_project/inventory"s;
diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp
index 54bd909..89d00d0 100644
--- a/sensordatahandler.hpp
+++ b/sensordatahandler.hpp
@@ -46,7 +46,7 @@
* @param[in] path - interested path in the list of objects
* @return pair of service path and service
*/
-ServicePath getServiceAndPath(sdbusplus::bus::bus& bus,
+ServicePath getServiceAndPath(sdbusplus::bus_t& bus,
const std::string& interface,
const std::string& path = std::string());
@@ -181,7 +181,7 @@
template <typename T>
GetSensorResponse readingAssertion(const Info& sensorInfo)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
GetSensorResponse response{};
enableScanning(&response);
@@ -210,7 +210,7 @@
template <typename T>
GetSensorResponse readingData(const Info& sensorInfo)
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
GetSensorResponse response{};
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index 3217412..53d1b42 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -87,13 +87,13 @@
SensorThresholdMap sensorThresholdMap __attribute__((init_priority(101)));
#ifdef FEATURE_SENSORS_CACHE
-std::map<uint8_t, std::unique_ptr<sdbusplus::bus::match::match>>
- sensorAddedMatches __attribute__((init_priority(101)));
-std::map<uint8_t, std::unique_ptr<sdbusplus::bus::match::match>>
- sensorUpdatedMatches __attribute__((init_priority(101)));
-std::map<uint8_t, std::unique_ptr<sdbusplus::bus::match::match>>
- sensorRemovedMatches __attribute__((init_priority(101)));
-std::unique_ptr<sdbusplus::bus::match::match> sensorsOwnerMatch
+std::map<uint8_t, std::unique_ptr<sdbusplus::bus::match_t>> sensorAddedMatches
+ __attribute__((init_priority(101)));
+std::map<uint8_t, std::unique_ptr<sdbusplus::bus::match_t>> sensorUpdatedMatches
+ __attribute__((init_priority(101)));
+std::map<uint8_t, std::unique_ptr<sdbusplus::bus::match_t>> sensorRemovedMatches
+ __attribute__((init_priority(101)));
+std::unique_ptr<sdbusplus::bus::match_t> sensorsOwnerMatch
__attribute__((init_priority(101)));
ipmi::sensor::SensorCacheMap sensorCacheMap __attribute__((init_priority(101)));
@@ -130,7 +130,7 @@
}
try
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto service = ipmi::getService(bus, intf, obj);
idToServiceMap[id] = service;
serviceToIdMap[service].insert(id);
@@ -144,19 +144,19 @@
void initSensorMatches()
{
using namespace sdbusplus::bus::match::rules;
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
for (const auto& s : ipmi::sensor::sensors)
{
sensorAddedMatches.emplace(
s.first,
- std::make_unique<sdbusplus::bus::match::match>(
+ std::make_unique<sdbusplus::bus::match_t>(
bus, interfacesAdded() + argNpath(0, s.second.sensorPath),
[id = s.first, obj = s.second.sensorPath,
intf = s.second.propertyInterfaces.begin()->first](
auto& /*msg*/) { fillSensorIdServiceMap(obj, intf, id); }));
sensorRemovedMatches.emplace(
s.first,
- std::make_unique<sdbusplus::bus::match::match>(
+ std::make_unique<sdbusplus::bus::match_t>(
bus, interfacesRemoved() + argNpath(0, s.second.sensorPath),
[id = s.first](auto& /*msg*/) {
// Ideally this should work.
@@ -166,7 +166,7 @@
sensorCacheMap[id].reset();
}));
sensorUpdatedMatches.emplace(
- s.first, std::make_unique<sdbusplus::bus::match::match>(
+ s.first, std::make_unique<sdbusplus::bus::match_t>(
bus,
type::signal() + path(s.second.sensorPath) +
member("PropertiesChanged"s) +
@@ -190,7 +190,7 @@
sensorCacheMap[s.first].reset();
}
}));
- sensorsOwnerMatch = std::make_unique<sdbusplus::bus::match::match>(
+ sensorsOwnerMatch = std::make_unique<sdbusplus::bus::match_t>(
bus, nameOwnerChanged(), [](auto& msg) {
std::string name;
std::string oldOwner;
@@ -1446,10 +1446,10 @@
assert = req->eventDirectionType & directionMask ? false : true;
std::vector<uint8_t> eventData(req->data, req->data + count);
- sdbusplus::bus::bus dbus(bus);
+ sdbusplus::bus_t dbus(bus);
std::string service =
ipmi::getService(dbus, ipmiSELAddInterface, ipmiSELPath);
- sdbusplus::message::message writeSEL = dbus.new_method_call(
+ sdbusplus::message_t writeSEL = dbus.new_method_call(
service.c_str(), ipmiSELPath, ipmiSELAddInterface, "IpmiSelAdd");
writeSEL.append(ipmiSELAddMessage, sensorPath, eventData, assert,
generatorID);
diff --git a/settings.cpp b/settings.cpp
index 2fa2511..778dbd8 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -16,8 +16,7 @@
constexpr auto mapperPath = "/xyz/openbmc_project/object_mapper";
constexpr auto mapperIntf = "xyz.openbmc_project.ObjectMapper";
-Objects::Objects(sdbusplus::bus::bus& bus,
- const std::vector<Interface>& filter) :
+Objects::Objects(sdbusplus::bus_t& bus, const std::vector<Interface>& filter) :
bus(bus)
{
auto depth = 0;
diff --git a/settings.hpp b/settings.hpp
index 5382fdd..1f96242 100644
--- a/settings.hpp
+++ b/settings.hpp
@@ -25,7 +25,7 @@
* @param[in] filter - A vector of settings interfaces the caller is
* interested in.
*/
- Objects(sdbusplus::bus::bus& bus, const std::vector<Interface>& filter);
+ Objects(sdbusplus::bus_t& bus, const std::vector<Interface>& filter);
Objects(const Objects&) = default;
Objects& operator=(const Objects&) = default;
Objects(Objects&&) = delete;
@@ -47,7 +47,7 @@
std::map<Interface, std::vector<Path>> map;
/** @brief The Dbus bus object */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
};
namespace boot
diff --git a/softoff/mainapp.cpp b/softoff/mainapp.cpp
index 563ccd1..7ff90b0 100644
--- a/softoff/mainapp.cpp
+++ b/softoff/mainapp.cpp
@@ -33,7 +33,7 @@
auto bus = sdbusplus::bus::new_default();
// Add systemd object manager.
- sdbusplus::server::manager::manager(bus, SOFTOFF_OBJPATH);
+ sdbusplus::server::manager_t(bus, SOFTOFF_OBJPATH);
// Get default event loop
auto event = sdeventplus::Event::get_default();
diff --git a/softoff/softoff.cpp b/softoff/softoff.cpp
index e6ed0eb..333d4d7 100644
--- a/softoff/softoff.cpp
+++ b/softoff/softoff.cpp
@@ -53,7 +53,7 @@
}
// Function called on host control signals
-void SoftPowerOff::hostControlEvent(sdbusplus::message::message& msg)
+void SoftPowerOff::hostControlEvent(sdbusplus::message_t& msg)
{
std::string cmdCompleted{};
std::string cmdStatus{};
diff --git a/softoff/softoff.hpp b/softoff/softoff.hpp
index bf3fbdd..23ff5db 100644
--- a/softoff/softoff.hpp
+++ b/softoff/softoff.hpp
@@ -35,8 +35,7 @@
* @param[in] event - sd_event handler
* @param[in] objPath - The Dbus path hosting SoftPowerOff function
*/
- SoftPowerOff(sdbusplus::bus::bus& bus, sd_event* event,
- const char* objPath) :
+ SoftPowerOff(sdbusplus::bus_t& bus, sd_event* event, const char* objPath) :
SoftPowerOffInherit(bus, objPath,
SoftPowerOffInherit::action::defer_emit),
bus(bus), timer(event),
@@ -99,7 +98,7 @@
static constexpr auto HOST_IPMI_INTF = "org.openbmc.HostIpmi";
/* @brief sdbusplus handle */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Reference to Timer object */
Timer timer;
@@ -139,7 +138,7 @@
* @param[in] msg - Data associated with subscribed signal
*
*/
- void hostControlEvent(sdbusplus::message::message& msg);
+ void hostControlEvent(sdbusplus::message_t& msg);
};
} // namespace ipmi
} // namespace phosphor
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 47a18d6..34ca0b9 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -72,11 +72,11 @@
SELCacheMap selCacheMap __attribute__((init_priority(101)));
bool selCacheMapInitialized;
-std::unique_ptr<sdbusplus::bus::match::match> selAddedMatch
+std::unique_ptr<sdbusplus::bus::match_t> selAddedMatch
__attribute__((init_priority(101)));
-std::unique_ptr<sdbusplus::bus::match::match> selRemovedMatch
+std::unique_ptr<sdbusplus::bus::match_t> selRemovedMatch
__attribute__((init_priority(101)));
-std::unique_ptr<sdbusplus::bus::match::match> selUpdatedMatch
+std::unique_ptr<sdbusplus::bus::match_t> selUpdatedMatch
__attribute__((init_priority(101)));
static inline uint16_t getLoggingId(const std::string& p)
@@ -109,14 +109,14 @@
return std::nullopt;
}
-static void selAddedCallback(sdbusplus::message::message& m)
+static void selAddedCallback(sdbusplus::message_t& m)
{
sdbusplus::message::object_path objPath;
try
{
m.read(objPath);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to read object path");
return;
@@ -129,14 +129,14 @@
}
}
-static void selRemovedCallback(sdbusplus::message::message& m)
+static void selRemovedCallback(sdbusplus::message_t& m)
{
sdbusplus::message::object_path objPath;
try
{
m.read(objPath);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to read object path");
}
@@ -151,7 +151,7 @@
}
}
-static void selUpdatedCallback(sdbusplus::message::message& m)
+static void selUpdatedCallback(sdbusplus::message_t& m)
{
std::string p = m.get_path();
auto entry = parseLoggingEntry(p);
@@ -164,22 +164,22 @@
void registerSelCallbackHandler()
{
using namespace sdbusplus::bus::match::rules;
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
if (!selAddedMatch)
{
- selAddedMatch = std::make_unique<sdbusplus::bus::match::match>(
+ selAddedMatch = std::make_unique<sdbusplus::bus::match_t>(
bus, interfacesAdded(logWatchPath),
std::bind(selAddedCallback, std::placeholders::_1));
}
if (!selRemovedMatch)
{
- selRemovedMatch = std::make_unique<sdbusplus::bus::match::match>(
+ selRemovedMatch = std::make_unique<sdbusplus::bus::match_t>(
bus, interfacesRemoved(logWatchPath),
std::bind(selRemovedCallback, std::placeholders::_1));
}
if (!selUpdatedMatch)
{
- selUpdatedMatch = std::make_unique<sdbusplus::bus::match::match>(
+ selUpdatedMatch = std::make_unique<sdbusplus::bus::match_t>(
bus,
type::signal() + member("PropertiesChanged"s) +
interface("org.freedesktop.DBus.Properties"s) +
@@ -196,7 +196,7 @@
{
ipmi::sel::readLoggingObjectPaths(paths);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to get logging object paths");
return;
@@ -451,7 +451,7 @@
return ipmi::responseSensorInvalid();
}
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
std::string service;
auto objPath = getLoggingObjPath(iter->first);
@@ -515,7 +515,7 @@
// Per the IPMI spec, need to cancel any reservation when the SEL is cleared
cancelSELReservation();
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto service = ipmi::getService(bus, ipmi::sel::logIntf, ipmi::sel::logObj);
auto method =
bus.new_method_call(service.c_str(), ipmi::sel::logObj,
@@ -524,7 +524,7 @@
{
bus.call_noreply(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error eraseAll ", entry("ERROR=%s", e.what()));
return ipmi::responseUnspecifiedError();
@@ -547,7 +547,7 @@
try
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
auto service = ipmi::getService(bus, TIME_INTERFACE, BMC_TIME_PATH);
std::variant<uint64_t> value;
@@ -601,7 +601,7 @@
try
{
- sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
+ sdbusplus::bus_t bus{ipmid_get_sd_bus_connection()};
bool ntp = std::get<bool>(
ipmi::getDbusProperty(bus, SystemdTimeService, SystemdTimePath,
SystemdTimeInterface, "NTP"));
diff --git a/systemintfcmds.cpp b/systemintfcmds.cpp
index 7596ab9..23e80a2 100644
--- a/systemintfcmds.cpp
+++ b/systemintfcmds.cpp
@@ -129,7 +129,7 @@
// Static storage to keep the object alive during process life
std::unique_ptr<phosphor::host::command::Host> host
__attribute__((init_priority(101)));
-std::unique_ptr<sdbusplus::server::manager::manager> objManager
+std::unique_ptr<sdbusplus::server::manager_t> objManager
__attribute__((init_priority(101)));
} // namespace
@@ -162,7 +162,7 @@
ipmid_get_sdbus_plus_handler();
// Add sdbusplus ObjectManager.
- objManager = std::make_unique<sdbusplus::server::manager::manager>(
+ objManager = std::make_unique<sdbusplus::server::manager_t>(
*sdbusp, CONTROL_HOST_OBJ_MGR);
host = std::make_unique<phosphor::host::command::Host>(*sdbusp,
diff --git a/transporthandler.cpp b/transporthandler.cpp
index b29e4bf..ba4e4b0 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
@@ -57,7 +57,7 @@
static constexpr uint8_t oemCmdStart = 192;
static constexpr uint8_t oemCmdEnd = 255;
-std::optional<ChannelParams> maybeGetChannelParams(sdbusplus::bus::bus& bus,
+std::optional<ChannelParams> maybeGetChannelParams(sdbusplus::bus_t& bus,
uint8_t channel)
{
auto ifname = getChannelName(channel);
@@ -128,7 +128,7 @@
return params;
}
-ChannelParams getChannelParams(sdbusplus::bus::bus& bus, uint8_t channel)
+ChannelParams getChannelParams(sdbusplus::bus_t& bus, uint8_t channel)
{
auto params = maybeGetChannelParams(bus, channel);
if (!params)
@@ -162,7 +162,7 @@
return log<level>(std::forward<Args>(args)...);
}
-EthernetInterface::DHCPConf getDHCPProperty(sdbusplus::bus::bus& bus,
+EthernetInterface::DHCPConf getDHCPProperty(sdbusplus::bus_t& bus,
const ChannelParams& params)
{
std::string dhcpstr = std::get<std::string>(getDbusProperty(
@@ -180,7 +180,7 @@
* EthernetInterface::DHCPConf::v6,
* EthernetInterface::DHCPConf::both)
*/
-void setDHCPv4Property(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void setDHCPv4Property(sdbusplus::bus_t& bus, const ChannelParams& params,
const EthernetInterface::DHCPConf requestedDhcp)
{
EthernetInterface::DHCPConf currentDhcp = getDHCPProperty(bus, params);
@@ -218,7 +218,7 @@
"DHCPEnabled", newDhcp);
}
-void setDHCPv6Property(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void setDHCPv6Property(sdbusplus::bus_t& bus, const ChannelParams& params,
const EthernetInterface::DHCPConf requestedDhcp,
const bool defaultMode = true)
{
@@ -284,7 +284,7 @@
* @param[in] params - The parameters for the channel
* @return The configured mac address
*/
-ether_addr getMACProperty(sdbusplus::bus::bus& bus, const ChannelParams& params)
+ether_addr getMACProperty(sdbusplus::bus_t& bus, const ChannelParams& params)
{
auto macStr = std::get<std::string>(getDbusProperty(
bus, params.service, params.ifPath, INTF_MAC, "MACAddress"));
@@ -297,7 +297,7 @@
* @param[in] params - The parameters for the channel
* @param[in] mac - MAC address to apply
*/
-void setMACProperty(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void setMACProperty(sdbusplus::bus_t& bus, const ChannelParams& params,
const ether_addr& mac)
{
std::string macStr = ether_ntoa(&mac);
@@ -305,7 +305,7 @@
macStr);
}
-void deleteObjectIfExists(sdbusplus::bus::bus& bus, const std::string& service,
+void deleteObjectIfExists(sdbusplus::bus_t& bus, const std::string& service,
const std::string& path)
{
if (path.empty())
@@ -318,7 +318,7 @@
ipmi::DELETE_INTERFACE, "Delete");
bus.call_noreply(req);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
if (strcmp(e.name(),
"xyz.openbmc_project.Common.Error.InternalFailure") != 0 &&
@@ -340,7 +340,7 @@
* @param[in] prefix - The prefix of the new IP
*/
template <int family>
-void createIfAddr(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void createIfAddr(sdbusplus::bus_t& bus, const ChannelParams& params,
const typename AddrFamily<family>::addr& address,
uint8_t prefix)
{
@@ -360,7 +360,7 @@
* @param[in] params - The parameters for the channel
* @return The address and prefix if found
*/
-auto getIfAddr4(sdbusplus::bus::bus& bus, const ChannelParams& params)
+auto getIfAddr4(sdbusplus::bus_t& bus, const ChannelParams& params)
{
return getIfAddr<AF_INET>(bus, params, 0, originsV4);
}
@@ -372,7 +372,7 @@
* @param[in] address - The new address if specified
* @param[in] prefix - The new address prefix if specified
*/
-void reconfigureIfAddr4(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void reconfigureIfAddr4(sdbusplus::bus_t& bus, const ChannelParams& params,
const std::optional<in_addr>& address,
std::optional<uint8_t> prefix)
{
@@ -393,7 +393,7 @@
}
template <int family>
-std::optional<IfNeigh<family>> findGatewayNeighbor(sdbusplus::bus::bus& bus,
+std::optional<IfNeigh<family>> findGatewayNeighbor(sdbusplus::bus_t& bus,
const ChannelParams& params,
ObjectLookupCache& neighbors)
{
@@ -407,7 +407,7 @@
}
template <int family>
-std::optional<IfNeigh<family>> getGatewayNeighbor(sdbusplus::bus::bus& bus,
+std::optional<IfNeigh<family>> getGatewayNeighbor(sdbusplus::bus_t& bus,
const ChannelParams& params)
{
ObjectLookupCache neighbors(bus, params, INTF_NEIGHBOR);
@@ -415,8 +415,8 @@
}
template <int family>
-void reconfigureGatewayMAC(sdbusplus::bus::bus& bus,
- const ChannelParams& params, const ether_addr& mac)
+void reconfigureGatewayMAC(sdbusplus::bus_t& bus, const ChannelParams& params,
+ const ether_addr& mac)
{
auto gateway = getGatewayProperty<family>(bus, params);
if (!gateway)
@@ -442,7 +442,7 @@
* @param[in] params - The parameters for the channel
* @param[in] idx - The address index to operate on
*/
-void deconfigureIfAddr6(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void deconfigureIfAddr6(sdbusplus::bus_t& bus, const ChannelParams& params,
uint8_t idx)
{
auto ifaddr = getIfAddr<AF_INET6>(bus, params, idx, originsV6Static);
@@ -460,7 +460,7 @@
* @param[in] address - The new address
* @param[in] prefix - The new address prefix
*/
-void reconfigureIfAddr6(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void reconfigureIfAddr6(sdbusplus::bus_t& bus, const ChannelParams& params,
uint8_t idx, const in6_addr& address, uint8_t prefix)
{
deconfigureIfAddr6(bus, params, idx);
@@ -533,7 +533,7 @@
* @param[in] params - The parameters for the channel
* @return VLAN id or the standard 0 for no VLAN
*/
-uint16_t getVLANProperty(sdbusplus::bus::bus& bus, const ChannelParams& params)
+uint16_t getVLANProperty(sdbusplus::bus_t& bus, const ChannelParams& params)
{
// VLAN devices will always have a separate logical object
if (params.ifPath == params.logicalPath)
@@ -557,7 +557,7 @@
* @param[in] bus - The bus object used for lookups
* @param[in] params - The parameters for the channel
*/
-void deconfigureChannel(sdbusplus::bus::bus& bus, ChannelParams& params)
+void deconfigureChannel(sdbusplus::bus_t& bus, ChannelParams& params)
{
// Delete all objects associated with the interface
auto objreq = bus.new_method_call(MAPPER_BUS_NAME, MAPPER_OBJ, MAPPER_INTF,
@@ -593,7 +593,7 @@
* @param[in] params - The parameters for the channel
* @param[in] vlan - The id of the new vlan
*/
-void createVLAN(sdbusplus::bus::bus& bus, ChannelParams& params, uint16_t vlan)
+void createVLAN(sdbusplus::bus_t& bus, ChannelParams& params, uint16_t vlan)
{
if (vlan == 0)
{
@@ -615,7 +615,7 @@
* @param[in] params - The parameters for the channel
* @param[in] vlan - The new vlan id to use
*/
-void reconfigureVLAN(sdbusplus::bus::bus& bus, ChannelParams& params,
+void reconfigureVLAN(sdbusplus::bus_t& bus, ChannelParams& params,
uint16_t vlan)
{
// Unfortunatetly we don't have built-in functions to migrate our interface
@@ -737,8 +737,7 @@
* @param[in] params - The parameters for the channel
* @return networkd IPV6AcceptRA value
*/
-static bool getIPv6AcceptRA(sdbusplus::bus::bus& bus,
- const ChannelParams& params)
+static bool getIPv6AcceptRA(sdbusplus::bus_t& bus, const ChannelParams& params)
{
auto raEnabled =
std::get<bool>(getDbusProperty(bus, params.service, params.logicalPath,
@@ -753,7 +752,7 @@
* @param[in] ipv6AcceptRA - boolean to enable/disable IPv6 Routing
* Advertisement
*/
-void setIPv6AcceptRA(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void setIPv6AcceptRA(sdbusplus::bus_t& bus, const ChannelParams& params,
const bool ipv6AcceptRA)
{
setDbusProperty(bus, params.service, params.logicalPath, INTF_ETHERNET,
@@ -1121,7 +1120,7 @@
{
channelCall<reconfigureIfAddr6>(channel, set, ip, prefix);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
if (std::string_view err{
"xyz.openbmc_project.Common.Error.InvalidArgument"};
diff --git a/transporthandler.hpp b/transporthandler.hpp
index 961aae9..537ddc5 100644
--- a/transporthandler.hpp
+++ b/transporthandler.hpp
@@ -228,7 +228,7 @@
* @param[in] channel - The channel id corresponding to an ethernet interface
* @return Ethernet interface service and object path if it exists
*/
-std::optional<ChannelParams> maybeGetChannelParams(sdbusplus::bus::bus& bus,
+std::optional<ChannelParams> maybeGetChannelParams(sdbusplus::bus_t& bus,
uint8_t channel);
/** @brief A trivial helper around maybeGetChannelParams() that throws an
@@ -238,7 +238,7 @@
* @param[in] channel - The channel id corresponding to an ethernet interface
* @return Ethernet interface service and object path
*/
-ChannelParams getChannelParams(sdbusplus::bus::bus& bus, uint8_t channel);
+ChannelParams getChannelParams(sdbusplus::bus_t& bus, uint8_t channel);
/** @brief Trivializes using parameter getter functions by providing a bus
* and channel parameters automatically.
@@ -249,7 +249,7 @@
template <auto func, typename... Args>
auto channelCall(uint8_t channel, Args&&... args)
{
- sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection());
+ sdbusplus::bus_t bus(ipmid_get_sd_bus_connection());
auto params = getChannelParams(bus, channel);
return std::invoke(func, bus, params, std::forward<Args>(args)...);
}
@@ -334,7 +334,7 @@
* @param[in] params - The parameters for the channel
* @param[in] intf - The interface we are looking up
*/
- ObjectLookupCache(sdbusplus::bus::bus& bus, const ChannelParams& params,
+ ObjectLookupCache(sdbusplus::bus_t& bus, const ChannelParams& params,
const char* intf) :
bus(bus),
params(params), intf(intf),
@@ -378,7 +378,7 @@
}
private:
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
const ChannelParams& params;
const char* const intf;
const ObjectTree objs;
@@ -475,7 +475,7 @@
*/
template <int family>
std::optional<IfAddr<family>> findIfAddr(
- [[maybe_unused]] sdbusplus::bus::bus& bus,
+ [[maybe_unused]] sdbusplus::bus_t& bus,
[[maybe_unused]] const ChannelParams& params, uint8_t idx,
const std::unordered_set<
sdbusplus::xyz::openbmc_project::Network::server::IP::AddressOrigin>&
@@ -528,7 +528,7 @@
*/
template <int family>
auto getIfAddr(
- sdbusplus::bus::bus& bus, const ChannelParams& params, uint8_t idx,
+ sdbusplus::bus_t& bus, const ChannelParams& params, uint8_t idx,
const std::unordered_set<
sdbusplus::xyz::openbmc_project::Network::server::IP::AddressOrigin>&
origins)
@@ -544,7 +544,7 @@
* @return DHCPConf enumeration
*/
sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface::DHCPConf
- getDHCPProperty(sdbusplus::bus::bus& bus, const ChannelParams& params);
+ getDHCPProperty(sdbusplus::bus_t& bus, const ChannelParams& params);
/** @brief Sets the DHCP v6 state on the given interface
*
@@ -554,7 +554,7 @@
* @param[in] defaultMode - True: Use algorithmic assignment
* False: requestedDhcp assigned unconditionally
*/
-void setDHCPv6Property(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void setDHCPv6Property(sdbusplus::bus_t& bus, const ChannelParams& params,
const sdbusplus::xyz::openbmc_project::Network::server::
EthernetInterface::DHCPConf requestedDhcp,
const bool defaultMode);
@@ -567,7 +567,7 @@
* @param[in] address - The new address
* @param[in] prefix - The new address prefix
*/
-void reconfigureIfAddr6(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void reconfigureIfAddr6(sdbusplus::bus_t& bus, const ChannelParams& params,
uint8_t idx, const in6_addr& address, uint8_t prefix);
/** @brief Retrieves the current gateway for the address family on the system
@@ -579,7 +579,7 @@
*/
template <int family>
std::optional<typename AddrFamily<family>::addr>
- getGatewayProperty(sdbusplus::bus::bus& bus, const ChannelParams& params)
+ getGatewayProperty(sdbusplus::bus_t& bus, const ChannelParams& params)
{
auto objPath = "/xyz/openbmc_project/network/" + params.ifname;
auto gatewayStr = std::get<std::string>(
@@ -594,7 +594,7 @@
template <int family>
std::optional<IfNeigh<family>>
- findStaticNeighbor(sdbusplus::bus::bus&, const ChannelParams&,
+ findStaticNeighbor(sdbusplus::bus_t&, const ChannelParams&,
const typename AddrFamily<family>::addr& ip,
ObjectLookupCache& neighbors)
{
@@ -631,7 +631,7 @@
}
template <int family>
-void createNeighbor(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void createNeighbor(sdbusplus::bus_t& bus, const ChannelParams& params,
const typename AddrFamily<family>::addr& address,
const ether_addr& mac)
{
@@ -650,7 +650,7 @@
* @param[in] service - The name of the service
* @param[in] path - The path of the object to delete
*/
-void deleteObjectIfExists(sdbusplus::bus::bus& bus, const std::string& service,
+void deleteObjectIfExists(sdbusplus::bus_t& bus, const std::string& service,
const std::string& path);
/** @brief Sets the value for the default gateway of the channel
@@ -660,7 +660,7 @@
* @param[in] gateway - Gateway address to apply
*/
template <int family>
-void setGatewayProperty(sdbusplus::bus::bus& bus, const ChannelParams& params,
+void setGatewayProperty(sdbusplus::bus_t& bus, const ChannelParams& params,
const typename AddrFamily<family>::addr& address)
{
// Save the old gateway MAC address if it exists so we can recreate it
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index 96776df..7d3cf95 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -349,7 +349,7 @@
sdbusplus::bus::match::rules::interface(
dBusPropertiesInterface) +
sdbusplus::bus::match::rules::argN(0, networkChConfigIntfName),
- [&](sdbusplus::message::message& msg) {
+ [&](sdbusplus::message_t& msg) {
DbusChObjProperties props;
std::string iface;
std::string path = msg.get_path();
@@ -364,7 +364,7 @@
sdbusplus::bus::match::rules::member(interfaceAddedSignal) +
sdbusplus::bus::match::rules::argNpath(
0, std::string(networkIntfObjectBasePath) + "/"),
- [&](sdbusplus::message::message&) { initChannelPersistData(); });
+ [&](sdbusplus::message_t&) { initChannelPersistData(); });
chInterfaceRemovedSignal = std::make_unique<sdbusplus::bus::match_t>(
bus,
@@ -372,7 +372,7 @@
sdbusplus::bus::match::rules::member(interfaceRemovedSignal) +
sdbusplus::bus::match::rules::argNpath(
0, std::string(networkIntfObjectBasePath) + "/"),
- [&](sdbusplus::message::message&) { initChannelPersistData(); });
+ [&](sdbusplus::message_t&) { initChannelPersistData(); });
}
}
@@ -649,7 +649,7 @@
return ccUnspecifiedError;
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Exception: Network interface does not exist");
return ccInvalidFieldRequest;
@@ -1321,7 +1321,7 @@
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>("set-property failed",
entry("SERVICE=%s", service.c_str()),
@@ -1351,7 +1351,7 @@
auto reply = bus.call(method);
reply.read(value);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>("get-property failed",
entry("SERVICE=%s", service.c_str()),
@@ -1396,7 +1396,7 @@
"exception: Network interface does not exist");
continue;
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>(
"exception: Network interface does not exist");
diff --git a/user_channel/channel_mgmt.hpp b/user_channel/channel_mgmt.hpp
index 0f35816..9b03063 100644
--- a/user_channel/channel_mgmt.hpp
+++ b/user_channel/channel_mgmt.hpp
@@ -252,7 +252,7 @@
std::time_t nvFileLastUpdatedTime;
std::time_t voltFileLastUpdatedTime;
boost::interprocess::file_lock mutexCleanupLock;
- sdbusplus::bus::bus bus;
+ sdbusplus::bus_t bus;
bool signalHndlrObjectState = false;
boost::interprocess::file_lock sigHndlrLock;
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index a30c99a..f516d83 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -128,7 +128,7 @@
__attribute__((init_priority(101)));
// TODO: Below code can be removed once it is moved to common layer libmiscutil
-std::string getUserService(sdbusplus::bus::bus& bus, const std::string& intf,
+std::string getUserService(sdbusplus::bus_t& bus, const std::string& intf,
const std::string& path)
{
auto mapperCall = bus.new_method_call(objMapperService, objMapperPath,
@@ -151,7 +151,7 @@
return mapperResponse.begin()->first;
}
-void setDbusProperty(sdbusplus::bus::bus& bus, const std::string& service,
+void setDbusProperty(sdbusplus::bus_t& bus, const std::string& service,
const std::string& objPath, const std::string& interface,
const std::string& property,
const DbusUserPropVariant& value)
@@ -164,7 +164,7 @@
method.append(interface, property, value);
bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to set property",
entry("PROPERTY=%s", property.c_str()),
@@ -176,7 +176,7 @@
static std::string getUserServiceName()
{
- static sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection());
+ static sdbusplus::bus_t bus(ipmid_get_sd_bus_connection());
static std::string userMgmtService;
if (userMgmtService.empty())
{
@@ -185,7 +185,7 @@
userMgmtService =
ipmi::getUserService(bus, userMgrInterface, userMgrObjBasePath);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
userMgmtService.clear();
}
@@ -302,10 +302,9 @@
return;
}
-void userUpdatedSignalHandler(UserAccess& usrAccess,
- sdbusplus::message::message& msg)
+void userUpdatedSignalHandler(UserAccess& usrAccess, sdbusplus::message_t& msg)
{
- static sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection());
+ static sdbusplus::bus_t bus(ipmid_get_sd_bus_connection());
std::string signal = msg.get_member();
std::string userName, priv, newUserName;
std::vector<std::string> groups;
@@ -410,7 +409,7 @@
auto reply = bus.call(method);
reply.read(properties);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>(
"Failed to excute method",
@@ -584,7 +583,7 @@
auto reply = bus.call(method);
reply.read(properties);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to excute method",
entry("METHOD=%s", getSubTreeMethod),
@@ -1038,7 +1037,7 @@
deleteUserInterface, deleteUserMethod);
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", deleteUserMethod),
@@ -1062,7 +1061,7 @@
method.append(userName.c_str(), availableGroups, "", false);
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", createUserMethod),
@@ -1086,7 +1085,7 @@
method.append(oldUser.c_str(), userName.c_str());
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", renameUserMethod),
@@ -1537,7 +1536,7 @@
auto reply = bus.call(method);
reply.read(properties);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", getAllPropertiesMethod),
@@ -1656,7 +1655,7 @@
sdbusplus::bus::match::rules::type::signal() +
sdbusplus::bus::match::rules::interface(dBusObjManager) +
sdbusplus::bus::match::rules::path(userMgrObjBasePath),
- [&](sdbusplus::message::message& msg) {
+ [&](sdbusplus::message_t& msg) {
userUpdatedSignalHandler(*this, msg);
});
userMgrRenamedSignal = std::make_unique<sdbusplus::bus::match_t>(
@@ -1664,7 +1663,7 @@
sdbusplus::bus::match::rules::type::signal() +
sdbusplus::bus::match::rules::interface(userMgrInterface) +
sdbusplus::bus::match::rules::path(userMgrObjBasePath),
- [&](sdbusplus::message::message& msg) {
+ [&](sdbusplus::message_t& msg) {
userUpdatedSignalHandler(*this, msg);
});
userPropertiesSignal = std::make_unique<sdbusplus::bus::match_t>(
@@ -1675,7 +1674,7 @@
dBusPropertiesInterface) +
sdbusplus::bus::match::rules::member(propertiesChangedSignal) +
sdbusplus::bus::match::rules::argN(0, usersInterface),
- [&](sdbusplus::message::message& msg) {
+ [&](sdbusplus::message_t& msg) {
userUpdatedSignalHandler(*this, msg);
});
signalHndlrObject = true;
@@ -1689,7 +1688,7 @@
auto reply = bus.call(method);
reply.read(managedObjs);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::DEBUG>("Failed to excute method",
entry("METHOD=%s", getSubTreeMethod),
diff --git a/user_channel/user_mgmt.hpp b/user_channel/user_mgmt.hpp
index 602d549..b3db460 100644
--- a/user_channel/user_mgmt.hpp
+++ b/user_channel/user_mgmt.hpp
@@ -378,7 +378,7 @@
UsersTbl usersTbl;
std::vector<std::string> availablePrivileges;
std::vector<std::string> availableGroups;
- sdbusplus::bus::bus bus;
+ sdbusplus::bus_t bus;
std::timespec fileLastUpdatedTime;
bool signalHndlrObject = false;
boost::interprocess::file_lock sigHndlrLock;
diff --git a/whitelist-filter.cpp b/whitelist-filter.cpp
index 9f1e7c8..114f7ca 100644
--- a/whitelist-filter.cpp
+++ b/whitelist-filter.cpp
@@ -36,13 +36,13 @@
private:
void postInit();
void cacheRestrictedMode();
- void handleRestrictedModeChange(sdbusplus::message::message& m);
+ void handleRestrictedModeChange(sdbusplus::message_t& m);
ipmi::Cc filterMessage(ipmi::message::Request::ptr request);
bool restrictedMode = true;
std::shared_ptr<sdbusplus::asio::connection> bus;
std::unique_ptr<settings::Objects> objects;
- std::unique_ptr<sdbusplus::bus::match::match> modeChangeMatch;
+ std::unique_ptr<sdbusplus::bus::match_t> modeChangeMatch;
static constexpr const char restrictionModeIntf[] =
"xyz.openbmc_project.Control.Security.RestrictionMode";
@@ -102,7 +102,7 @@
"RestrictionMode");
}
-void WhitelistFilter::handleRestrictedModeChange(sdbusplus::message::message& m)
+void WhitelistFilter::handleRestrictedModeChange(sdbusplus::message_t& m)
{
using namespace sdbusplus::xyz::openbmc_project::Control::Security::server;
std::string intf;
@@ -149,10 +149,9 @@
log<level::ERR>("Failed to determine restriction mode filter string");
return;
}
- modeChangeMatch = std::make_unique<sdbusplus::bus::match::match>(
- *bus, filterStr, [this](sdbusplus::message::message& m) {
- handleRestrictedModeChange(m);
- });
+ modeChangeMatch = std::make_unique<sdbusplus::bus::match_t>(
+ *bus, filterStr,
+ [this](sdbusplus::message_t& m) { handleRestrictedModeChange(m); });
}
ipmi::Cc WhitelistFilter::filterMessage(ipmi::message::Request::ptr request)