Commit Graph

97 Commits (3531d57d3791f71ccb04c3d2ee238b2c2087ef82)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 29c5ef9215 2009-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added 'falloc' parameter for --file-allocation option.  'falloc'
	allocation mode uses posix_fallocate() system call to allocate
	file on disk.  If you are using newer file systems such as ext4
        (with extents support), btrfs or xfs, 'falloc' is your best
	choice. It allocates large(few GiB) files almost instantly.
	Don't use 'falloc' with legacy file systems such as ext3 because
	it takes almost same time as 'prealloc' and it blocks aria2
	entirely until allocation finishes. 'falloc' may not be
	available if your system doesn't have posix_fallocate() system
	call.
	* configure.ac
	* src/AbstractDiskWriter.cc
	* src/AbstractDiskWriter.h
	* src/AbstractSingleDiskAdaptor.cc
	* src/BinaryStream.h
	* src/BtCheckIntegrityEntry.cc
	* src/ByteArrayDiskWriter.h
	* src/CheckIntegrityEntry.cc
	* src/CheckIntegrityEntry.h
	* src/DefaultPieceStorage.cc
	* src/DiskAdaptor.cc
	* src/DiskAdaptor.h
	* src/DiskWriter.h
	* src/FallocFileAllocationIterator.cc
	* src/FallocFileAllocationIterator.h
	* src/FileAllocationEntry.cc
	* src/FileAllocationEntry.h
	* src/Makefile.am
	* src/MultiFileAllocationIterator.cc
	* src/MultiFileAllocationIterator.h
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/StreamCheckIntegrityEntry.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/FallocFileAllocationIteratorTest.cc
	* test/Makefile.am
2009-03-25 05:43:07 +00:00
Tatsuhiro Tsujikawa 87f4fda22f 2009-03-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed ServerStatURISelector as FeedbackURISelector.
	* src/FeedbackURISelector.cc
	* src/FeedbackURISelector.h
	* src/Makefile.am
	* src/RequestGroupMan.cc
	* src/ServerStatURISelector.cc
	* src/ServerStatURISelector.h
	* test/FeedbackURISelectorTest.cc
	* test/Makefile.am
	* test/ServerStatURISelectorTest.cc
2009-03-13 12:44:58 +00:00
Tatsuhiro Tsujikawa 176c9d2002 2009-03-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed --direct-file-mapping option and CopyDiskAdaptor.
	* src/CopyDiskAdaptor.cc: Removed
	* src/CopyDiskAdaptor.h: Removed
	* src/DefaultPieceStorage.cc
	* src/Makefile.am
	* src/OptionHandlerFactory.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/CopyDiskAdaptorTest.cc: Removed
	* test/Makefile.am
2009-03-10 13:08:07 +00:00
Tatsuhiro Tsujikawa 23a6eff88e 2009-02-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Extracted the algorithm to find the longest incremental sequence
	as max_sequence template.
	* src/LongestSequencePieceSelector.cc
	* src/a2algo.h
	* test/Makefile.am
	* test/a2algoTest.cc
2009-02-03 14:46:33 +00:00
Tatsuhiro Tsujikawa 660c480cca 2009-01-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use LongestSequencePieceSelector for HTTP/FTP/BitTorrent
	integrated downloads. This PieceSelector subclass finds the
	longest continuous sequence in the available missing pieces and
	selects the last index of such sequence. This makes HTTP/FTP
	connections less interrupted by the pieces obtained by
	BitTorrent peers.
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/LongestSequencePieceSelector.cc
	* src/LongestSequencePieceSelector.h
	* src/Makefile.am
	* src/PieceSelector.h
	* src/RarestPieceSelector.h
	* src/RequestGroup.cc
	* test/BtDependencyTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/IteratableChecksumValidatorTest.cc
	* test/LongestSequencePieceSelectorTest.cc
	* test/Makefile.am
	* test/SegmentManTest.cc
2009-01-31 14:34:29 +00:00
Tatsuhiro Tsujikawa 8ca9db9f3e 2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced FileAllocationMan with
	SequentialPicker<FileAllocationEntry>.
	* src/BtCheckIntegrityEntry.cc
	* src/ConsoleStatCalc.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/DownloadEngineFactory.cc
	* src/FileAllocationCommand.cc
	* src/FileAllocationDispatcherCommand.cc
	* src/FileAllocationMan.h
	* src/Makefile.am
	* src/SequentialPicker.h
	* src/StatCalc.h
	* src/StreamCheckIntegrityEntry.cc
	* test/Makefile.am
	* test/SequentialPickerTest.cc
