Refactor: remove DeleteAll interface
There is no need for ItemUpdater to implement DeleteAll interface,
remove it.
Also make Activation::versionId private and provide a public
getVersionId() method;
Make ItemUpdater::erase() to pass const reference.
Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ifd6c61fc21b2967d6c83f1df7aaa3b2e94cae86c
diff --git a/src/activation.hpp b/src/activation.hpp
index b46105b..7ad03c9 100644
--- a/src/activation.hpp
+++ b/src/activation.hpp
@@ -128,7 +128,7 @@
Status activationStatus, const AssociationList& assocs,
AssociationInterface* associationInterface) :
ActivationInherit(bus, path.c_str(), true),
- versionId(versionId), bus(bus), path(path),
+ bus(bus), path(path), versionId(versionId),
systemdSignals(
bus,
sdbusRule::type::signal() + sdbusRule::member("JobRemoved") +
@@ -171,8 +171,11 @@
RequestedActivations
requestedActivation(RequestedActivations value) override;
- /** @brief Version id */
- std::string versionId;
+ /** @brief Get the version ID */
+ const std::string& getVersionId() const
+ {
+ return versionId;
+ }
private:
/** @brief Check if systemd state change is relevant to this object
@@ -226,6 +229,9 @@
/** @brief Persistent DBus object path */
std::string path;
+ /** @brief Version id */
+ std::string versionId;
+
/** @brief Used to subscribe to dbus systemd signals */
sdbusplus::bus::match_t systemdSignals;