/* */ #ifndef _D_MULTI_FILE_ALLOCATION_ITERATOR_H_ #define _D_MULTI_FILE_ALLOCATION_ITERATOR_H_ #include "FileAllocationIterator.h" #include namespace aria2 { class MultiDiskAdaptor; class DiskWriterEntry; class SingleFileAllocationIterator; class MultiFileAllocationIterator:public FileAllocationIterator { private: MultiDiskAdaptor* _diskAdaptor; std::deque > _entries; SharedHandle _fileAllocationIterator; int64_t _offset; std::deque > makeDiskWriterEntries(const std::deque >& srcEntries, int32_t pieceLength) const; public: MultiFileAllocationIterator(MultiDiskAdaptor* diskAdaptor); virtual ~MultiFileAllocationIterator(); virtual void allocateChunk(); virtual bool finished(); virtual int64_t getCurrentLength(); virtual int64_t getTotalLength(); const std::deque >& getDiskWriterEntries() const; }; typedef SharedHandle MultiFileAllocationIteratorHandle; } // namespace aria2 #endif // _D_MULTI_FILE_ALLOCATION_ITERATOR_H_