#ifndef __OTX_FLASH_FILE_HPP__
#define __OTX_FLASH_FILE_HPP__

#include <string>
#include "vbf/VBFParserSmall.h"

namespace otx{
namespace flash{
/**
 * @brief 描述一个待刷写的flash文件信息。
 *
 */
class File {
public:
  File();
  File(const File &right) = default;
  File &operator=(const File &right) = default;
  virtual ~File() = default;
private:
  std::string mPath;
  std::size_t mSize;
  int mFileType; // 文件类型：1,2,3
  std::string mPinCode; // 参数。
  std::string mKeyInfo;
  // 动态信息。
  size_t mDownloadedSize; // 当前累计的下载大小。
  size_t mLastDownloadedSize;// 最近一次统计的下载大小。



public:
  VBFParserSmall parser;

  virtual std::string getPath();
  virtual void setPath(const std::string &path);

  virtual std::size_t getSize();
  virtual void setSize(std::size_t size);

  virtual int getFileType();
  virtual void setFileType(int type);

  virtual void increaseDownloadedSize(size_t size);
  virtual size_t getDownloadedSize();

  //virtual void setLastDownloadedSize(size_t size);
  virtual size_t getLastDownloadedSize();

  virtual std::string getPinCode();
  virtual void setPinCode(const std::string &v);

  virtual std::string getKeyInfo();
  virtual void setKeyInfo(const std::string& v);


};
} // namespace flash
} // namespace otx

#endif // __OTX_FLASH_FILE_HPP__