sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.
It is time to remove this boolean to make it more observable which
actions are being used in applications. Map all `true` occurrences to
`action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5479733e7f0a81c10fa432538be3f6cf730541f4
diff --git a/activation.hpp b/activation.hpp
index 90b32b7..7425a54 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -189,7 +189,8 @@
sdbusplus::xyz::openbmc_project::Software::server::Activation::
Activations activationStatus,
AssociationList& assocs) :
- ActivationInherit(bus, path.c_str(), true),
+ ActivationInherit(bus, path.c_str(),
+ ActivationInherit::action::defer_emit),
bus(bus), path(path), parent(parent), versionId(versionId),
systemdSignals(
bus,
diff --git a/item_updater.hpp b/item_updater.hpp
index 4c47c8b..ccacd28 100644
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -52,7 +52,9 @@
* @param[in] bus - The D-Bus bus object
*/
ItemUpdater(sdbusplus::bus::bus& bus, const std::string& path) :
- ItemUpdaterInherit(bus, path.c_str(), false), bus(bus), helper(bus),
+ ItemUpdaterInherit(bus, path.c_str(),
+ ItemUpdaterInherit::action::defer_emit),
+ bus(bus), helper(bus),
versionMatch(bus,
MatchRules::interfacesAdded() +
MatchRules::path("/xyz/openbmc_project/software"),
diff --git a/version.hpp b/version.hpp
index b6f9172..8f284dd 100644
--- a/version.hpp
+++ b/version.hpp
@@ -85,7 +85,8 @@
const std::string& extVersion, const std::string& filePath,
const std::vector<std::string>& compatibleNames, eraseFunc callback,
const std::string& id) :
- VersionInherit(bus, (objPath).c_str(), true),
+ VersionInherit(bus, (objPath).c_str(),
+ VersionInherit::action::defer_emit),
eraseCallback(callback), id(id), versionStr(versionString)
{
// Set properties.