Pass in the version purpose.
Since this will handle both the host and the bmc images,
need to be able to pass in the version purpose.
Change-Id: If09b3b81d9dc6166c61a4780ddaed7e1bdc021d0
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/version.hpp b/version.hpp
index 6c45e0a..cd52fa0 100755
--- a/version.hpp
+++ b/version.hpp
@@ -23,16 +23,19 @@
public:
/** @brief Constructs Version Software Manager
*
- * @param[in] bus - The Dbus bus object
- * @param[in] objPath - The Dbus object path
- * @param[in] versionId - The Host version identifier
+ * @param[in] bus - The Dbus bus object
+ * @param[in] objPath - The Dbus object path
+ * @param[in] versionId - The version identifier
+ * @param[in] versionPurpose - The version purpose
*/
Version(sdbusplus::bus::bus& bus,
const std::string& objPath,
- const std::string& versionId) : VersionInherit(
+ const std::string& versionId,
+ VersionPurpose versionPurpose) : VersionInherit(
bus, (objPath).c_str(), true)
{
// Set properties.
+ purpose(versionPurpose);
version(versionId);
// Emit deferred signal.
@@ -40,18 +43,20 @@
}
/**
- * @brief Get the code version identifier.
+ * @brief Read the manifest file to get the value of the key.
*
- * @return The version identifier.
+ * @return The value of the key.
**/
- static std::string getVersion(const std::string& manifestFilePath);
+ static std::string getValue(const std::string& manifestFilePath,
+ std::string key);
/**
- * @brief Get the Host Version id.
+ * @brief Get the Version id.
*
* @return The id.
**/
static std::string getId(const std::string& version);
+
};
} // namespace manager