2009-01-24 09:00:36 +00:00
Tatsuhiro Tsujikawa 110749df84 2008-12-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed Dictionary/List/Data and its related classes.
	* src/BencodeVisitor.cc: Removed.
	* src/BencodeVisitor.h: Removed.
	* src/Data.cc: Removed.
	* src/Data.h: Removed.
	* src/Dictionary.cc: Removed.
	* src/Dictionary.h: Removed.
	* src/List.cc: Removed.
	* src/List.h: Removed.
	* src/Makefile.am
	* src/MetaEntry.h: Removed.
	* src/MetaEntryVisitor.h: Removed.
	* src/MetaFileUtil.cc: Removed.
	* src/MetaFileUtil.h: Removed.
	* test/BencodeVisitorTest.cc: Removed.
	* test/DataTest.cc: Removed.
	* test/DictionaryTest.cc: Removed.
	* test/ListTest.cc: Removed.
	* test/Makefile.am
	* test/MetaFileUtilTest.cc: Removed.
2008-12-14 10:21:05 +00:00
Tatsuhiro Tsujikawa 1b54e64d34 2008-12-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added bencode helper functions and BDE class.
	They will replace MetaFileUtil and Dictionary/List/Data classes.
	* src/Makefile.am
	* src/bencode.cc
	* src/bencode.h
	* test/BencodeTest.cc
	* test/Makefile.am
2008-12-09 14:43:11 +00:00
Tatsuhiro Tsujikawa 091dad70cc 2008-11-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Dropped ares support.
	* README
	* configure.ac
	* m4/libares.m4: Removed.
	* src/AsyncNameResolver.cc
	* src/Makefile.am
	* test/Makefile.am
2008-11-18 11:20:53 +00:00
Tatsuhiro Tsujikawa b62b860ba0 2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added input_uris.txt to EXTRA_DIST
	* test/Makefile.am
2008-11-13 16:14:03 +00:00
Tatsuhiro Tsujikawa eed0406484 2008-11-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten URI handling functions. They are now provided as a
	testable functions.
	* src/Makefile.am
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/download_helper.cc
	* src/download_helper.h
	* src/main.cc
	* test/DownloadHelperTest.cc
	* test/Makefile.am
	* test/input_uris.txt
2008-11-13 13:40:40 +00:00
Tatsuhiro Tsujikawa 928e228c89 2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
DNSCache is now part of DownloadEngine.
	* src/DNSCache.h
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/InitiateConnectionCommand.cc
	* src/MultiUrlRequestInfo.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/SimpleDNSCacheTest.cc
2008-11-03 08:18:58 +00:00
Tatsuhiro Tsujikawa f66ed483fa 2008-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Integrated HelpItem into OptionParser to ease the workload for 
adding
	new options. Removed default value from usage text.
	* src/HelpItem.cc: Removed.
	* src/HelpItem.h: Removed.
	* src/HelpItemFactory.cc: Removed.
	* src/HelpItemFactory.h: Removed.
	* src/Makefile.am
	* src/Makefile.in
	* src/NameMatchOptionHandler.h
	* src/OptionHandler.cc
	* src/OptionHandler.h
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/OptionParser.cc
	* src/OptionParser.h
	* src/TagContainer.cc: Removed.
	* src/TagContainer.h: Removed.
	* src/TaggedItem.cc: Removed.
	* src/TaggedItem.h: Removed.
	* src/main.cc
	* src/option_processing.cc
	* src/usage_text.h
	* src/version_usage.cc
	* test/HelpItemTest.cc: Removed.
	* test/Makefile.am
	* test/Makefile.in
	* test/OptionHandlerTest.cc
	* test/OptionParserTest.cc
	* test/TagContainerTest.cc: Removed.
2008-09-22 09:26:57 +00:00
Tatsuhiro Tsujikawa e7d462bb39 2008-09-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added cookies.sqlite to EXTRA_DIST
	* test/Makefile.am
2008-09-17 13:37:32 +00:00
Tatsuhiro Tsujikawa eb652b570e 2008-09-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented the ability to get timestamp from remote FTP server 
using
	MDTM command described in RFC3659.
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* src/FtpNegotiationCommand.cc
	* src/FtpNegotiationCommand.h
	* test/FtpConnectionTest.cc
	* test/Makefile.am
