From 048a2cf59737f761876e81a77e8d064c45c752d7 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 11 Oct 2007 16:58:24 +0000 Subject: 2007-10-12 Tatsuhiro Tsujikawa Implemented BitTorrent/http/ftp integrated download. I've rewritten lots of files and now some headers have forward class declarations to reduce compile time. The implementation is extremely alpha stage, I recommend to use this for testing purpose only. --- src/SingleFileAllocationIterator.h | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/SingleFileAllocationIterator.h (limited to 'src/SingleFileAllocationIterator.h') diff --git a/src/SingleFileAllocationIterator.h b/src/SingleFileAllocationIterator.h new file mode 100644 index 00000000..4b401f13 --- /dev/null +++ b/src/SingleFileAllocationIterator.h @@ -0,0 +1,66 @@ +/* */ +#ifndef _D_SINGLE_FILE_ALLOCATION_ITERATOR_H_ +#define _D_SINGLE_FILE_ALLOCATION_ITERATOR_H_ + +#include "FileAllocationIterator.h" + +class AbstractSingleDiskAdaptor; + +class SingleFileAllocationIterator:public FileAllocationIterator +{ +private: + AbstractSingleDiskAdaptor* _diskAdaptor; + int64_t _offset; +public: + SingleFileAllocationIterator(AbstractSingleDiskAdaptor* diskAdaptor); + + virtual ~SingleFileAllocationIterator(); + + virtual void allocateChunk(); + + virtual bool finished(); + + virtual int64_t getCurrentLength() + { + return _offset; + } + + virtual int64_t getTotalLength(); +}; + +typedef SharedHandle SingleFileAllocationIteratorHandle; + +#endif // _D_SINGLE_FILE_ALLOCATION_ITERATOR_H_ -- cgit