PEL: Add APIs to read the FW versions

Add methods to the DataInterface class to read the BMC and server
firmware versions.  The server firmware version represents the version
of all firmware images that are in the flash image, not just the BMC.
There is nowhere to get that version yet, so this commit just has a
placeholder.

These will be used by the ExtendedUserHeader section.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I47389714c987337cb96c72b6bf2b270c78003357
diff --git a/extensions/openpower-pels/data_interface.hpp b/extensions/openpower-pels/data_interface.hpp
index a3c118e..ff0aa75 100644
--- a/extensions/openpower-pels/data_interface.hpp
+++ b/extensions/openpower-pels/data_interface.hpp
@@ -91,6 +91,26 @@
         _hostChangeCallbacks.erase(name);
     }
 
+    /**
+     * @brief Returns the BMC firmware version
+     *
+     * @return std::string - The BMC version
+     */
+    virtual std::string getBMCFWVersion() const
+    {
+        return _bmcFWVersion;
+    }
+
+    /**
+     * @brief Returns the server firmware version
+     *
+     * @return std::string - The server firmware version
+     */
+    virtual std::string getServerFWVersion() const
+    {
+        return _serverFWVersion;
+    }
+
   protected:
     /**
      * @brief Sets the host on/off state and runs any
@@ -138,6 +158,16 @@
      *        names to callback functions.
      */
     std::map<std::string, HostStateChangeFunc> _hostChangeCallbacks;
+
+    /**
+     * @brief The BMC firmware version string
+     */
+    std::string _bmcFWVersion;
+
+    /**
+     * @brief The server firmware version string
+     */
+    std::string _serverFWVersion;
 };
 
 /**
@@ -187,6 +217,18 @@
     void readHostState();
 
     /**
+     * @brief Reads the BMC firmware version string and puts it into
+     *        _bmcFWVersion.
+     */
+    void readBMCFWVersion();
+
+    /**
+     * @brief Reads the server firmware version string and puts it into
+     *        _serverFWVersion.
+     */
+    void readServerFWVersion();
+
+    /**
      * @brief Finds the D-Bus service name that hosts the
      *        passed in path and interface.
      *