/* */ #ifndef _D_REQUEST_INFO_H_ #define _D_REQUEST_INFO_H_ #include "common.h" #include "LogFactory.h" #include "Option.h" class RequestInfo; typedef SharedHandle RequestInfoHandle; typedef deque RequestInfos; class RequestInfo { protected: Option* op; const Logger* logger; bool fail; void printDownloadCompeleteMessage(const string& filename) { printf(_("\nThe download was complete. <%s>\n"), filename.c_str()); } void printDownloadCompeleteMessage() { printf("\nThe download was complete.\n"); } void printDownloadAbortMessage() { printf(_("\nSome downloads were not complete because of errors." " Check the log.\n" "aria2 will resume download if the transfer is restarted.")); } public: RequestInfo(Option* op): op(op), logger(LogFactory::getInstance()), fail(false) {} virtual ~RequestInfo() {} virtual RequestInfos execute() = 0; bool isFail() const { return fail; } }; #endif // _D_REQUEST_INFO_H_