Added support for flash task

Added Flash Task

Test: tested on raven
Change-Id: I4a6c22f795440afeba18497745dddf8d5c570f65
Bug: 194686221

changed flash {partition_name} to work with tasks

Test: tested flash {partition_name} on raven
Change-Id: I1fa45b949ad8e5017026dd542dfe1389279a9e64
Bug: 194686221
diff --git a/fastboot/task.h b/fastboot/task.h
index 8b3fce9..216e658 100644
--- a/fastboot/task.h
+++ b/fastboot/task.h
@@ -26,6 +26,23 @@
   public:
     Task() = default;
     virtual void Run() = 0;
-    virtual bool Parse(const std::string& text) = 0;
     virtual ~Task() = default;
 };
+
+class FlashTask : public Task {
+  public:
+    FlashTask(const std::string& _slot);
+    FlashTask(const std::string& _slot, bool _force_flash);
+    FlashTask(const std::string& _slot, bool _force_flash, const std::string& _pname);
+    FlashTask(const std::string& _slot, bool _force_flash, const std::string& _pname,
+              const std::string& _fname);
+
+    void Run() override;
+    ~FlashTask() {}
+
+  private:
+    const std::string pname_;
+    const std::string fname_;
+    const std::string slot_;
+    bool force_flash_ = false;
+};