summaryrefslogtreecommitdiff
path: root/test/MultiFileAllocationIteratorTest.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2009-03-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-03-091-45/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FileEntry::getPath() contains store(top level) directory to simplify path handling operation. In the previous implementation, store directory is concatenated to FileEntry::getPath() in DownloadContext. * src/BtDependency.cc * src/BtPostDownloadHandler.cc * src/CopyDiskAdaptor.cc * src/DefaultBtContext.cc * src/DirectDiskAdaptor.cc * src/FileEntry.cc * src/FileEntry.h * src/FtpNegotiationCommand.cc * src/HttpResponse.cc * src/HttpResponseCommand.cc * src/Metalink2RequestGroup.cc * src/MultiDiskAdaptor.cc * src/MultiDiskAdaptor.h * src/MultiFileAllocationIterator.cc * src/RequestGroup.cc * src/SingleFileDownloadContext.cc * src/SingleFileDownloadContext.h * src/download_helper.cc * test/BtDependencyTest.cc * test/CopyDiskAdaptorTest.cc * test/DefaultBtContextTest.cc * test/DefaultBtProgressInfoFileTest.cc * test/DirectDiskAdaptorTest.cc * test/DownloadHelperTest.cc * test/FileEntryTest.cc * test/MultiDiskAdaptorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/RequestGroupTest.cc * test/SingleFileDownloadContextTest.cc
* 2009-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-03-071-46/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added --index-out option to specify each file path for torrent. Here index shown in --show-files option is used to specify which file path should be altered. For example, to change the file path with index=2, use --index-out=2=aria2.tar.bz2. You can use this option multiple times: --index-out=1=aria2.tar.bz2 --index-out=2=aria2-opt.tar.bz2. The short hand form -O is also available. This option can be specified in -i list. * src/DefaultBtContext.cc * src/DefaultBtContext.h * src/MultiDiskAdaptor.cc * src/MultiDiskAdaptor.h * src/MultiFileAllocationIterator.cc * src/OptionHandlerFactory.cc * src/OptionHandlerImpl.h * src/Util.cc * src/Util.h * src/download_helper.cc * src/prefs.cc * src/prefs.h * src/usage_text.h * test/DefaultBtContextTest.cc * test/MultiDiskAdaptorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/UtilTest.cc
* 2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-02-111-1/+1
| | | | | | | | | Fixed broken selected file BitTorrent download. * src/MultiDiskWriter.cc * test/MultiDiskWriterTest.cc * test/MultiFileAllocationIteratorTest.cc
* 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-071-22/+90
| | | | | | | | | | | Fixed the bug that DiskWriterEntry is not created when its FileEntry.isRequested() is false and it doesn't share a piece with other FileEntries that are requested. This bug causes segmentation fault in the end.
* 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-06-151-19/+24
| | | | | | | | | | | | | | | Create only requested files and files which shares a piece with requested file in multi-torrent downloads. Directory structures are also created in the same rule. MultiDiskAdaptor::fileExists() now uses FileEntry instead of DiskWriterEntry as in the previous implementation. * src/MultiDiskWriter.cc * src/MultiFileAllocationIterator.cc * src/MultiFileAllocationIterator.h * test/MultiFileAllocationIteratorTest.cc
* 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-271-5/+2
| | | | | | | | | | | | | Rewritten Exception class. Throw exception object, not its pointer and catch by reference, so that remove problematic delete operator for catched exception. * src/Exception.cc * src/Exception.h * test/ExceptionTest.cc * src/*: All files throwing/catching exception. * test/*: All files throwing/catching exception.
* 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-201-32/+34
| | | | | | | | | | | | | | | Rewritten SharedHandle. Now copy constructor taking raw pointer has keyword explicit and SharedHandle's default constructor initializes its internal obj to null, old implementation initializes it using obj's default constructor. To assign null, write SharedHandle<T> x(...); x.reset(); TODO: test/SharedHandleTest.cc needs more tests. * src/SharedHandle.h
* 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-091-6/+6
| | | | | | type cleanup for allmost all remaining files.
* 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Included missing iostream. * test/AllTest.cc * test/BtDependencyTest.cc * test/BtExtendedMessageTest.cc * test/DHTConnectionImplTest.cc * test/DHTMessageFactoryImplTest.cc * test/DHTMessageTrackerEntryTest.cc * test/DHTNodeTest.cc * test/DHTRoutingTableSerializerTest.cc * test/DefaultBtAnnounceTest.cc * test/DefaultBtContextTest.cc * test/DefaultBtMessageFactoryTest.cc * test/DefaultExtensionMessageFactoryTest.cc * test/HandshakeExtensionMessageTest.cc * test/HttpResponseTest.cc * test/MetalinkProcessorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/SocketCoreTest.cc * test/UTPexExtensionMessageTest.cc
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-78/+86
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-281-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added direct I/O support. The current implementation uses O_DIRECT, which is not posix standard and is tested on linux 2.6.21. Currently only file allocation uses direct I/O. * src/SingleFileAllocationIterator.{h, cc} * test/SingleFileAllocationIteratorTest.cc * src/MultiFileAllocationIterator.{h, cc} * test/MultiFileAllocationIteratorTest.cc * src/BinaryStream.h * src/DiskWriter.h * src/AbstractDiskWriter.{h, cc} * src/ByteArrayDiskWriter.h * src/DiskAdaptor.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/MultiDiskAdaptor.{h, cc} * src/FileAllocationEntry.cc * src/Util.{h, cc} * src/OptionHandlerFactory.cc * src/prefs.h * src/version_usage.cc * src/option_processing.cc Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to handleException. * src/MultiFileAllocationIterator.cc Added EINTR handling * src/SocketCore.cc
* 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-211-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preallocate non-requested file which is adjacent forward to requested file('requested' files means the files given in --select-file option) if they share a same piece. This fixes long pause in the file system which doesn't support sparse files like FAT32 while downloading. * src/MultiFileAllocationIterator.{h, cc} * test/MultiFileAllocationIteratorTest.cc * src/FileEntry.{h, cc} Removed unused _option. * src/MultiDiskAdaptor.h * test/MultiDiskAdaptorTest.cc * src/DefaultPieceStorage.cc Set the default value of --seed-ratio to 1.0. If 0.0 is given, then seeding continues regardless of share ratio. * src/version_usage.cc * src/option_processing.cc * src/BtSetup.cc * doc/aria2c.1.txt * doc/aria2c.1 Fixed: Selective download is not working in BitTorrent * src/RequestGroup.cc Introduced Sequence class. Use this instead of Util::unfoldRange() * src/PieceStorage.h * test/MockPieceStorage.h * src/UnknownLengthPieceStorage.h * src/DefaultPieceStorage.{h, cc} * src/Metalink2RequestGroup.cc * src/RequestGroup.cc * src/Sequence.h * test/SequenceTest.cc * src/IntSequence.h * src/message.h * src/Util.{h, cc} * test/UtilTest.cc Added new function 'parse' to catch exception thrown by subclass's parseArg * src/OptionHandler.h * src/OptionParser.cc * src/NameMatchOptionHandler.h * src/OptionHandlerImpl.h * test/OptionHandlerTest.cc Added IntegerRangeOptionHandler. Used for --listen-port and --select-file. Now --listen-port accepts range of port. * src/OptionHandlerFactory.cc * src/version_usage.cc * src/OptionHandlerImpl.h * src/option_processing.cc * src/BtSetup.cc * src/PeerListenCommand.{h, cc} * doc/aria2c.1.txt * doc/aria2c.1 Implemented operator< for Exception class to provide easy way to print exception stack trace. * src/Exception.{h, cc} * src/main.cc * src/option_processing.cc
* 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-111-0/+102
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.