tools: remove phosphor-ipmi-blobs dependency

The host tool depended on the BMC header: firmware_handler.hpp because
it defined the flags.  This header depends on phosphor-ipmi-blobs,
therefore the host-tool depends on this.  Move the flags into a separate
common header file and snip this dependency.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id2ad33a1611c02605a1ed5c695429d0451eb98d4
diff --git a/tools/handler.cpp b/tools/handler.cpp
index 147a457..65596f5 100644
--- a/tools/handler.cpp
+++ b/tools/handler.cpp
@@ -16,13 +16,13 @@
 
 #include "handler.hpp"
 
+#include "flags.hpp"
 #include "helper.hpp"
 #include "status.hpp"
 #include "tool_errors.hpp"
 #include "util.hpp"
 
 #include <algorithm>
-#include <blobs-ipmid/blobs.hpp>
 #include <cstdint>
 #include <cstring>
 #include <ipmiblob/blob_errors.hpp>
@@ -85,7 +85,8 @@
     {
         session = blob->openBlob(
             target, static_cast<std::uint16_t>(supported) |
-                        static_cast<std::uint16_t>(blobs::OpenFlags::write));
+                        static_cast<std::uint16_t>(
+                            ipmi_flash::FirmwareFlags::UpdateFlags::openWrite));
     }
     catch (const ipmiblob::BlobException& b)
     {
@@ -113,7 +114,8 @@
     try
     {
         session = blob->openBlob(
-            target, static_cast<std::uint16_t>(blobs::OpenFlags::write));
+            target, static_cast<std::uint16_t>(
+                        ipmi_flash::FirmwareFlags::UpdateFlags::openWrite));
     }
     catch (const ipmiblob::BlobException& b)
     {
@@ -162,9 +164,10 @@
     try
     {
         std::fprintf(stderr, "Opening the cleanup blob\n");
-        session =
-            blob->openBlob(ipmi_flash::cleanupBlobId,
-                           static_cast<std::uint16_t>(blobs::OpenFlags::write));
+        session = blob->openBlob(
+            ipmi_flash::cleanupBlobId,
+            static_cast<std::uint16_t>(
+                ipmi_flash::FirmwareFlags::UpdateFlags::openWrite));
     }
     catch (...)
     {