2008-09-08 13:06:44 +00:00
Tatsuhiro Tsujikawa dbc8f5b737 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented the ability to get timestamp from remote HTTP server 
and
	apply it to local file. To enable this feature, --remote-time 
option
	is added. No usage text has been written yet.
	If several servers returns difference timestamp, then aria2 uses 
latest
	one.
	* src/CopyDiskAdaptor.cc
	* src/CopyDiskAdaptor.h
	* src/DirectDiskAdaptor.cc
	* src/DirectDiskAdaptor.h
	* src/DiskAdaptor.h
	* src/File.cc
	* src/File.h
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/HttpResponseCommand.h
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/RequestGroupMan.cc
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* test/CopyDiskAdaptorTest.cc
	* test/FileTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/MultiDiskAdaptorTest.cc
	* test/TestUtil.cc
2008-09-07 14:38:26 +00:00
Tatsuhiro Tsujikawa 69b18308d9 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implmented the functions to parse date.
	* src/TimeA2.cc
	* src/TimeA2.h
	* test/TimeTest.cc
2008-09-07 04:19:11 +00:00
Tatsuhiro Tsujikawa 398d53f5f5 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use CookieStorage class instead of CookieBox class.
	Now CookieStorage accepts cookies from numeric host such as 
192.168.1.1.
	* src/AbstractProxyRequestCommand.cc
	* src/CookieStorage.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/HttpConnection.cc
	* src/HttpConnection.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/Makefile.am
	* src/MultiUrlRequestInfo.cc
	* src/Request.cc
	* src/Request.h
	* src/main.cc
	* test/AllTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
	* test/nscookietest.txt
2008-09-01 13:46:03 +00:00
Tatsuhiro Tsujikawa 9cdcbf32ff 2008-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added CookieStorage class which is based on RFC2109 and manages 
cookies
	more strictly than CookieBox and CookieBoxFactory class.
	* src/CookieStorage.cc
	* src/CookieStorage.h
	* src/Cookie.cc
	* src/Cookie.h
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
2008-08-27 16:04:36 +00:00
Tatsuhiro Tsujikawa a50048aa54 2008-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed DirectDiskAdaptorTest.h
	* test/Makefile.am
2008-08-26 12:53:43 +00:00
Tatsuhiro Tsujikawa 76a9ad9c84 2008-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed chunk checksum validation cannot detect trailing garbage 
data.
	BUG#2074141
	* src/AbstractSingleDiskAdaptor.cc
	* src/AbstractSingleDiskAdaptor.h
	* src/CheckIntegrityEntry.cc
	* src/CheckIntegrityEntry.h
	* src/DiskAdaptor.h
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	* src/RequestGroup.cc
	* test/DirectDiskAdaptorTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/TestUtil.cc
	* test/TestUtil.h
2008-08-26 12:39:07 +00:00
Tatsuhiro Tsujikawa d9668e2c23 2008-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added load-v0001.aria2 and load-nonBt-v0001.aria2 to EXTRA_DIST.
	* test/Makefile.am
2008-08-24 09:46:03 +00:00
Tatsuhiro Tsujikawa adfcf57e32 2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Seprate the implementation to load old mozilla format of cookie 
to
	NsCookieParser class.
	* src/CookieBoxFactory.cc
	* src/CookieBoxFactory.h
	* src/NsCookieParser.cc
	* src/NsCookieParser.h
	* test/NsCookieParserTest.cc
2008-08-17 12:58:56 +00:00
Tatsuhiro Tsujikawa 0cac0dabde 2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added firefox3 cookie support based on the patch submitted by
	tizianomueller.
	firefox3 cookie is SQLite3 database. libsqlite3 is required to 
enable
	this functionality.
	* configure.ac
	* m4/sqlite3.m4
	* src/CookieBoxFactory.cc
	* src/CookieBoxFactory.h
	* src/Makefile.am
	* src/Makefile.in
	* src/Sqlite3MozCookieParser.cc
	* src/Sqlite3MozCookieParser.h
	* src/main.cc
	* test/CookieBoxFactoryTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/Sqlite3MozCookieParserTest.cc
	* test/badcookies.sqlite
	* test/cookies.sqlite
