Rename class Version to BMCVersion
The class Version is renamed to BMCVersion.
This is needed so there is not 2 classes with the same name,
Version, under namespace phosphor software manager.
This name is more appropriate for the BMC Version Class
that handles the active BMC code.
Change-Id: I9eef4f5240f6cac90a31d6c31aa7f518213830e3
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index c324986..587248f 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
# Build these headers, don't install them
noinst_HEADERS = \
- version_software_manager.hpp \
+ bmc_version.hpp \
download_manager.hpp \
watch.hpp \
version.hpp \
@@ -13,7 +13,7 @@
phosphor-download-manager
phosphor_version_software_manager_SOURCES = \
- version_software_manager.cpp \
+ bmc_version.cpp \
image_manager_main.cpp \
watch.cpp \
version.cpp \
diff --git a/version_software_manager.cpp b/bmc_version.cpp
similarity index 90%
rename from version_software_manager.cpp
rename to bmc_version.cpp
index 7e49638..463b2c4 100644
--- a/version_software_manager.cpp
+++ b/bmc_version.cpp
@@ -3,7 +3,7 @@
#include <sstream>
#include <fstream>
#include <stdexcept>
-#include "version_software_manager.hpp"
+#include "bmc_version.hpp"
namespace phosphor
{
@@ -12,7 +12,7 @@
namespace manager
{
-const std::string Version::getVersion() const
+const std::string BMCVersion::getVersion() const
{
// Get version from /etc/os-release.
std::string versionKey = "VERSION_ID=";
@@ -37,7 +37,7 @@
return version;
}
-const std::string Version::getId() const
+const std::string BMCVersion::getId() const
{
auto version = getVersion();
std::stringstream hexId;
diff --git a/version_software_manager.hpp b/bmc_version.hpp
similarity index 67%
rename from version_software_manager.hpp
rename to bmc_version.hpp
index 58abe1a..9bbfbd0 100644
--- a/version_software_manager.hpp
+++ b/bmc_version.hpp
@@ -11,19 +11,22 @@
namespace manager
{
-using VersionInherit = sdbusplus::server::object::object<
+using BMCVersionInherit = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Software::server::Version,
sdbusplus::xyz::openbmc_project::Software::server::Activation>;
+ // TODO: Move activation interface to Item Updater.
-/** @class Version
- * @brief OpenBMC version software management implementation.
+/** @class BMCVersion
+ * @brief OpenBMC version and activation software management implementation
+ * for the active BMC software image.
* @details A concrete implementation for xyz.openbmc_project.Software.Version
- * DBus API.
+ * and xyz.openbmc_project.Software.Activation DBus APIs.
*/
-class Version : public VersionInherit
+class BMCVersion : public BMCVersionInherit
{
public:
- /** @brief Constructs Version Software Manager
+ /** @brief Constructs BMC Version and Activation Software Manager for
+ * the active BMC software image.
*
* @note This constructor passes 'true' to the base class in order to
* defer dbus object registration until we can
@@ -32,9 +35,10 @@
* @param[in] bus - The Dbus bus object
* @param[in] objPath - The Dbus object path
*/
- Version(sdbusplus::bus::bus& bus,
- const char* objPath) : VersionInherit(
- bus, (std::string{objPath} + '/' + getId()).c_str(), true)
+ BMCVersion(sdbusplus::bus::bus& bus,
+ const char* objPath) : BMCVersionInherit(
+ bus, (std::string{objPath} + '/' + getId()).c_str(),
+ true)
{
// Set properties.
purpose(VersionPurpose::BMC);
diff --git a/configure.ac b/configure.ac
index 6f00959..8e2ddbf 100755
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,7 @@
AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
AC_ARG_VAR(VERSION_BUSNAME, [The Dbus busname to own])
-AS_IF([test "x$VERSION_BUSNAME" == "x"], [VERSION_BUSNAME="xyz.openbmc_project.Software.BMC.Version"])
+AS_IF([test "x$VERSION_BUSNAME" == "x"], [VERSION_BUSNAME="xyz.openbmc_project.Software.Version"])
AC_DEFINE_UNQUOTED([VERSION_BUSNAME], ["$VERSION_BUSNAME"], [The DBus busname to own])
AC_ARG_VAR(SOFTWARE_OBJPATH, [The version software manager Dbus root])
diff --git a/image_manager_main.cpp b/image_manager_main.cpp
index 66f31f6..00872e1 100644
--- a/image_manager_main.cpp
+++ b/image_manager_main.cpp
@@ -3,7 +3,7 @@
#include <sdbusplus/bus.hpp>
#include <phosphor-logging/log.hpp>
#include "config.h"
-#include "version_software_manager.hpp"
+#include "bmc_version.hpp"
#include "watch.hpp"
int main(int argc, char* argv[])
@@ -15,7 +15,7 @@
sdbusplus::server::manager::manager objManager(bus,
SOFTWARE_OBJPATH);
- phosphor::software::manager::Version manager(bus,
+ phosphor::software::manager::BMCVersion manager(bus,
SOFTWARE_OBJPATH);
bus.request_name(VERSION_BUSNAME);