/* */ #ifndef _D_DOWNLOAD_COMMAND_H_ #define _D_DOWNLOAD_COMMAND_H_ #include "AbstractCommand.h" #include "TransferEncoding.h" #include "TimeA2.h" #include "PeerStat.h" using namespace std; class DownloadCommand : public AbstractCommand { private: int32_t maxDownloadSpeedLimit; int32_t startupIdleTime; int32_t lowestDownloadSpeedLimit; PeerStatHandle peerStat; protected: TransferEncodingHandle transferDecoder; virtual bool executeInternal(); virtual bool prepareForNextSegment(); public: DownloadCommand(int cuid, const RequestHandle req, DownloadEngine* e, const SocketHandle& s); virtual ~DownloadCommand(); void setTransferDecoder(const TransferEncodingHandle& transferDecoder) { this->transferDecoder = transferDecoder; } void setMaxDownloadSpeedLimit(int32_t maxDownloadSpeedLimit) { this->maxDownloadSpeedLimit = maxDownloadSpeedLimit; } void setStartupIdleTime(int32_t startupIdleTime) { this->startupIdleTime = startupIdleTime; } void setLowestDownloadSpeedLimit(int32_t lowestDownloadSpeedLimit) { this->lowestDownloadSpeedLimit = lowestDownloadSpeedLimit; } }; #endif // _D_DOWNLOAD_COMMAND_H_