bmc: add update mechanism interface
Add mechanism definition for an update interface. Does not provide an
implementation.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8d8f04538524ab42de19843844fef3eec6bbd140
diff --git a/update.hpp b/update.hpp
new file mode 100644
index 0000000..99dd9ca
--- /dev/null
+++ b/update.hpp
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "status.hpp"
+
+namespace ipmi_flash
+{
+
+class UpdateInterface
+{
+ public:
+ virtual ~UpdateInterface() = default;
+
+ /**
+ * Trigger the update mechanism.
+ *
+ * @return true if successfully started, false otherwise.
+ */
+ virtual bool triggerUpdate() = 0;
+
+ /** Abort the update process. */
+ virtual void abortUpdate() = 0;
+
+ /** Check the current state of the update process. */
+ virtual UpdateStatus status() = 0;
+};
+
+} // namespace ipmi_flash