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/test/Makefile.am b/tools/test/Makefile.am
index a0e2912..c05654b 100644
--- a/tools/test/Makefile.am
+++ b/tools/test/Makefile.am
@@ -3,7 +3,6 @@
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/ \
 	-I$(top_srcdir)/tools/ \
-	-I$(top_srcdir)/bmc \
 	$(GTEST_CFLAGS) \
 	$(GMOCK_CFLAGS) \
 	$(CODE_COVERAGE_CPPFLAGS)
diff --git a/tools/test/data_interface_mock.hpp b/tools/test/data_interface_mock.hpp
index 3189e5b..0ee799b 100644
--- a/tools/test/data_interface_mock.hpp
+++ b/tools/test/data_interface_mock.hpp
@@ -14,8 +14,7 @@
     virtual ~DataInterfaceMock() = default;
 
     MOCK_METHOD2(sendContents, bool(const std::string&, std::uint16_t));
-    MOCK_CONST_METHOD0(supportedType,
-                       ipmi_flash::FirmwareBlobHandler::UpdateFlags());
+    MOCK_CONST_METHOD0(supportedType, ipmi_flash::FirmwareFlags::UpdateFlags());
 };
 
 } // namespace host_tool
diff --git a/tools/test/tools_updater_unittest.cpp b/tools/test/tools_updater_unittest.cpp
index 85f86bc..0c9e6b5 100644
--- a/tools/test/tools_updater_unittest.cpp
+++ b/tools/test/tools_updater_unittest.cpp
@@ -1,11 +1,11 @@
 #include "data_interface_mock.hpp"
+#include "flags.hpp"
 #include "status.hpp"
 #include "tool_errors.hpp"
 #include "updater.hpp"
 #include "updater_mock.hpp"
 #include "util.hpp"
 
-#include <blobs-ipmid/blobs.hpp>
 #include <ipmiblob/test/blob_interface_mock.hpp>
 #include <string>
 
@@ -32,8 +32,8 @@
 TEST_F(UpdateHandlerTest, CheckAvailableSuccess)
 {
     ipmiblob::StatResponse statObj = {};
-    statObj.blob_state = ipmi_flash::FirmwareBlobHandler::UpdateFlags::ipmi |
-                         ipmi_flash::FirmwareBlobHandler::UpdateFlags::lpc;
+    statObj.blob_state = ipmi_flash::FirmwareFlags::UpdateFlags::ipmi |
+                         ipmi_flash::FirmwareFlags::UpdateFlags::lpc;
 
     EXPECT_CALL(blobMock, getBlobList())
         .WillOnce(
@@ -43,7 +43,7 @@
         .WillOnce(Return(statObj));
 
     EXPECT_CALL(handlerMock, supportedType())
-        .WillOnce(Return(ipmi_flash::FirmwareBlobHandler::UpdateFlags::lpc));
+        .WillOnce(Return(ipmi_flash::FirmwareFlags::UpdateFlags::lpc));
 
     EXPECT_TRUE(updater.checkAvailable(ipmi_flash::staticLayoutBlobId));
 }
@@ -55,11 +55,12 @@
 
     std::uint16_t supported =
         static_cast<std::uint16_t>(
-            ipmi_flash::FirmwareBlobHandler::UpdateFlags::lpc) |
-        static_cast<std::uint16_t>(blobs::OpenFlags::write);
+            ipmi_flash::FirmwareFlags::UpdateFlags::lpc) |
+        static_cast<std::uint16_t>(
+            ipmi_flash::FirmwareFlags::UpdateFlags::openWrite);
 
     EXPECT_CALL(handlerMock, supportedType())
-        .WillOnce(Return(ipmi_flash::FirmwareBlobHandler::UpdateFlags::lpc));
+        .WillOnce(Return(ipmi_flash::FirmwareFlags::UpdateFlags::lpc));
 
     EXPECT_CALL(blobMock, openBlob(ipmi_flash::staticLayoutBlobId, supported))
         .WillOnce(Return(session));