Reads URIs from stdin when "-i -" is specified.
* src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
* src/UriListParser.h, src/UriListParser.cc: New class.
* src/StreamUriListParser.h: New class.
* src/FileUriListParser.h: New class.
* src/main.cc (main): Use StreamUriListParser and
FileUriListParser
instead of UriFileListParser.
Create directory structure specified in metalink file.
* src/RequestGroup.h, src/RequestGroup.cc
(initAndOpenFile): Create a directory to store files if it does
not
exist.
(getDir): New function.
Added ETA and download speed for an individual file to readout.
* src/ConsoleDownloadEngine.cc (sendStatistics)
* src/RequestGroup.h
(calculateDownloadSpeed): New function.
Create directory structure specified in metalink file.
* src/RequestGroup.h, src/RequestGroup.cc
(initAndOpenFile): Create a directory to store files if it does
not
exist.
(getDir): New function.
Made -S option work with metalink file and provided selective
download
to metalink.
* src/MetalinkEntry.h, src/MetalinkEntry.cc
(filename): Removed.
(file): New variable.
(size): Removed.
(operator=): Updated.
(getPath): New function.
(getLength): New function.
(toFileEntry): New function.
* src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
(execute): Use toStream.
(showFileEntry): Removed.
* src/MetalinkRequestInfo.h
(targetFiles): New variable.
(setTargetFiles): New variable.
* src/MetalinkRequestInfo.cc
(execute): Added the ability to print file information included
in
a metalink file.
Added selective download mode to metalink.
* src/main.cc
(showUsage): Updated to denote that -S and --select-file options
are
applicable to metalink.
* src/FileEntry.h
(operator=): New function.
(getBasename): New function.
(getDirname): New function.
* src/Util.h, src/Util.cc
(toStream): New function.
* src/Xml2MetalinkProcessor.cc: Updated.
Made aria2 work with metalink with directory structure.
* src/File.h, src/File.cc
(getBasename): New function.
(getDirname): New function.
* src/RequestGroup.h, src/RequestGroup.cc
(_topDir): New variable.
(setTopDir): New function.
(initSegmentMan): A directory structure is added to
_segmentMan->dir.
Rewrote HTTP header parsing with stringstream.
* src/HttpConnection.h, src/HttpConnection.cc
(HttpRequestEntry): New class.
(headerBuf): Removed.
(headerBufLength): Removed.
(outstandingHttpRequests): Now its element type is
HttpRequestEntryHandle.
(findEndOfHeader): Removed.
(receiveResponse): Rewritten.
Updated doc for -j option to notice that it should be used with
-i
option.
* src/main.cc (showUsage)
Removed unused classes.
* src/RequestInfo.h
(FileInfo): Removed.
(checksum): Removed.
(fileInfo): Removed.
(setChecksum): Removed.
(getChecksum): Removed.
(getFileInfo): Removed.
Use ISO units.
* src/ConsoleDownloadEngine.cc
* src/TorrentConsoleDownloadEngine.cc
* src/Util.cc (abbrevSize)
Reduce the number of calls to gettimeofday to lower CPU load.
* src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New
function.
* src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New
function.
* src/Peer.h (calculateUploadSpeed): New function.
(calculateDownloadSpeed): New function.
* src/DefaultPeerStorage.cc
(CalculateStat): Added _now variable.
In operator(), call Peer::calculateDownloadSpeed(const struct
timeval&)
and Peer::calculateUploadSpeed(const struct timeval&)
Drop connection if no request or piece message is exchanged in
a certain interval.
* src/DefaultBtInteractive.h
(btRuntime): New variable.
(inactiveCheckPoint): New variable.
(checkActiveInteraction): New function.
* src/DefaultBtInteractive.cc (receiveMessages): Reset timer
when
request or piece message is received.
(checkActiveInteraction): New function.
(doInteractionProcessing): Call checkActiveInteraction.
Fixed the bug that causes remote Metalink and Torrent files are
not
processed.
* src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the
bug.
Accept incoming connections if download rate is low.
* src/PeerListenCommand.h, src/PeerListenCommand.cc:
(_lowestSpeedLimit): New variable.
(setLowestSpeedLimit): New function.
(execute): Accept incoming connections if download rate is low.
MAX_PEERS is ignored in this case.
Disable PREF_OUT in multiple concurrent download:
* src/RequestGroup.h, src/RequestGroup.cc
(setUserDefinedFilename): New function.
* src/DownloadEngineFactory.cc
(newConsoleEngine): Do not set PREF_OUT to requestGroup in
multiple
concurrent download.
* src/DefaultSegmentManFactory.cc
(createNewInstance): Comment out the line: segmentMan->ufilename
= ...
Accept incoming connections if download rate is low.
* src/PeerListenCommand.h, src/PeerListenCommand.cc:
(_lowestSpeedLimit): New variable.
(setLowestSpeedLimit): New function.
(execute): Accept incoming connections if download rate is low.
MAX_PEERS is ignored in this case.
RequestGroup::getNextCommand() was renamed to
createNextCommand().
Added its overloaded method.
* src/RequestGroup.h
(_numConcurrentCommand): New variable.
(setNumConcurrentCommand): New function.
* src/RequestGroup.cc
Abort download if same file is being downloaded concurrently.
* src/RequestGroup.h, src/RequestGroupMan.cc
(isSameFileBeingDownloaded): New function.
* src/HttpResponseCommand.cc (executeInternal)
* src/FtpNegotiateCommand.cc (recvSize)
* src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
* main.cc: Added help message for -i option.
Change file mode to 666:
* src/common.h (OPEN_MODE): New definition.
* src/File.cc
* src/Util.cc
* src/Directry.cc
* src/AbstractDiskWriter.cc
Change the level of log message "download aborted" to debug:
* src/PeerAbstractCommand.cc (execute)
* src/RequestGroup.h (RequestGroup): Initialized
_hintTotalLength to 0.
* src/TrackerWatcherCommand.cc
(createCommand): Sleep some seconds after request failed.
If tracker request fails more than value of
PREF_TRACKER_MAX_TRIES,
then abort tracker request.
* src/PeerAbstractCommand.cc
(onAbort): Call PeerStorage::returnPeer()
* src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
(incomingPeers): New variable.
(addIncomingPeer): New function.
(returnPeer): New function.
(onErasingPeer): New function.
(addPeer): push_back -> push_front
(getActivePeers): Rewritten.
(calculateStat): Rewritten.
* src/PeerStorage.h
(TransferStat::copy): New function.
(TransferStat::TransferStat): New function.
(TransferStat::operator=): New function.
(addIncomingPeer): New function.
(returnPeer): New function.
* src/PeerListenCommand.cc
(execute): Use PeerStorage::addIncomingPeer() instead of
Peer::addPeer().