Activation: remove old objects after update done
The update on PSUs is one-by-one, after each PSU is updated, notify
ItemUpdater by onUpdateDone() so that the old object for the PSU is
removed.
Tested: With dummy PSU image and update service, verify the old
objects are removed on Witherspoon.
Change-Id: I212b8cba9570ad96083d362bf57691fdabb4e42f
diff --git a/src/activation_listener.hpp b/src/activation_listener.hpp
new file mode 100644
index 0000000..5437232
--- /dev/null
+++ b/src/activation_listener.hpp
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <string>
+
+class ActivationListener
+{
+ public:
+ virtual ~ActivationListener() = default;
+
+ /** @brief Notify a PSU is updated
+ *
+ * @param[in] versionId - The versionId of the activation
+ * @param[in] psuInventoryPath - The PSU inventory path that is updated
+ */
+ virtual void onUpdateDone(const std::string& versionId,
+ const std::string& psuInventoryPath) = 0;
+};