tools: blob: implement get blob stat command

The firmware update process requires implementing the stat command, so
that one can verify the firmware mechanism requested is available.

Change-Id: I582f344124767975ee305c420657f991d2223889
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/blob_interface.hpp b/tools/blob_interface.hpp
index ce2b2d7..9b0ff7d 100644
--- a/tools/blob_interface.hpp
+++ b/tools/blob_interface.hpp
@@ -3,9 +3,15 @@
 #include <string>
 #include <vector>
 
+struct StatResponse
+{
+    std::uint16_t blob_state;
+    std::uint32_t size;
+    std::vector<std::uint8_t> metadata;
+};
+
 class BlobInterface
 {
-
   public:
     virtual ~BlobInterface() = default;
 
@@ -15,4 +21,12 @@
      * @return list of strings, each representing a blob_id returned.
      */
     virtual std::vector<std::string> getBlobList() = 0;
+
+    /**
+     * Get the stat() on the blob_id.
+     *
+     * @param[in] id - the blob_id.
+     * @return metadata structure.
+     */
+    virtual StatResponse getStat(const std::string& id) = 0;
 };