/* */ #ifndef D_REQUEST_GROUP_H #define D_REQUEST_GROUP_H #include "common.h" #include #include #include #include "SharedHandle.h" #include "TransferStat.h" #include "TimeA2.h" #include "Request.h" #include "error_code.h" #include "MetadataInfo.h" namespace aria2 { class DownloadEngine; class SegmentMan; class Command; class DownloadCommand; class DownloadContext; class PieceStorage; class BtProgressInfoFile; class Dependency; class PreDownloadHandler; class PostDownloadHandler; class DiskWriterFactory; class Option; class RequestGroup; class CheckIntegrityEntry; struct DownloadResult; class URISelector; class URIResult; class RequestGroupMan; #ifdef ENABLE_BITTORRENT class BtRuntime; class PeerStorage; #endif // ENABLE_BITTORRENT typedef int64_t a2_gid_t; class RequestGroup { public: enum HaltReason { NONE, SHUTDOWN_SIGNAL, USER_REQUEST }; enum State { // Waiting in the reserved queue STATE_WAITING, // Download has begun STATE_ACTIVE }; private: static a2_gid_t gidCounter_; a2_gid_t gid_; int state_; SharedHandle