Commit Graph

9 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
41121e09f7 Use std::unique_ptr for Metalink objects 2013-07-12 23:09:23 +09:00
Tatsuhiro Tsujikawa
07d270c87e Require -std=c++11 and use std::shared_ptr instead of SharedHandle 2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
8d1da8bd3e 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made public member variable in Metalinker private
	* src/MetalinkParserController.cc
	* src/Metalinker.cc
	* src/Metalinker.h
	* test/MetalinkParserControllerTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MetalinkerTest.cc
2010-06-12 14:39:26 +00:00
Tatsuhiro Tsujikawa
88656eb14e 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use vector instead of deque for MetalinkEntry and MetalinkResource
	objects.
	* src/Metalink2RequestGroup.cc
	* src/Metalink2RequestGroup.h
	* src/MetalinkEntry.cc
	* src/MetalinkEntry.h
	* src/MetalinkHelper.cc
	* src/MetalinkHelper.h
	* src/Metalinker.cc
	* src/Metalinker.h
	* src/main.cc
	* test/MetalinkEntryTest.cc
	* test/MetalinkHelperTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MetalinkerTest.cc
2010-02-27 15:14:40 +00:00
Tatsuhiro Tsujikawa
3880a5f71b 2010-02-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added Metalink4 support. Currently, name attribute of
	metalink::metaurl is ignored and multi-file torrent cannot be used
	with Metalink4.
	* doc/aria2c.1.txt
	* src/DownloadHandlerConstants.cc
	* src/ExpatMetalinkProcessor.cc
	* src/Makefile.am
	* src/Metalink2RequestGroup.cc
	* src/MetalinkEntry.cc
	* src/MetalinkEntry.h
	* src/MetalinkParserController.cc
	* src/MetalinkParserController.h
	* src/MetalinkParserState.h
	* src/MetalinkParserStateImpl.cc
	* src/MetalinkParserStateImpl.h
	* src/MetalinkParserStateMachine.cc
	* src/MetalinkParserStateMachine.h
	* src/MetalinkParserStateV3Impl.cc
	* src/MetalinkParserStateV3Impl.h
	* src/MetalinkParserStateV4Impl.cc
	* src/MetalinkParserStateV4Impl.h
	* src/MetalinkResource.cc
	* src/MetalinkResource.h
	* src/Metalinker.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/XML2SAXMetalinkProcessor.cc
	* src/messageDigest.cc
	* src/util.cc
	* src/util.h
	* test/Makefile.am
	* test/MetalinkEntryTest.cc
	* test/MetalinkParserControllerTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MetalinkerTest.cc
	* test/UtilTest.cc
	* test/metalink4-attrs.xml
	* test/metalink4-dirtraversal.xml
	* test/metalink4.xml
2010-02-25 14:40:18 +00:00
Tatsuhiro Tsujikawa
3da60af41e 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed method sinature:
	MetalinkEntry::toFileEntry,
	MetalinkHelper::query, MetalinkHelper::parseAndQuery,
	Metalinker::queryEntry
	* src/Metalink2RequestGroup.cc
	* src/MetalinkEntry.cc
	* src/MetalinkEntry.h
	* src/MetalinkHelper.cc
	* src/MetalinkHelper.h
	* src/Metalinker.cc
	* src/Metalinker.h
	* src/main.cc
	* test/MetalinkHelperTest.cc
	* test/MetalinkerTest.cc
2008-05-12 11:39:34 +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
8d0ef717e1 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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.
2006-11-08 16:25:38 +00:00
Tatsuhiro Tsujikawa
8d340992d6 2006-07-03 14:19:59 +00:00