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` or `action::emit_interface_added`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id3689b24f8719bafa9e5a67960848edff4ddf8c5
diff --git a/activation.hpp b/activation.hpp
index 0622545..cc2df97 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -158,7 +158,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 b1e676b..d104dc4 100644
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -48,17 +48,13 @@
* @param[in] path - The Dbus object path
*/
GardReset(sdbusplus::bus::bus& bus, const std::string& path) :
- GardResetInherit(bus, path.c_str(), true), bus(bus), path(path)
- {
- std::vector<std::string> interfaces({interface});
- bus.emit_interfaces_added(path.c_str(), interfaces);
- }
+ GardResetInherit(bus, path.c_str(),
+ GardResetInherit::action::emit_interface_added),
+ bus(bus), path(path)
+ {}
virtual ~GardReset()
- {
- std::vector<std::string> interfaces({interface});
- bus.emit_interfaces_removed(path.c_str(), interfaces);
- }
+ {}
protected:
// TODO Remove once openbmc/openbmc#1975 is resolved
diff --git a/version.hpp b/version.hpp
index 51a7024..7cd2be7 100644
--- a/version.hpp
+++ b/version.hpp
@@ -86,7 +86,8 @@
ItemUpdater& parent, const std::string& versionId,
const std::string& versionString, VersionPurpose versionPurpose,
const std::string& filePath, eraseFunc callback) :
- VersionInherit(bus, (objPath).c_str(), true),
+ VersionInherit(bus, (objPath).c_str(),
+ VersionInherit::action::defer_emit),
eraseCallback(callback), bus(bus), objPath(objPath), parent(parent),
versionId(versionId), versionStr(versionString),
chassisStateSignals(