/* */ #ifndef _D_CONSOLE_DOWNLOAD_ENGINE_H_ #define _D_CONSOLE_DOWNLOAD_ENGINE_H_ #include "DownloadEngine.h" #include "TimeA2.h" class ConsoleDownloadEngine : public DownloadEngine { private: Time cp; long long int psize; int speed; // The time when startup Time startup; // The number of bytes downloaded at startup long long int startupLength; bool isStartupLengthSet; // The average speed(bytes per second) since startup int avgSpeed; // The estimated remaining time to complete the download. int eta; protected: void sendStatistics(long long int currentSize, long long int totalSize); virtual void initStatistics(); virtual void calculateStatistics(); virtual void onEndOfRun(); virtual void afterEachIteration(); public: ConsoleDownloadEngine(); ~ConsoleDownloadEngine(); void fillCommand(); }; #endif // _D_CONSOLE_DOWNLOAD_ENGINE_H_