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: If9a7314dade153dd7dbd149a76352aca8257839d
diff --git a/activation.cpp b/activation.cpp
index 0ab5eb5..b873702 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -47,7 +47,7 @@
{
this->bus.call_noreply(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
if (e.name() != nullptr &&
strcmp("org.freedesktop.systemd1.AlreadySubscribed", e.name()) == 0)
@@ -117,7 +117,7 @@
return;
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error in Get Delete Object",
entry("VERSIONPATH=%s", path.c_str()));
@@ -147,7 +147,7 @@
{
bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
if (e.name() != nullptr && strcmp("System.Error.ELOOP", e.name()) == 0)
{
@@ -192,7 +192,7 @@
return true;
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error in getting ApplyTime",
entry("ERROR=%s", e.what()));
@@ -220,7 +220,7 @@
{
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ALERT>("Error in trying to reboot the Host. "
"The Host needs to be manually rebooted to complete "
@@ -286,7 +286,7 @@
reply.read(fieldMode);
return std::get<bool>(fieldMode);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error in fieldModeEnabled getValue");
elog<InternalFailure>();
diff --git a/activation.hpp b/activation.hpp
index cc2df97..31f7023 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -23,16 +23,16 @@
using AssociationList =
std::vector<std::tuple<std::string, std::string, std::string>>;
-using ActivationInherit = sdbusplus::server::object::object<
+using ActivationInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Software::server::ExtendedVersion,
sdbusplus::xyz::openbmc_project::Software::server::Activation,
sdbusplus::xyz::openbmc_project::Association::server::Definitions>;
-using ActivationBlocksTransitionInherit = sdbusplus::server::object::object<
- sdbusplus::xyz::openbmc_project::Software::server::
- ActivationBlocksTransition>;
-using RedundancyPriorityInherit = sdbusplus::server::object::object<
+using ActivationBlocksTransitionInherit =
+ sdbusplus::server::object_t<sdbusplus::xyz::openbmc_project::Software::
+ server::ActivationBlocksTransition>;
+using RedundancyPriorityInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Software::server::RedundancyPriority>;
-using ActivationProgressInherit = sdbusplus::server::object::object<
+using ActivationProgressInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Software::server::ActivationProgress>;
constexpr auto applyTimeImmediate =
@@ -69,7 +69,7 @@
* @param[in] parent - Parent object.
* @param[in] value - The redundancyPriority value
*/
- RedundancyPriority(sdbusplus::bus::bus& bus, const std::string& path,
+ RedundancyPriority(sdbusplus::bus_t& bus, const std::string& path,
Activation& parent, uint8_t value) :
RedundancyPriorityInherit(bus, path.c_str(),
action::emit_interface_added),
@@ -110,8 +110,7 @@
* @param[in] bus - The Dbus bus object
* @param[in] path - The Dbus object path
*/
- ActivationBlocksTransition(sdbusplus::bus::bus& bus,
- const std::string& path) :
+ ActivationBlocksTransition(sdbusplus::bus_t& bus, const std::string& path) :
ActivationBlocksTransitionInherit(bus, path.c_str(),
action::emit_interface_added)
@@ -126,7 +125,7 @@
* @param[in] bus - The Dbus bus object
* @param[in] path - The Dbus object path
*/
- ActivationProgress(sdbusplus::bus::bus& bus, const std::string& path) :
+ ActivationProgress(sdbusplus::bus_t& bus, const std::string& path) :
ActivationProgressInherit(bus, path.c_str(),
action::emit_interface_added)
{
@@ -152,7 +151,7 @@
* @param[in] activationStatus - The status of Activation
* @param[in] assocs - Association objects
*/
- Activation(sdbusplus::bus::bus& bus, const std::string& path,
+ Activation(sdbusplus::bus_t& bus, const std::string& path,
ItemUpdater& parent, const std::string& versionId,
const std::string& extVersion,
sdbusplus::xyz::openbmc_project::Software::server::Activation::
@@ -207,7 +206,7 @@
void unsubscribeFromSystemdSignals();
/** @brief Persistent sdbusplus DBus bus connection */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Persistent DBus object path */
std::string path;
@@ -253,7 +252,7 @@
* @param[in] msg - Data associated with subscribed signal
*
*/
- virtual void unitStateChange(sdbusplus::message::message& msg) = 0;
+ virtual void unitStateChange(sdbusplus::message_t& msg) = 0;
/**
* @brief Deletes the version from Image Manager and the
diff --git a/functions.cpp b/functions.cpp
index fe112a4..c06108f 100644
--- a/functions.cpp
+++ b/functions.cpp
@@ -40,7 +40,7 @@
/**
* @brief Returns the managed objects for a given service
*/
-ManagedObjectType getManagedObjects(sdbusplus::bus::bus& bus,
+ManagedObjectType getManagedObjects(sdbusplus::bus_t& bus,
const std::string& service)
{
auto method = bus.new_method_call(service.c_str(), "/",
@@ -54,7 +54,7 @@
auto reply = bus.call(method);
reply.read(objects);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
return ManagedObjectType{};
}
@@ -419,7 +419,7 @@
std::variant<PendingAttributesType>(pendingAttributes));
bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::INFO>("Error setting the bios attribute",
entry("ERROR=%s", e.what()),
@@ -480,7 +480,7 @@
{
callback(ibmCompatibleSystem);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
return false;
}
@@ -506,7 +506,7 @@
* @return true if message contained an instance of
* xyz.openbmc_project.Configuration.IBMCompatibleSystem, false otherwise
*/
-bool maybeCallMessage(sdbusplus::message::message& message,
+bool maybeCallMessage(sdbusplus::message_t& message,
const MaybeCallCallbackType& callback)
{
std::map<std::string,
@@ -575,7 +575,7 @@
{
setBiosAttr(elementsJsonFilePath, extensions);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
throw;
}
@@ -613,7 +613,7 @@
* pointer to an sdbusplus match object.
*/
std::shared_ptr<void> processHostFirmware(
- sdbusplus::bus::bus& bus,
+ sdbusplus::bus_t& bus,
std::map<std::string, std::vector<std::string>> extensionMap,
std::filesystem::path hostFirmwareDirectory,
ErrorCallbackType errorCallback, sdeventplus::Event& loop)
@@ -631,7 +631,7 @@
// register for a callback in case the IBMCompatibleSystem interface has
// not yet been published by entity manager.
- auto interfacesAddedMatch = std::make_shared<sdbusplus::bus::match::match>(
+ auto interfacesAddedMatch = std::make_shared<sdbusplus::bus::match_t>(
bus,
sdbusplus::bus::match::rules::interfacesAdded() +
sdbusplus::bus::match::rules::sender(
@@ -675,7 +675,7 @@
auto reply = bus.call(getManagedObjects);
reply.read(objects);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
// Error querying the EntityManager interface. Return the match to have
// the callback run if/when the interface appears in D-Bus.
@@ -726,7 +726,7 @@
* @return nullptr
*/
std::vector<std::shared_ptr<void>> updateBiosAttrTable(
- sdbusplus::bus::bus& bus,
+ sdbusplus::bus_t& bus,
std::map<std::string, std::vector<std::string>> extensionMap,
std::filesystem::path elementsJsonFilePath, sdeventplus::Event& loop)
{
@@ -748,7 +748,7 @@
// Entity Manager is needed to get the list of supported extensions. Add a
// match to monitor interfaces added in case it's not running yet.
- matches.emplace_back(std::make_shared<sdbusplus::bus::match::match>(
+ matches.emplace_back(std::make_shared<sdbusplus::bus::match_t>(
bus,
sdbusplus::bus::match::rules::interfacesAdded() +
sdbusplus::bus::match::rules::sender(
@@ -764,7 +764,7 @@
// The BIOS attribute table can only be updated if PLDM is running because
// PLDM is the one that exposes this property. Add a match to monitor when
// the PLDM service starts.
- matches.emplace_back(std::make_shared<sdbusplus::bus::match::match>(
+ matches.emplace_back(std::make_shared<sdbusplus::bus::match_t>(
bus,
sdbusplus::bus::match::rules::nameOwnerChanged() +
sdbusplus::bus::match::rules::arg0namespace(
diff --git a/functions.hpp b/functions.hpp
index 0cd788e..2fa25c0 100644
--- a/functions.hpp
+++ b/functions.hpp
@@ -12,6 +12,7 @@
{
class bus;
} // namespace bus
+using bus_t = bus::bus;
} // namespace sdbusplus
namespace sdeventplus
@@ -43,10 +44,10 @@
std::map<std::string, std::variant<std::vector<std::string>>>>&,
const MaybeCallCallbackType&);
std::shared_ptr<void> processHostFirmware(
- sdbusplus::bus::bus&, std::map<std::string, std::vector<std::string>>,
+ sdbusplus::bus_t&, std::map<std::string, std::vector<std::string>>,
std::filesystem::path, ErrorCallbackType, sdeventplus::Event&);
std::vector<std::shared_ptr<void>>
- updateBiosAttrTable(sdbusplus::bus::bus&,
+ updateBiosAttrTable(sdbusplus::bus_t&,
std::map<std::string, std::vector<std::string>>,
std::filesystem::path, sdeventplus::Event&);
} // namespace process_hostfirmware
diff --git a/item_updater.cpp b/item_updater.cpp
index b57650a..3173481 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -21,7 +21,7 @@
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
using namespace phosphor::logging;
-void ItemUpdater::createActivation(sdbusplus::message::message& m)
+void ItemUpdater::createActivation(sdbusplus::message_t& m)
{
using SVersion = server::Version;
using VersionPurpose = SVersion::VersionPurpose;
@@ -233,7 +233,7 @@
elog<InternalFailure>();
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error in Mapper call");
elog<InternalFailure>();
@@ -253,7 +253,7 @@
auto strParam = std::get<std::string>(currentChassisState);
return (strParam != CHASSIS_STATE_OFF);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error in fetching current Chassis State",
entry("MAPPERRESPONSE=%s",
diff --git a/item_updater.hpp b/item_updater.hpp
index d104dc4..0b880c7 100644
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -18,13 +18,13 @@
namespace updater
{
-using ItemUpdaterInherit = sdbusplus::server::object::object<
+using ItemUpdaterInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Common::server::FactoryReset,
sdbusplus::xyz::openbmc_project::Association::server::Definitions,
sdbusplus::xyz::openbmc_project::Collection::server::DeleteAll>;
-using GardResetInherit = sdbusplus::server::object::object<
+using GardResetInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Common::server::FactoryReset>;
-using ObjectEnable = sdbusplus::server::object::object<
+using ObjectEnable = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Object::server::Enable>;
namespace MatchRules = sdbusplus::bus::match::rules;
@@ -47,7 +47,7 @@
* @param[in] bus - The Dbus bus object
* @param[in] path - The Dbus object path
*/
- GardReset(sdbusplus::bus::bus& bus, const std::string& path) :
+ GardReset(sdbusplus::bus_t& bus, const std::string& path) :
GardResetInherit(bus, path.c_str(),
GardResetInherit::action::emit_interface_added),
bus(bus), path(path)
@@ -59,7 +59,7 @@
protected:
// TODO Remove once openbmc/openbmc#1975 is resolved
static constexpr auto interface = "xyz.openbmc_project.Common.FactoryReset";
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
std::string path;
/**
@@ -79,7 +79,7 @@
* @param[in] bus - The D-Bus bus object
* @param[in] path - The D-Bus path
*/
- ItemUpdater(sdbusplus::bus::bus& bus, const std::string& path) :
+ ItemUpdater(sdbusplus::bus_t& bus, const std::string& path) :
ItemUpdaterInherit(bus, path.c_str()), bus(bus),
versionMatch(bus,
MatchRules::interfacesAdded() +
@@ -178,7 +178,7 @@
*
* @param[in] msg - Data associated with subscribed signal
*/
- virtual void createActivation(sdbusplus::message::message& msg);
+ virtual void createActivation(sdbusplus::message_t& msg);
/** @brief Create Activation object */
virtual std::unique_ptr<Activation> createActivationObject(
@@ -201,7 +201,7 @@
virtual bool validateImage(const std::string& path) = 0;
/** @brief Persistent sdbusplus D-Bus bus connection. */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Persistent map of Activation D-Bus objects and their
* version id */
diff --git a/item_updater_main.cpp b/item_updater_main.cpp
index 556e03d..855aaf2 100644
--- a/item_updater_main.cpp
+++ b/item_updater_main.cpp
@@ -28,10 +28,9 @@
{
namespace updater
{
-void initializeService(sdbusplus::bus::bus& bus)
+void initializeService(sdbusplus::bus_t& bus)
{
- static sdbusplus::server::manager::manager objManager(bus,
- SOFTWARE_OBJPATH);
+ static sdbusplus::server::manager_t objManager(bus, SOFTWARE_OBJPATH);
#ifdef UBIFS_LAYOUT
static ItemUpdaterUbi updater(bus, SOFTWARE_OBJPATH);
static Watch watch(
diff --git a/mmc/activation_mmc.cpp b/mmc/activation_mmc.cpp
index b5a5669..a50e99b 100644
--- a/mmc/activation_mmc.cpp
+++ b/mmc/activation_mmc.cpp
@@ -16,7 +16,7 @@
void ActivationMMC::startActivation()
{}
-void ActivationMMC::unitStateChange(sdbusplus::message::message&)
+void ActivationMMC::unitStateChange(sdbusplus::message_t&)
{}
void ActivationMMC::finishActivation()
diff --git a/mmc/activation_mmc.hpp b/mmc/activation_mmc.hpp
index 68caf36..aca8811 100644
--- a/mmc/activation_mmc.hpp
+++ b/mmc/activation_mmc.hpp
@@ -22,7 +22,7 @@
Activations activation(Activations value) override;
private:
- void unitStateChange(sdbusplus::message::message& msg) override;
+ void unitStateChange(sdbusplus::message_t& msg) override;
void startActivation() override;
void finishActivation() override;
};
diff --git a/mmc/item_updater_mmc.hpp b/mmc/item_updater_mmc.hpp
index 76dfcaa..a8b495b 100644
--- a/mmc/item_updater_mmc.hpp
+++ b/mmc/item_updater_mmc.hpp
@@ -28,7 +28,7 @@
class ItemUpdaterMMC : public ItemUpdater
{
public:
- ItemUpdaterMMC(sdbusplus::bus::bus& bus, const std::string& path) :
+ ItemUpdaterMMC(sdbusplus::bus_t& bus, const std::string& path) :
ItemUpdater(bus, path)
{
processPNORImage();
diff --git a/msl_verify.cpp b/msl_verify.cpp
index e59e250..1be1d04 100644
--- a/msl_verify.cpp
+++ b/msl_verify.cpp
@@ -93,7 +93,7 @@
{
response.read(associations);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to read software associations",
entry("ERROR=%s", e.what()),
@@ -123,7 +123,7 @@
response.read(functionalVersion);
return std::get<std::string>(functionalVersion);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
"Failed to read version property",
diff --git a/static/activation_static.cpp b/static/activation_static.cpp
index 8842f05..9b451cf 100644
--- a/static/activation_static.cpp
+++ b/static/activation_static.cpp
@@ -109,7 +109,7 @@
activationProgress->progress(10);
}
-void ActivationStatic::unitStateChange(sdbusplus::message::message& msg)
+void ActivationStatic::unitStateChange(sdbusplus::message_t& msg)
{
uint32_t newStateID{};
sdbusplus::message::object_path newStateObjPath;
diff --git a/static/activation_static.hpp b/static/activation_static.hpp
index 8cf563c..d96a748 100644
--- a/static/activation_static.hpp
+++ b/static/activation_static.hpp
@@ -25,7 +25,7 @@
Activations activation(Activations value) override;
private:
- void unitStateChange(sdbusplus::message::message& msg) override;
+ void unitStateChange(sdbusplus::message_t& msg) override;
void startActivation() override;
void finishActivation() override;
diff --git a/static/item_updater_static.hpp b/static/item_updater_static.hpp
index ce50462..6fc39a0 100644
--- a/static/item_updater_static.hpp
+++ b/static/item_updater_static.hpp
@@ -30,7 +30,7 @@
class ItemUpdaterStatic : public ItemUpdater
{
public:
- ItemUpdaterStatic(sdbusplus::bus::bus& bus, const std::string& path) :
+ ItemUpdaterStatic(sdbusplus::bus_t& bus, const std::string& path) :
ItemUpdater(bus, path)
{
processPNORImage();
diff --git a/ubi/activation_ubi.cpp b/ubi/activation_ubi.cpp
index 946a741..205c393 100644
--- a/ubi/activation_ubi.cpp
+++ b/ubi/activation_ubi.cpp
@@ -129,7 +129,7 @@
activationProgress->progress(10);
}
-void ActivationUbi::unitStateChange(sdbusplus::message::message& msg)
+void ActivationUbi::unitStateChange(sdbusplus::message_t& msg)
{
uint32_t newStateID{};
sdbusplus::message::object_path newStateObjPath;
diff --git a/ubi/activation_ubi.hpp b/ubi/activation_ubi.hpp
index 957ee06..26d4209 100644
--- a/ubi/activation_ubi.hpp
+++ b/ubi/activation_ubi.hpp
@@ -16,7 +16,7 @@
class RedundancyPriorityUbi : public RedundancyPriority
{
public:
- RedundancyPriorityUbi(sdbusplus::bus::bus& bus, const std::string& path,
+ RedundancyPriorityUbi(sdbusplus::bus_t& bus, const std::string& path,
Activation& parent, uint8_t value) :
RedundancyPriority(bus, path, parent, value)
{
@@ -60,7 +60,7 @@
*created as part of the activation process. **/
bool ubiVolumesCreated = false;
- void unitStateChange(sdbusplus::message::message& msg) override;
+ void unitStateChange(sdbusplus::message_t& msg) override;
void startActivation() override;
void finishActivation() override;
};
diff --git a/ubi/item_updater_ubi.hpp b/ubi/item_updater_ubi.hpp
index ccd8e57..f462bdf 100644
--- a/ubi/item_updater_ubi.hpp
+++ b/ubi/item_updater_ubi.hpp
@@ -30,7 +30,7 @@
class ItemUpdaterUbi : public ItemUpdater
{
public:
- ItemUpdaterUbi(sdbusplus::bus::bus& bus, const std::string& path) :
+ ItemUpdaterUbi(sdbusplus::bus_t& bus, const std::string& path) :
ItemUpdater(bus, path)
{
processPNORImage();
diff --git a/utils.cpp b/utils.cpp
index f7a1194..f50e2b4 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -46,7 +46,7 @@
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
-std::string getService(sdbusplus::bus::bus& bus, const std::string& path,
+std::string getService(sdbusplus::bus_t& bus, const std::string& path,
const std::string& intf)
{
auto mapper = bus.new_method_call(MAPPER_BUSNAME, MAPPER_PATH,
@@ -67,7 +67,7 @@
}
return mapperResponse[0].first;
}
- catch (const sdbusplus::exception::exception& ex)
+ catch (const sdbusplus::exception_t& ex)
{
log<level::ERR>("Mapper call failed", entry("METHOD=%d", "GetObject"),
entry("PATH=%s", path.c_str()),
@@ -76,7 +76,7 @@
}
}
-void hiomapdSuspend(sdbusplus::bus::bus& bus)
+void hiomapdSuspend(sdbusplus::bus_t& bus)
{
auto service = getService(bus, HIOMAPD_PATH, HIOMAPD_INTERFACE);
auto method = bus.new_method_call(service.c_str(), HIOMAPD_PATH,
@@ -86,14 +86,14 @@
{
bus.call_noreply(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error in mboxd suspend call",
entry("ERROR=%s", e.what()));
}
}
-void hiomapdResume(sdbusplus::bus::bus& bus)
+void hiomapdResume(sdbusplus::bus_t& bus)
{
auto service = getService(bus, HIOMAPD_PATH, HIOMAPD_INTERFACE);
auto method = bus.new_method_call(service.c_str(), HIOMAPD_PATH,
@@ -105,14 +105,14 @@
{
bus.call_noreply(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error in mboxd suspend call",
entry("ERROR=%s", e.what()));
}
}
-void setPendingAttributes(sdbusplus::bus::bus& bus, const std::string& attrName,
+void setPendingAttributes(sdbusplus::bus_t& bus, const std::string& attrName,
const std::string& attrValue)
{
constexpr auto biosConfigPath = "/xyz/openbmc_project/bios_config/manager";
@@ -135,7 +135,7 @@
std::variant<PendingAttributesType>(pendingAttributes));
bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error setting the bios attribute",
entry("ERROR=%s", e.what()),
@@ -145,17 +145,17 @@
}
}
-void clearHMCManaged(sdbusplus::bus::bus& bus)
+void clearHMCManaged(sdbusplus::bus_t& bus)
{
setPendingAttributes(bus, "pvm_hmc_managed", "Disabled");
}
-void setClearNvram(sdbusplus::bus::bus& bus)
+void setClearNvram(sdbusplus::bus_t& bus)
{
setPendingAttributes(bus, "pvm_clear_nvram", "Enabled");
}
-void deleteAllErrorLogs(sdbusplus::bus::bus& bus)
+void deleteAllErrorLogs(sdbusplus::bus_t& bus)
{
constexpr auto loggingPath = "/xyz/openbmc_project/logging";
constexpr auto deleteAllIntf = "xyz.openbmc_project.Collection.DeleteAll";
@@ -168,7 +168,7 @@
{
bus.call_noreply(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Error deleting all error logs",
entry("ERROR=%s", e.what()));
diff --git a/utils.hpp b/utils.hpp
index 97b5e59..a5882fc 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -30,40 +30,40 @@
* @return Service name
* @error InternalFailure exception thrown
*/
-std::string getService(sdbusplus::bus::bus& bus, const std::string& path,
+std::string getService(sdbusplus::bus_t& bus, const std::string& path,
const std::string& intf);
/** @brief Suspend hiomapd.
*
* @param[in] bus - The D-Bus bus object.
*/
-void hiomapdSuspend(sdbusplus::bus::bus& bus);
+void hiomapdSuspend(sdbusplus::bus_t& bus);
/** @brief Resume hiomapd.
*
* @param[in] bus - The D-Bus bus object.
*/
-void hiomapdResume(sdbusplus::bus::bus& bus);
+void hiomapdResume(sdbusplus::bus_t& bus);
/** @brief Set the Hardware Management Console Managed bios attribute to
* Disabled to clear the indication that the system is HMC-managed.
*
* @param[in] bus - The D-Bus bus object.
*/
-void clearHMCManaged(sdbusplus::bus::bus& bus);
+void clearHMCManaged(sdbusplus::bus_t& bus);
/** @brief Set the Clear hypervisor NVRAM bios attribute to Enabled to indicate
* to the hypervisor to clear its NVRAM.
*
* @param[in] bus - The D-Bus bus object.
*/
-void setClearNvram(sdbusplus::bus::bus& bus);
+void setClearNvram(sdbusplus::bus_t& bus);
/** @brief DeleteAll error logs
*
* @param[in] bus - The D-Bus bus object.
*/
-void deleteAllErrorLogs(sdbusplus::bus::bus& bus);
+void deleteAllErrorLogs(sdbusplus::bus_t& bus);
} // namespace utils
diff --git a/version.cpp b/version.cpp
index d480c43..574e298 100644
--- a/version.cpp
+++ b/version.cpp
@@ -146,7 +146,7 @@
}
}
-void Version::updateDeleteInterface(sdbusplus::message::message& msg)
+void Version::updateDeleteInterface(sdbusplus::message_t& msg)
{
std::string interface, chassisState;
std::map<std::string, std::variant<std::string>> properties;
diff --git a/version.hpp b/version.hpp
index 7cd2be7..9d2fa50 100644
--- a/version.hpp
+++ b/version.hpp
@@ -21,10 +21,10 @@
typedef std::function<void(std::string)> eraseFunc;
-using VersionInherit = sdbusplus::server::object::object<
+using VersionInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Software::server::Version,
sdbusplus::xyz::openbmc_project::Common::server::FilePath>;
-using DeleteInherit = sdbusplus::server::object::object<
+using DeleteInherit = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Object::server::Delete>;
namespace sdbusRule = sdbusplus::bus::match::rules;
@@ -46,7 +46,7 @@
* @param[in] path - The D-Bus object path
* @param[in] parent - Parent object.
*/
- Delete(sdbusplus::bus::bus& bus, const std::string& path, Version& parent) :
+ Delete(sdbusplus::bus_t& bus, const std::string& path, Version& parent) :
DeleteInherit(bus, path.c_str(), action::emit_interface_added),
parent(parent)
{}
@@ -82,7 +82,7 @@
* @param[in] filePath - The image filesystem path
* @param[in] callback - The eraseFunc callback
*/
- Version(sdbusplus::bus::bus& bus, const std::string& objPath,
+ Version(sdbusplus::bus_t& bus, const std::string& objPath,
ItemUpdater& parent, const std::string& versionId,
const std::string& versionString, VersionPurpose versionPurpose,
const std::string& filePath, eraseFunc callback) :
@@ -118,7 +118,7 @@
*
* @param[in] msg - Data associated with subscribed signal
*/
- void updateDeleteInterface(sdbusplus::message::message& msg);
+ void updateDeleteInterface(sdbusplus::message_t& msg);
/**
* @brief Read the manifest file to get the value of the key.
@@ -163,7 +163,7 @@
private:
/** @brief Persistent sdbusplus DBus bus connection */
- sdbusplus::bus::bus& bus;
+ sdbusplus::bus_t& bus;
/** @brief Persistent DBus object path */
std::string objPath;