tools/handler: Read the running version

A host tool would read the running firmware version through polling the
version blob state.

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I0d68fff6527cd52360abee1cb225a8f228d68392
diff --git a/tools/handler.hpp b/tools/handler.hpp
index 5820fba..f4bf843 100644
--- a/tools/handler.hpp
+++ b/tools/handler.hpp
@@ -44,6 +44,15 @@
     virtual bool verifyFile(const std::string& target, bool ignoreStatus) = 0;
 
     /**
+     * Read the active firmware version.
+     *
+     * @param[in] versionBlob - the version blob id within the version handler.
+     * @return firmware version
+     */
+    virtual std::vector<uint8_t>
+        readVersion(const std::string& versionBlob) = 0;
+
+    /**
      * Cleanup the artifacts by triggering this action.
      */
     virtual void cleanArtifacts() = 0;
@@ -71,6 +80,8 @@
      */
     bool verifyFile(const std::string& target, bool ignoreStatus) override;
 
+    std::vector<uint8_t> readVersion(const std::string& versionBlob) override;
+
     void cleanArtifacts() override;
 
   private: