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: Tang Yiwei <tangyiwei.2022@bytedance.com>
Change-Id: Ibb77315bca56d6cebfb540976f44ee362534f942
diff --git a/src/activation.hpp b/src/activation.hpp
index 95fe069..622474a 100644
--- a/src/activation.hpp
+++ b/src/activation.hpp
@@ -120,7 +120,8 @@
const std::string& filePath,
AssociationInterface* associationInterface,
ActivationListener* activationListener) :
- ActivationInherit(bus, objPath.c_str(), true),
+ ActivationInherit(bus, objPath.c_str(),
+ ActivationInherit::action::defer_emit),
bus(bus), objPath(objPath), versionId(versionId),
systemdSignals(
bus,
diff --git a/src/version.hpp b/src/version.hpp
index 2f72189..4c4dfde 100644
--- a/src/version.hpp
+++ b/src/version.hpp
@@ -77,7 +77,8 @@
Version(sdbusplus::bus::bus& bus, const std::string& objPath,
const std::string& versionId, const std::string& versionString,
VersionPurpose versionPurpose, eraseFunc callback) :
- VersionInherit(bus, (objPath).c_str(), true),
+ VersionInherit(bus, (objPath).c_str(),
+ VersionInherit::action::defer_emit),
eraseCallback(callback), bus(bus), objPath(objPath),
versionId(versionId), versionStr(versionString)
{