/* */ #ifndef _D_FILE_ALLOCATION_MAN_H_ #define _D_FILE_ALLOCATION_MAN_H_ #include "common.h" #include "SharedHandle.h" #include namespace aria2 { class FileAllocationEntry; class FileAllocationMan { private: std::deque > _fileAllocationEntries; SharedHandle _currentFileAllocationEntry; public: FileAllocationMan(); ~FileAllocationMan(); bool isFileAllocationBeingExecuted() const; SharedHandle getCurrentFileAllocationEntry(); void markCurrentFileAllocationEntryDone(); bool nextFileAllocationEntryExists() const; SharedHandle popNextFileAllocationEntry(); void pushFileAllocationEntry(const SharedHandle& entry); size_t countFileAllocationEntryInQueue() const; }; typedef SharedHandle FileAllocationManHandle; } // namespace aria2 #endif // _D_FILE_ALLOCATION_MAN_H_