tools: add cleanup blob on failure

If the update process fails, call the cleanup blob and try to cleanup
artifacts automatically.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib57e5cc7f13b73e2d7371116058469a4d4bfd0c4
diff --git a/tools/updater.hpp b/tools/updater.hpp
index 670d981..4352c82 100644
--- a/tools/updater.hpp
+++ b/tools/updater.hpp
@@ -39,6 +39,11 @@
      * @return true if verified, false if verification errors.
      */
     virtual bool verifyFile(const std::string& target) = 0;
+
+    /**
+     * Cleanup the artifacts by triggering this action.
+     */
+    virtual void cleanArtifacts() = 0;
 };
 
 /** Object that actually handles the update itself. */
@@ -64,6 +69,8 @@
      */
     bool verifyFile(const std::string& target) override;
 
+    void cleanArtifacts() override;
+
   private:
     ipmiblob::BlobInterface* blob;
     DataInterface* handler;