tools: blob: implement open blob

Implement the host-side tool's open blob command.

Change-Id: Iee432eae0539015e87969159a3d03761df9f8fb5
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/blob_interface.hpp b/tools/blob_interface.hpp
index 815874f..012550e 100644
--- a/tools/blob_interface.hpp
+++ b/tools/blob_interface.hpp
@@ -1,5 +1,7 @@
 #pragma once
 
+#include "firmware_handler.hpp"
+
 #include <cstdint>
 #include <string>
 #include <vector>
@@ -30,4 +32,16 @@
      * @return metadata structure.
      */
     virtual StatResponse getStat(const std::string& id) = 0;
+
+    /**
+     * Attempt to open the file using the specific data interface flag.
+     *
+     * @param[in] blob - the blob_id to open.
+     * @param[in] handlerFlags - the data interface flag, if relevant.
+     * @return the session id on success.
+     * @throws BlobException on failure.
+     */
+    virtual std::uint16_t
+        openBlob(const std::string& id,
+                 blobs::FirmwareBlobHandler::UpdateFlags handlerFlags) = 0;
 };