add image_handler interface for open
For open command, add image_handler interface. Different mechanisms
will implement this interface to handle how they should behave.
Change-Id: I9fa0a7263a5ef968430350ccf8262742dfc2cf84
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/image_handler.hpp b/image_handler.hpp
new file mode 100644
index 0000000..e4589f5
--- /dev/null
+++ b/image_handler.hpp
@@ -0,0 +1,22 @@
+#pragma once
+
+namespace blobs
+{
+
+/**
+ * Each image update mechanism must implement the ImageHandlerInterface.
+ */
+class ImageHandlerInterface
+{
+ public:
+ virtual ~ImageHandlerInterface() = default;
+
+ /**
+ * open the firmware update mechanism.
+ *
+ * @return bool - returns true on success.
+ */
+ virtual bool open() = 0;
+};
+
+} // namespace blobs