* src/version_usage.cc
(showVersion): Reworked.
(showUsage): Added examples.
Removed Hint for total length and file name.
* src/Metalink2RequestGroup.cc
* src/RequestGroup.{h, cc}
* src/HttpResponseCommand.cc
* src/FtpNegotiationCommand.cc
Now --follow-torrent and --follow-metalink option work properly.
* src/RequestGroup.cc
Updated man page
* doc/aria2c.1.txt
* doc/aria2c.1
Fixed: the listen port sent to the tracker is wrong. If aria2
fails
to open listen port, then remove the port number from the
tracker
request.
* src/DefaultBtAnnounce.cc
* test/DefaultBtAnnounceTest.cc
* test/MockPieceStorage.h
Inject randomizer to DefaultBtAnnounce and DefaultBtContext to
make
them more testable.
* src/DefaultBtAnnounce.{h, cc}
* src/DefaultBtContext.{h, cc}
* src/Util.{h, cc}
* test/DefaultBtAnnounceTest.cc
* test/DefaultBtContextTest.cc
* test/UtilTest.cc
Added 'B' to upload bytes readout.
* src/ConsoleStatCalc.cc
Now the listen port for BitTorrent download is opened when it is
needed.
* src/DownloadEngineFactory.cc
* src/BtSetup.{h, cc}
* src/PeerListenCommand.{h, cc}
Now an exception thrown while parsing tracker response is now
logged.
If DlAbortEx is catched, then btAnnounce->resetAnnounce()
immediately
called, which means no retry is made in this case, assuming a
tracker
has a problem.
* src/TrackerWatcherCommand.cc
Fixed: downloading a file whose length is unkown fails.
* src/DownloadCommand.cc
Simplified prepareForNextSegment()
* src/DownloadCommand.cc
Updated
* po/POTFILES.in
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.
To add Metalink location option:
* src/MetalinkRequestInfo.cc
(execute): Call MetalinkEntry::setLocationPreference()
* src/main.cc
(showUsage): Added the help message for --metalink-location
option.
(main): Added --metalink-location option.
* src/prefs.h
(PREF_METALINK_LOCATION): New definition.
* src/MetalinkEntry.cc
(AddLocationPreference): New function object.
(setLocationPreference): New function.
* src/Xml2MetalinkProcessor.cc
(getResource): Set location attribute to MetalinkResource
To show URLs to download
* src/UrlRequestInfo.h
(printUrls): New function.
To add multiple <file> Metalink support:
* src/MetalinkEntry.h
(MetalinkResources): Removed.
(setLocationPreference): New function.
(MetalinkEntryHandle): New type definition.
(MetalinkEntries): New type definition.
* src/Xml2MetalinkProcessor.h
(getEntry): MetalinkEntry* -> MetalinkEntryHandle
(getResource): MetalinkResource* -> MetalinkResourceHandle
(parseFile): Metalinker* -> MetalinkerHandle
* src/UrlRequestInfo.h
(execute): RequestInfo* -> RequestInfos
* src/MetalinkRequestInfo.cc
(AccumulateNonP2PUrl): MetalinkResource* ->
MetalinkResourceHandle
(FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
(execute): RequestInfo* -> RequestInfos
Added multiple <file> support. Print filename when it is queued.
* src/MetalinkRequestInfo.h
(execute): RequestInfo* -> RequestInfos
(getDownloadEngine): Removed.
* src/RequestInfo.h
(RequestInfoHandle): New type definition.
(RequestInfos): New type definition.
(execute): RequestInfo* -> RequestInfos
(getDownloadEngine): Removed.
* src/MetalinkResource.h
(MetalinkResourceHandle): New type definition.
(MetalinkResources): New type definition.
* src/MetalinkEntry.cc
(~MetalinkEntry): Removed the deletion of the elements of
resources,
because the element is now of type MetalinkResourceHandle.
(PrefOrder): MetalinkResource* -> MetalinkResourceHandle
(Supported): MetalinkResource* -> MetalinkResourceHandle
(dropUnsupportedResource): Removed the deletion of the elements
of
resources because the element is now of type
MetalinkResourceHandle.
* src/Xml2MetalinkProcessor.cc
(parseFile): Metalinker* -> MetalinkerHandle
MetalinkEntry* -> MetalinkEntryHandle
Removed try-catch block.
(getEntry): MetalinkEntry* -> MetalinkEntryHandle
MetalinkResource* -> MetalinkResourceHandle
Removed try-catch block.
(getResource): MetalinkResource* -> MetalinkResourceHandle
Free result by using xmlXPathFreeObject()
* src/Metalinker.cc
(~Metalinker): Removed the deletion of entries.
MetalinkEntry* -> MetalinkEntryHandle
(queryEntry): Add multiple <file> Metalink support.
* src/Metalinker.h
(MetalinkEntries): Removed.
(queryEntry): MetalinkEntry* -> MetalinkEntries
* src/MetalinkProcessor.h
(parseFile): Metalinker* -> MetalinkerHandle
Bug fixes:
* src/PeerChokeCommand.cc
(execute): cat01->cat02
* src/DefaultPieceStorage.cc
(DefaultPieceStorage): Added diskAdaptor(0)
* src/TrackerWatcherComand.cc:
(execute): Use btAnnounce->noMoreAnnounce()
to determin whether the function returns true or not.
* src/TrackerUpdateCommand.cc:
(execute): Use btAnnounce->noMoreAnnounce()
to determin whether the function returns true or not.
* src/FtpConnection.cc
(bulkReceiveResponse): Throw DlRetryEx if EOF got.
This is the fix of the busy loop bug.
* src/DownloadCommand.cc
(DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat()
returns
cached PeerStat.
The value of "name" entry in torrent file is now set by
*DiskAdaptor::setTopDir(...) methods.
* src/MultiDiskAdaptor.h
(topDir): New variable.
(setTopDir): New function.
(getTopDir): New function.
* src/MultiDiskAdaptor.cc
(getFilePath): Concat storDir, "/" and topDir.
(mkdir): Use getFilePath() to get the directory path for output.
* src/DefaultPieceStorage.cc
(initStorage): Set the value of "name" entry to
MultiDiskAdaptor,
CopyDiskAdaptor.
* src/CopyDiskAdaptor.h
(topDir): New variable.
(setTopDir): New function.
(getTopDir): New function.
* src/CopyDiskAdaptor.cc
(fixFilename): Updated.
Misc
* src/UrlRequestInfo.h
(e): Removed.
(UrlRequestInfo): Removed e.
(getDownloadEngine): Removed.
* src/UrlRequestInfo.cc
(handler): Rewritten.
(printUrls): New function.
(execute): Call printUrls().
* src/HandshakeMessage.cc
(check): peerinteraction->getBtContext() -> btContext
* src/PeerInteraction.h
(getBtContext): Removed.
* src/TorrentRequestInfo.h
(execute): RequestInfo* -> RequestInfos
(getDownloadEngine): Removed.
* src/TorrentRequestInfo.cc
(haltRequested): Removed.
(btHaltRequested): New variable.
(torrentHandler): haltRequested -> btHaltRequested
(execute): RequestInfo* -> RequestInfos
* src/TorrentConsoleDownloadEngine.cc
(afterEachIteration): haltRequested -> btHaltRequested.
* src/ConsoleDownloadEngine.h
(initStatistics): Added virtual.
(calculateStatistics): Added virtual.
(onEndOfRun): Added virtual.
(afterEachIteration): Added virtual.
* src/ConsoleDownloadEngine.cc
(haltRequested): New variable.
(afterEachIteration): New function.
* src/main.cc
(requestInfo): Removed.
* src/SegmentMan.cc
(findSlowerSegmentEntry): Refactored.
* src/FtpNegotiateCommand.cc
(recvGreeting): Call disableWriteCheckSocket just after
socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/PeerChokeCommand.h
(PeerChokeCommand): Rearranged the arguments.
* src/PeerChokeCommand.cc
(PeerChokeCommand): Rearranged the arguments.
* src/MetalinkEntry.h
(Checksum.h): Included.
(md5): Removed.
(sha1): Removed.
(checksum): New variable.
(operator=): Updated.
(check): Removed.
* src/prefs.h
(PREF_LOWEST_SPEED_LIMIT): New definition.
(PREF_FOLLOW_TORRENT): New definition.
(PREF_SELECT_FILE): New definition.
(PREF_FOLLOW_METALINK): New definition.
* src/MetalinkResource.h
(TYPE_HTTPS): Added to enum TYPE.
* src/TorrentMan.cc
(~TorrentMan): Rewritten.
* src/MultiDiskWriter.cc
(MultiDiskAdaptor): Updated according to the changes in
MessageDigestContext.
(~MultiDiskAdaptor): Updated according to the changes in
MessageDigestContext.
(hashUpdate): Updated according to the changes in
MessageDigestContext.
(sha1Sum): Updated according to the changes in
MessageDigestContext.
* src/Util.h
(fileChecksum): Updated according to the changes in
MessageDigestContext.
* src/Util.cc
(sha1Sum): Updated according to the changes in
MessageDigestContext.
(fileChecksum): Updated according to the changes in
MessageDigestContext.
* src/messageDigest.h: Rewritten.
* src/MetalinkEntry.cc
(check): Removed.
(Supported): Updated.
(dropUnsupportedResource): Fixed a memory leak.
* src/ShaVisitor.cc
(ShaVisitor): Updated according to the changes in
MessageDigestContext.
(~ShaVisitor): Updated according to the changes in
MessageDigestContext.
(visit): Updated according to the changes in
MessageDigestContext.
* src/main.cc
(main): Rewritten the portion of download loop.
--lowest-speed-limit
command-line option added.
* src/DownloadEngine.h
(SocketEntry): New class.
(SocketEntries): New definition.
(PairFind): Removed.
(SockCmdMap): Removed.
* src/DownloadEngine.cc
(DownloadEngine): Rewritten.
(~DownloadEngine): Rewritten.
(run): Renamed activeCommandUuids as activeUuids.
(SetDescriptor): Rewritten.
(AccumulateActiveCommandUuid): Removed.
(AccumulateActiveUuid): New function object.
(waitData): Rewritten.
(updateFdSet): Rewritten.
(addSocket): Rewritten.
(deleteSocket): Rewritten.
(addSocketForReadCheck): Rewritten.
(deleteSocketForReadCheck): Rewritten.
(addSocketForWriteCheck): Rewritten.
(deleteSocketForWriteCheck): Rewritten.
* src/Xml2MetalinkProcessor.cc
(getEntry): Rewritten the portion of MetalinkEntry creation.
* src/DownloadCommand.cc
(executeInternal): Added the check routine for lowest speed
limit.
* src/AbstractDiskWriter.cc
(AbstractDiskWriter): Updated according to the changes in
MessageDigestContext.
(~AbstractDiskWriter): Updated according to the changes in
MessageDigestContext.
(sha1Sum): Updated according to the changes in
MessageDigestContext.
* src/RequestInfo.h: New class.
* src/UrlRequestInfo.h: New class.
* src/UrlRequestInfo.cc: New class.
* src/TorrentRequestInfo.h: New class.
* src/TorrentRequestInfo.cc: New class.
* src/MetalinkRequestInfo.h: New class.
* src/MetalinkRequestInfo.cc: New class.
* src/Checksum.h: New class.
* src/DownloadEngineFactory.h: New class.
* src/DownloadEngineFactory.cc: New class.
* ConsoleDownloadEngine.{h, cc}: Console output message(size,
speed)
is now generated by ConsoleDownloadEngine not by DownloadEngine.
* main.cc: Download complete/abort message is now generated by
main.
* Makefile.am (SUBDIRS): Add m4.
(ACLOCAL_AMFLAGS): New variable.
(EXTRA_DIST): New variable.
* configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
* gettext: added gettext functionality