2008-08-17 10:44:12 +00:00
Tatsuhiro Tsujikawa d85014b937 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented ServerStatMan::load(...) function and its test case.
	* src/ServerStat.cc
	* src/ServerStat.h
	* src/ServerStatMan.cc
	* test/ServerStatManTest.cc
	* test/ServerStatTest.cc
2008-08-09 11:29:27 +00:00
Tatsuhiro Tsujikawa d64c8e75f6 2008-08-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented download speed based URI selection algorithm.
	Introduced new option --uri-selector.
	If --uri-selector=feedback is given, aria2 uses download speed 
observed
	in the previous downloads and chooses fastest server in the URI 
list.
	Currently at most 10 URIs are considered to introduce 
randomeness for
	finding better servers. The speed is average download speed in 
the
	downloads.
	On the other hand, if --uri-selector=inorder is given, which is 
default,
	URI is tried in order in URI list.
	The usage text for the new option has not been written yet.
	* src/AbstractCommand.cc
	* src/DownloadCommand.cc
	* src/DownloadEngine.cc
	* src/DownloadEngineFactory.cc
	* src/InOrderURISelector.cc
	* src/InOrderURISelector.h
	* src/OptionHandlerFactory.cc
	* src/PeerStat.h
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
	* src/SegmentMan.cc
	* src/SegmentMan.h
	* src/ServerStat.cc
	* src/ServerStat.h
	* src/ServerStatMan.cc
	* src/ServerStatMan.h
	* src/ServerStatURISelector.cc
	* src/ServerStatURISelector.h
	* src/URISelector.h
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* test/InOrderURISelectorTest.cc
	* test/RequestGroupManTest.cc
	* test/ServerStatManTest.cc
	* test/ServerStatURISelectorTest.cc
2008-08-04 17:06:47 +00:00
Tatsuhiro Tsujikawa aec1e9e7e1 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the ability to save signature when download is completed 
if
	signature is available. The filename of signature file is the 
path to
	download file followed by ".sig". If it already exists, then 
signature
	will not be saved.
	* src/RequestGroupMan.cc
	* src/Signature.cc
	* test/SignatureTest.cc
2008-07-12 15:09:03 +00:00
Tatsuhiro Tsujikawa 92c66d24ac 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten ChunkedEncoding class as ChunkedDecoder class.
	* src/A2STR.cc
	* src/A2STR.h
	* src/ChunkedDecoder.cc
	* src/ChunkedDecoder.h
	* src/ChunkedEncoding.cc: Removed
	* src/ChunkedEncoding.h: Removed
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/HttpDownloadCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/HttpSkipResponseCommand.h
	* src/Makefile.am
	* src/TransferEncoding.h: Removed
	* test/ChunkedDecoderTest.cc
	* test/ChunkedEncodingTest.cc: Removed
	* test/HttpResponseTest.cc
	* test/Makefile.am
2008-07-01 11:38:25 +00:00
Tatsuhiro Tsujikawa d791807add 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added gzip, deflate decoding support in HTTP using libz. If 
compiled
	with this feature, aria2 sends "Accept-Encoding: deflate, gzip" 
header
	to a HTTP server. If a server returns "Content-Encoding: gzip" 
or
	"Content-Encoding: deflate" then, aria2 decodes the response 
body on the
	fly and writes decoded data to a local disk.
	* README
	* README.html
	* configure.ac
	* m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, 
they are
	wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
	* m4/libz.m4
	* src/Decoder.h
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/Exception.h
	* src/GZipDecoder.cc
	* src/GZipDecoder.h
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/Makefile.am
	* test/GZipDecoderTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/gzip_decode_test.gz
