Determine Version properties on application startup

Change-Id: I38c323aa9dd0ec37c5ae7a1f60f61da207ce7c1c
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/version_software_manager.hpp b/version_software_manager.hpp
index 45d9d82..7212cc2 100644
--- a/version_software_manager.hpp
+++ b/version_software_manager.hpp
@@ -1,5 +1,4 @@
 #pragma once
-#include <iostream>
 
 #include <sdbusplus/bus.hpp>
 #include "xyz/openbmc_project/Software/Version/server.hpp"
@@ -22,15 +21,27 @@
     public:
         /** @brief Constructs Version Software Manager
          *
-         * @param[in] bus       - The Dbus bus object
-         * @param[in] objPath   - The Dbus object path
+         * @note This constructor passes 'true' to the base class in order to
+         *       defer dbus object registration until we can
+         *       set our properties
+         *
+         * @param[in] bus        - The Dbus bus object
+         * @param[in] objPath    - The Dbus object path
          */
         Version(sdbusplus::bus::bus& bus,
                 const char* objPath) :
                 sdbusplus::server::object::object<
                     sdbusplus::xyz::openbmc_project::Software::server::Version>
                         (bus, (std::string{objPath} + '/' +
-                            getId()).c_str()) {};
+                            getId()).c_str(), true)
+        {
+            // Set properties.
+            purpose(VersionPurpose::BMC);
+            version(getVersion());
+
+            // Emit deferred signal.
+            emit_object_added();
+        }
 
     private:
         /**