#ifndef __OTX_FLASH_SINGLEECUFLASHER_HPP__
#define __OTX_FLASH_SINGLEECUFLASHER_HPP__

#include "ECU.hpp"
#include "ECUFlasher.hpp"
#include "ECUFlasherImpl.hpp"
#include <mutex>
#include "DownloadArgs.hpp"

namespace otx {
namespace flash {
/**
 * @brief 单一ECU刷写器。
 *
 */
class SingleECUFlasher : virtual public ECUFlasher, virtual public ECUFlasherImpl {
public:
  SingleECUFlasher();
  SingleECUFlasher(const SingleECUFlasher &right) = default;
  SingleECUFlasher &operator=(const SingleECUFlasher &right) = default;
  virtual ~SingleECUFlasher() = default;

private:
  ECU *mECU;

public:
  virtual bool download() override;

  virtual ECU*getECU();
  virtual void setECU(ECU *ecu);

// protected:
//   virtual void downloadFile(ECU *ecu, File *ecuFile) override;

// private:
//   static void downloadThread(DownloadArgs *arg);
};
} // namespace flash
} // namespace otx

#endif // __OTX_FLASH_SINGLEECUFLASHER_HPP__