/* */ #ifndef D_ADAPTIVE_FILE_ALLOCATION_ITERATOR_H #define D_ADAPTIVE_FILE_ALLOCATION_ITERATOR_H #include "FileAllocationIterator.h" namespace aria2 { class BinaryStream; class AdaptiveFileAllocationIterator:public FileAllocationIterator { private: SharedHandle allocator_; BinaryStream* stream_; int64_t offset_; int64_t totalLength_; public: AdaptiveFileAllocationIterator (BinaryStream* stream, int64_t offset, int64_t totalLength); virtual ~AdaptiveFileAllocationIterator(); virtual void allocateChunk(); virtual bool finished(); virtual int64_t getCurrentLength(); virtual int64_t getTotalLength(); }; } // namespace aria2 #endif // D_ADAPTIVE_FILE_ALLOCATION_ITERATOR_H