ItemUpdater: Implement Software.Extended Version
- Add Extended version in the MANIFEST
- Create an ExtendedVersion object
- Populate the ExtendedVersion object from MANIFEST
Resolves openbmc/openbmc#1401
Change-Id: Icb21e51a2a74c94f54ffecbd9057add4a0d3d694
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/activation.hpp b/activation.hpp
index 08fba78..5c6c5fe 100755
--- a/activation.hpp
+++ b/activation.hpp
@@ -3,6 +3,7 @@
#include <sdbusplus/bus.hpp>
#include <xyz/openbmc_project/Software/Activation/server.hpp>
#include <xyz/openbmc_project/Software/ActivationBlocksTransition/server.hpp>
+#include "xyz/openbmc_project/Software/ExtendedVersion/server.hpp"
namespace openpower
{
@@ -12,6 +13,7 @@
{
using ActivationInherit = sdbusplus::server::object::object<
+ sdbusplus::xyz::openbmc_project::Software::server::ExtendedVersion,
sdbusplus::xyz::openbmc_project::Software::server::Activation>;
using ActivationBlocksTransitionInherit = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Software::server::ActivationBlocksTransition>;
@@ -28,12 +30,21 @@
*
* @param[in] bus - The Dbus bus object
* @param[in] path - The Dbus object path
- * @param[in] versionId - The software version id
+ * @param[in] versionId - The software version id
+ * @param[in] extVersion - The extended version
*/
Activation(sdbusplus::bus::bus& bus, const std::string& path,
- std::string& versionId) :
- ActivationInherit(bus, path.c_str()),
- versionId(versionId) {}
+ std::string& versionId,
+ std::string& extVersion) :
+ ActivationInherit(bus, path.c_str(), true),
+ versionId(versionId)
+ {
+ // Set Properties.
+ extendedVersion(extVersion);
+
+ // Emit deferred signal.
+ emit_object_added();
+ }
/** @brief Overloaded Activation property setter function
*