diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2017-04-17 16:10:15 -0500 |
---|---|---|
committer | Gunnar Mills <gmills@us.ibm.com> | 2017-04-25 16:53:27 -0500 |
commit | cebd1021cf9d76166c5756307c4c712b985320b2 (patch) | |
tree | c2ba6d3b982e88236167772f869726123cdd9fb4 /version.hpp | |
parent | 392f294d5cb4a0ba65d81669e8d9be66841c7297 (diff) | |
download | phosphor-bmc-code-mgmt-cebd1021cf9d76166c5756307c4c712b985320b2.tar.gz phosphor-bmc-code-mgmt-cebd1021cf9d76166c5756307c4c712b985320b2.zip |
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>
Diffstat (limited to 'version.hpp')
-rwxr-xr-x | version.hpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/version.hpp b/version.hpp index 6c45e0a..cd52fa0 100755 --- a/version.hpp +++ b/version.hpp @@ -23,16 +23,19 @@ class Version : public VersionInherit 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 @@ class Version : public VersionInherit } /** - * @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 |