2008-06-29 14:29:36 +00:00
Tatsuhiro Tsujikawa 4749763419 Moved DownloadHandlerFactoryTest.cc to SRC in Makefile.am. 2008-05-20 15:18:25 +00:00
Tatsuhiro Tsujikawa 40471d1c47 Updated Makefile to compile RarestPieceSelectorTest.cc 2008-05-17 12:53:03 +00:00
Tatsuhiro Tsujikawa 1ef99931e1 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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-27 02:22:14 +00:00
Tatsuhiro Tsujikawa 90d5b5c0a2 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added StringFormat class, which internally calls vasprintf.
	operator<< is defined for this class, so it can be used with iostream
	classes nicely. SimpleLogger and following functions are rewritten
	using StringFormat class.
	Besides, now Logger class's methods are non-const, many classes
	that has a const Logger* as a member variable are modified to remove
	const qualifier from the variable declaration.
	* src/HelpItemFactory.cc
	* src/Request.cc
	* src/SimpleLogger.cc
	* src/StringFormat.cc
	* src/StringFormat.h
	* src/Util.cc
	* src/option_processing.cc
	* src/version_usage.cc
	* test/StringFormatTest.cc
	* src/*.h: The classes that has const Logger* as a member variable.
2008-04-26 05:58:49 +00:00
Tatsuhiro Tsujikawa 9217319fc6 Added ProtocolDetectorTest to Makefile 2008-04-13 13:37:44 +00:00
Tatsuhiro Tsujikawa b1aeb277aa 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated Makfefile.am to make 'make dist' work.
	Now packaged filename is aria2c-VERSION.tar.bz2.
	Added README, README.html, and aria2c.1.html to dist_doc_DATA.
	Added LICENSE.OpenSSL to dist_noinst_DATA.

	Large file support is now configured by configure script.
	* configure.ac
	
	Removed unsused source files
	* src/
	* test/

	Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
	Peer.h and BtContext.h respectively.
	* src/Peer.h
	* src/BtContext.h

	Updated translations.
	Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
	translations. Great thanks to all translators!;)
	* po/*.{po, gmo}
2008-03-01 04:42:53 +00:00
Tatsuhiro Tsujikawa dd8f18956a 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Random bytes generation using libgcrypt and OpenSSL.
	* src/DHTUtil.{h, cc}
	* test/DHTUtilTest.cc
2008-02-20 16:57:47 +00:00
Tatsuhiro Tsujikawa 20cd2e5246 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --bt-min-crypto-level and --bt-require-crypto options.
	* src/OptionHandlerFactory.cc
	* src/MSEHandshake.cc
	* src/HelpItemFactory.cc
	* src/option_processing.cc
	* src/ReceiverMSEHandshakeCommand.cc
	* src/prefs.h
	* src/DefaultBtAnnounce.cc
	* src/InitiatorMSEHandshakeCommand.cc
	* src/usage_text.h
	* test/MSEHandshakeTest.cc
2008-02-18 13:41:58 +00:00
Tatsuhiro Tsujikawa c0d2223c77 2008-02-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added Message Stream Encryption(MSE) support.
	Currently, aria2 accepts incoming connections with Obfuscation Header
	and legacy BitTorrent Header and establishes connections with
	Obfuscation Header first and if failed then retry with legacy
	BitTorrent header. If plain text and ARC4 is provided, aria2 always
	choose ARC4. The new option to change the default behavior is planned.
	For tracker extension, "supportcrypto=1" is added statically.
	* src/PeerInitiateConnectionCommand.{h, cc}
	* src/PeerConnection.{h, cc}
	* src/HandleRegistry.h
	* src/SocketCore.h
	* src/PeerReceiveHandshakeCommand.{h, cc}
	* src/BtRegistry.{h, cc}
	* src/PeerListenCommand.cc
	* src/InitiatorMSEHandshakeCommand.{h, cc}
	* src/ReceiverMSEHandshakeCommand.{h, cc}
	* src/MSEHandshake.{h, cc}
	* src/ARC4Encryptor.h
	* src/ARC4Decryptor.h
	* src/LibgcryptARC4Encryptor.h
	* src/LibgcryptARC4Decryptor.h
	* src/LibgcryptARC4Context.h
	* src/LibsslARC4Encryptor.h
	* src/LibsslARC4Decryptor.h
	* src/LibsslARC4Context.h
	* src/DHKeyExchange.h
	* src/LibgcryptDHKeyExchange.h
	* src/LibsslDHKeyExchange.h
	* src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
	* test/DefaultBtAnnounceTest.cc
	* test/ARC4Test.cc
	* test/DHKeyExchangeTest.cc
	
	Removed prepareForRetry() because it is not used.
	* src/PeerAbstractCommand.{h, cc}
	* src/PeerInteractionCommand.{h, cc}
	* src/PeerInitiateConnectionCommand.{h, cc}
2008-02-17 15:56:47 +00:00
Tatsuhiro Tsujikawa c064a2cd9e 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Extract the Peer class's member variables, which are only needed 
after
	PeerInteractionCommand, into PeerSessionResource class.
	This class is instantiated in PeerInteractionCommand class's 
ctor and
	released in its dtor.
	This will make Peer class lightweight and uses less memory for 
peers
	which are not connected and wait in the queue.
	* src/PeerChokeCommand.cc
	* src/PeerSessionResource.{h, cc}
	* src/PeerInteractionCommand.cc
	* src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() 
function.
	* src/DefaultBtInteractive.cc
	* src/BtPieceMessage.cc
	* src/BtInterestedMessage.cc
	* src/BtUnchokeMessage.cc
	* src/DefaultPeerStorage.{h, cc}
	* src/PeerInitiateConnectionCommand.cc
	* src/ActivePeerConnectionCommand.cc
	* src/BtNotInterestedMessage.cc
	* src/DefaultBtMessageDispatcher.cc
	* src/BtChokeMessage.cc
	* src/BtRequestMessage.cc
	* src/Peer.{h, cc}
	* src/BtRegistry.h
	* src/TrackerWatcherCommand.cc
	* src/PeerReceiveHandshakeCommand.cc
	* test/BtExtendedMessageTest.cc
	* test/BtAllowedFastMessageTest.cc
	* test/BtCancelMessageTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/BtBitfieldMessageTest.cc
	* test/BtHaveMessageTest.cc
	* test/BtNotInterestedMessageTest.cc
	* test/BtRequestMessageTest.cc
	* test/PeerSessionResourceTest.cc
	* test/DefaultBtMessageDispatcherTest.cc
	* test/PeerTest.cc
	* test/BtInterestedMessageTest.cc
	* test/BtRejectMessageTest.cc
	* test/BtChokeMessageTest.cc
	* test/DefaultPeerStorageTest.cc
	* test/BtHaveNoneMessageTest.cc
	* test/BtHaveAllMessageTest.cc
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/BtUnchokeMessageTest.cc
	* test/DefaultBtMessageFactoryTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/UTPexExtensionMessageTest.cc
	* test/DefaultBtRequestFactoryTest.cc
	* test/BtPieceMessageTest.cc
	
	Removed typedef PeerStats.
	* src/PeerStat.h
	* src/SegmentMan.cc
2008-02-09 17:14:40 +00:00
Tatsuhiro Tsujikawa 1b7c198289 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std:: 
prefix to c++
	standard classes.
	Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00
Tatsuhiro Tsujikawa bdb1a25ca7 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Catch exception inside DHTMessageReceiver::receiveMessage().
	Log unknown message.
	* src/DHTMessageReceiver.{h, cc}
	* src/DHTMessageFactory.h
	* src/DHTMessageFactoryImpl.{h, cc}
	* src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
	* src/DHTInteractionCommand.cc
	* src/DHTUnknownMessage.{h, cc}
	* test/DHTUnknownMessageTest.cc
	* test/MockDHTMessageFactory.h
2008-02-05 14:15:50 +00:00
Tatsuhiro Tsujikawa 0f13363229 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added DHT functionality, compatible with mainline.
	DHT is disabled by default. To enable it, give --enable-dht to 
aria2c.
	You may need to specify entry point to DHT network using
	--dht-entry-point. DHT uses UDP port to listen incoming message.
	Use --dht-listen-port to specify port number. Make sure that 
your
	firewall configuration can pass through UDP traffic to the port.
	The routing table is saved in $HOME/.aria2/dht.dat.
	* src/DHT*
	* src/BNode.{h, cc}
	* src/PeerInteractionCommand.cc: enable DHT functionality for a
	particular torrent.
	* src/Data.cc: Rewritten ctor.
	* src/OptionHandlerFactory.cc: Added --enable-dht, 
--dht-listen-port,
	--dht-entry-point.
	* src/DefaultBtInteractive.cc: Send port message if dht is 
enabled.
	* src/RequestGroup.cc: Initialize DHT functionality. When 
download
	ends, remove BtContext from DHTPeerAnnounceStorage.
	* src/BtPortMessage.{h, cc}: Rewritten.
	* src/message.h
	* src/OptionHandlerImpl.cc
	* src/option_processing.cc: Added --enable-dht, 
--dht-listen-port,
	--dht-entry-point.
	* src/Dictionary.{h, cc} (remove): New function.
	* src/prefs.h
	* src/DefaultBtMessageFactory.h
	* src/BtHandshakeMessage.cc
	* src/ActivePeerConnectionCommand.cc
	* src/SocketCore.{h, cc}: Added datagram socket support.
	* src/DefaultBtMessageFactory.cc
	* src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
	Create DHT commands.
	* src/BtMessageFactory.h
	* src/PeerMessageUtil.{h, cc}
2008-02-01 17:36:33 +00:00
Tatsuhiro Tsujikawa 5516bc02cb Updated Makefile.am to include array_funTest.cc 2008-01-11 13:33:00 +00:00
Tatsuhiro Tsujikawa fce7b4b32f 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added categorized option help. Specify category using --help 
option.
	Also added the ability to search options in forward match.
	* src/HelpItem.{h, cc}
	* test/HelpItemTest.cc
	* src/HelpItemFactory.{h, cc}
	* src/TagContainer.{h, cc}
	* test/TagContainerTest.cc
	* src/option_processing.cc
	* src/prefs.h
	* src/TaggedItem.{h, cc}
	* test/TaggedItemTest.cc
	* src/version_usage.cc
	* src/help_tags.h
	* src/usage_text.h
2008-01-05 11:26:56 +00:00
Tatsuhiro Tsujikawa 286f34cb3f 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added uTorrent compatible Peer Exchange.
	* src/BencodeVisitor.{h, cc}
	* test/BencodeVisitorTest.cc
	* src/BtConstants.h
	* src/BtContext.h: Added 'private' flag.
	* src/BtExtendedMessage.{h, cc}
	* test/BtExtendedMessageTest.cc
	* src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
	reserved field.
	* test/BtHandshakeMessageTest.cc
	* src/BtMessageFactory.h
	* src/BtRegistry.h
	* src/BtRuntime.h: This class holds default extension message 
IDs for
	aria2. By default, aria2 uses ID 8 for ut_pex.
	* src/DefaultBtContext.cc
	* src/DefaultBtInteractive.{h, cc}: This class holds 
_utPexEnabled.
	When it is true, aria2 enables ut_pex. This value is set by
	PeerInteractionCommand.
	* src/DefaultBtMessageFactory.{h, cc}
	* test/DefaultBtMessageFactoryTest.cc
	* src/DefaultBtMessageReceiver.cc: Moved the code of fast 
extension
	handling to DefaultBtInteractive class.
	* src/DefaultExtensionMessageFactory.{h, cc}
	* test/DefaultExtensionMessageFactoryTest.cc
	* src/DefaultPeerStorage.cc: Returns false if a peer is already 
in
	the container(peers and incomingPeers. The equality is 
determined by
	Peer::id).
	* test/DefaultPeerStorageTest.cc
	* src/ExtensionMessage.h
	* test/MockExtensionMessage.h
	* src/ExtensionMessageFactory.h
	* test/MockExtensionMessageFactory.h
	* src/HandshakeExtensionMessage.{h, cc}
	* test/HandshakeExtensionMessageTest.cc
	* src/MetaEntry.h
	* src/Peer.{h, cc}
	* src/PeerInteractionCommand.cc
	* src/PeerReceiveHandshakeCommand.cc: Evaluate the return value 
of
	addIncomingPeer.
	* src/PeerMessageUtil.{h, cc}
	* src/PeerObject.h
	* src/UTPexExtensionMessage.{h, cc}
	* test/UTPexExtensionMessageTest.cc
	* src/message.h
	* src/prefs.h

	Fixed the bug that returns incomplete data when it contains null
	character. A convenient constructor was also added.
	* src/Data.{h, cc}

	Rewritten.
	* src/CompactPeerListProcessor.cc

	Fixed typos.
	* src/message.h
	* src/MetaFileUtil.cc
2007-12-22 03:57:55 +00:00
Tatsuhiro Tsujikawa d1d653abf3 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that -lexpat is always added to aria2c_LDADD.
	* src/Makefie.am
	* test/Makefile.am
2007-12-15 15:52:02 +00:00
Tatsuhiro Tsujikawa 3ea4fe447a 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed possible memory leak when an exception is thrown.
	* src/XML2SAXMetalinkProcessor.cc

	Added Expat support. If both libxml2 and Expat are installed, 
then
	libxml2 is used by default.
	MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor 
and
	ExpatMetalinkProcessor according to the configuration.
	* src/ExpatMetalinkProcessor.{h, cc}
	* src/main.cc: Removed libxml2 specific header and init/free 
function.
	* src/MetalinkProcessorFactory.{h, cc}
	* src/MetalinkHelper.cc
	* src/Metalinker.h: Removed unnecessary libxml2 header.
	* src/MetalinkProcessor.h
	* test/XML2SAXMetalinkProcessorTest.cc: Removed because
	MetalinkProcessorTest is used instead.
	* test/MetalinkProcessorTest.cc: Added. It is actually the same 
with
	XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
	MetalinkProcessorFactory::newInstance().
	* m4/libexpat.m4
	* configure.ac: Added configuration options for libexpat.
2007-12-14 00:46:32 +00:00
Tatsuhiro Tsujikawa 936ce09b83 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added XML2SAXMetalinkProcessor class, which is a lot faster than
	the predecessor, Xml2MetalinkParser class.
	I tested them against 94KB metalink file with 1234 chunk 
checksums.
	The new one parsed it in 22msec, while it took 6000msec with old 
one.
	* src/XML2SAXMetalinkProcessor.{h, cc}
	* test/XML2SAXMetalinkProcessorTest.cc
	* src/MetalinkParserController.{h, cc}
	* test/MetalinkParserControllerTest.cc
	* src/MetalinkParserState.h: Also added 16 subclasses.
	* src/main.cc
	* src/Metalink2RequestGroup.cc
	* src/MetalinkHelper.cc
	* src/MetalinkEntry.cc
	* src/ChunkChecksum.h
	
	Rewritten Base64 class for better performance.
	* src/Base64.{h, cc}
	* test/Base64Test.cc
	* src/HttpRequest.cc
2007-12-04 11:12:56 +00:00
Tatsuhiro Tsujikawa 506bc3db13 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten to add content-type support.
	* src/DownloadHandler.{h, cc}
	* src/BtPostDownloadHandler.{h, cc}
	* test/BtPostDownloadHandlerTest.cc
	* src/MetalinkPostDownloadHandler.{h, cc}
	* test/MetalinkPostDownloadHandlerTest.cc
	* src/PostDownloadHandler.{h, cc}
	* src/DownloadHandlerConstants.{h, cc}
	* src/RequestGroup.cc
	* src/HttpResponseCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/SingleFileDownloadContext.{h, cc}
	* src/RequestGroup.h
	* src/RequestGroupCriteria.h
	* src/ContentTypeRequestGroupCriteria.h

	Added 'mem' option value for --follow-metalink, 
--follow-torrent.
	If it is give, metalink/torrent file is not written to the disk, 
but
	just is kept in memory. Parsing is occurred on memory.
	* src/MetalinkHelper.{h, cc}
	* src/MetalinkProcessor.h
	* src/Xml2MetalinkProcessor.{h, cc}
	* test/Xml2MetalinkProcessorTest.cc
	* src/DownloadHandlerFactory.{h, cc}
	* test/DownloadHandlerFactoryTest.cc
	* src/PreDownloadHandler.{h, cc}
	* src/OptionHandlerFactory.cc
	* src/DefaultBtContext.{h, cc}
	* test/DefaultBtContextTest.cc
	* src/version_usage.cc
	* src/Metalink2RequestGroup.{h, cc}
	* src/RequestGroup.{h, cc}
	* src/a2functional.h
	* test/a2functionalTest.cc
	* src/MemoryBufferPreDownloadHandler.{h, cc}
	* src/OptionHandlerImpl.h
	* src/prefs.h
	* src/Util.{h, cc}
	* test/UtilTest.cc
	
	Keep DownloadResult rather than RequestGroup after downloads to 
reduce
	memory usage.
	* src/RequestGroupMan.{h, cc}
	* src/DownloadEngine.cc
	* src/BtDependency.{h, cc}: Changed the type of dependee from
	WeakHandle to SharedHandle because WeakHandle could be null.
	* src/RequestGroup.{h, cc}
	* src/DownloadEngineFactory.cc
	* src/DownloadResult.h
	
	Set totalLength after download finished
	* src/UnknownLengthPieceStorage.{h, cc}

	Keep torrent file specified in metalink in memory.
	* src/Metalink2RequestGroup.cc
	* src/BtDependency.cc
	* src/TrueRequestGroupCriteria.h

	Fixed the bug: seekg is used where seekp should be used.
	* src/ByteArrayDiskWriter.cc
	* test/ByteArraydiskWriterTest.cc
2007-11-27 12:27:10 +00:00
Tatsuhiro Tsujikawa c9e3d51054 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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-11-21 16:14:40 +00:00