mirror of https://github.com/aria2/aria2
b8737b0e7c
To simplify TrackerWatherCommand, TrackerUpdateCommand and make the process of announce request testable. * src/TrackerWatcherCommand.h (TimeA2.h): Removed. (interval): Removed. (checkPoint): Removed. (createRequestCommand): Added an argument 'url'. (TrackerWatherCommand): Removed interval. (createCommand): New function. * src/DownloadEngineFactory.cc (newTorrentConsoleEngine): Updated according to the changes in TrackerWatherCommand. * src/TorrentMan.cc (DelegatingPeerListProcessor.h): New includes. (TorrentMan): Added the initialization of announceInterval. (isStoppedAnnounceReady): New function. (isCompletedAnnounceReady): New function. (isDefaultAnnounceReady): New function. (isAnnounceReady): New function. (getAnnounceUrl): New function. (announceStart): New function. (announceFailure): New function. (announceSuccess): New function. (isAllAnnounceFailed): New function. (resetAnnounce): New function. (processAnnounceResponse): New function. (needMorePeerConnection): New function. (noMoreAnnounce): New function. * src/TrackerUpdateCommand.h (getTrackerResponse): int->size_t * src/TorrentMan.h (isStoppedAnnounceReady): New function. (isCompletedAnnounceReady): New function. (isDefaultAnnounceReady): New function. (announceInterval): New variable. (isAnnounceReady): New function. (getAnnounceUrl): New function. (announceStart): New function. (announceFailure): New function. (announceSuccess): New function. (isAllAnnounceFailed): New function. (resetAnnounce): New function. (processAnnounceResponse): New function. (needMorePeerConnection): New function. (noMoreAnnounce): New function. * src/TrackerWatcherCommand.cc (TrackerWatherCommand): Removed interval and checkPoint. (execute): Rewritten. (createCommand): New function. (createRequestCommand): Rewritten. * src/TrackerUpdateCommand.cc (MetaFileUtil.h): Removed. (DelegatingPeerListProcessor.h): Removed. (getTrackerResponse): int->size_t. Use torrentMan's new functions. |
||
---|---|---|
.. | ||
4096chunk.txt | ||
AllTest.cc | ||
AllowedFastMessageTest.cc | ||
AnnounceListTest.cc | ||
Base64Test.cc | ||
BitfieldManTest.cc | ||
BitfieldMessageTest.cc | ||
CancelMessageTest.cc | ||
ChokeMessageTest.cc | ||
ChunkedEncodingTest.cc | ||
CookieBoxTest.cc | ||
DataTest.cc | ||
DefaultDiskWriterTest.cc | ||
DefaultPeerListProcessorTest.cc | ||
DictionaryTest.cc | ||
FeatureConfigTest.cc | ||
FileTest.cc | ||
HaveAllMessageTest.cc | ||
HaveMessageTest.cc | ||
HaveNoneMessageTest.cc | ||
InterestedMessageTest.cc | ||
ListTest.cc | ||
Makefile.am | ||
Makefile.in | ||
MetaFileUtilTest.cc | ||
MetalinkEntryTest.cc | ||
MetalinkerTest.cc | ||
MultiDiskWriterTest.cc | ||
NotInterestedMessageTest.cc | ||
OptionTest.cc | ||
PeerMessageUtilTest.cc | ||
PieceMessageTest.cc | ||
RejectMessageTest.cc | ||
RequestMessageTest.cc | ||
RequestTest.cc | ||
RequestToString.cc | ||
SegmentManTest.cc | ||
ShaVisitorTest.cc | ||
ShareRatioSeedCriteriaTest.cc | ||
SpeedCalcTest.cc | ||
SuggestPieceMessageTest.cc | ||
TimeSeedCriteriaTest.cc | ||
TorrentManTest.cc | ||
TrackerWatcherCommandTest.cc | ||
UnchokeMessageTest.cc | ||
UtilTest.cc | ||
Xml2MetalinkProcessorTest.cc | ||
file1r.txt | ||
file2r.txt | ||
file3r.txt | ||
test.torrent | ||
test.xml |