Commit Graph

17 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
529b9fdceb Use std::unique_ptr for ExtensionMessage 2013-07-01 21:42:51 +09:00
Tatsuhiro Tsujikawa
098f1571be Wrap BtMessage objects by std::unique_ptr instead of std::shared_ptr 2013-06-30 22:55:43 +09:00
Tatsuhiro Tsujikawa
da7400ef5c Return std::unique_ptr member as const ref
Returning raw pointer has a risk that it may be stolen by
std::shared_ptr in accident.
2013-06-26 23:56:43 +09:00
Tatsuhiro Tsujikawa
bef6236da8 DownloadContext::attrs_ now holds std::unique_ptr
DownloadContext::getAttribute() returns a raw pointer.
2013-06-23 00:59:55 +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
8b0c701266 Removed trailing spaces 2012-10-01 23:52:22 +09:00
Tatsuhiro Tsujikawa
c13dc166de Rewritten ExtensionMessageRegistry 2012-09-26 22:02:48 +09:00
Tatsuhiro Tsujikawa
f0000a8754 Made ExtensionMessage's NAME const char[] 2012-09-26 00:01:41 +09:00
Tatsuhiro Tsujikawa
e2340efe27 Use std::vector instead of std::map for ContextAttribute objects
Now key for ContextAttribute object store is int instead of string.
2012-09-22 17:37:30 +09:00
Tatsuhiro Tsujikawa
93e5dbed32 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SharedHandle::isNull(). Instead we added operator* and
	operator unspecified_bool_type. Removed use of WeakHandle and
	replaced with raw pointer.
2010-11-12 12:48:48 +00:00
Tatsuhiro Tsujikawa
ca4940622c 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed naming standards for class member variable: now it looks
	like var_ instead of _var.
2010-06-21 13:51:56 +00:00
Tatsuhiro Tsujikawa
8ba97188ce 2010-06-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Introduced ValueBase class, which is a replacement of BDE.  In
	this change ValueBase is used instead of BDE except DHT messages,
	UTMetadata messages and XML-RPC. They'll be replaced in the later
	commits. DownloadContext::_attrs is now ContextAttribute rather
	than BDE.
	* src/ActivePeerConnectionCommand.cc
	* src/AnnounceList.cc
	* src/AnnounceList.h
	* src/BtDependency.cc
	* src/BtRegistry.cc
	* src/BtSetup.cc
	* src/ConsoleStatCalc.cc
	* src/ContextAttribute.h
	* src/DefaultBtAnnounce.cc
	* src/DefaultBtInteractive.cc
	* src/DownloadContext.cc
	* src/DownloadContext.h
	* src/HandshakeExtensionMessage.cc
	* src/InitiateConnectionCommand.cc
	* src/LpdReceiveMessageCommand.cc
	* src/MSEHandshake.cc
	* src/Makefile.am
	* src/Makefile.in
	* src/PeerInteractionCommand.cc
	* src/PeerListProcessor.h
	* src/ProtocolDetector.cc
	* src/RequestGroup.cc
	* src/RequestGroupMan.cc
	* src/TorrentAttribute.h
	* src/TrackerWatcherCommand.cc
	* src/UTMetadataDataExtensionMessage.cc
	* src/UTMetadataPostDownloadHandler.cc
	* src/UTMetadataRequestExtensionMessage.cc
	* src/ValueBase.cc
	* src/ValueBase.h
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.h
	* src/bencode2.cc
	* src/bencode2.h
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* src/download_helper.cc
	* src/magnet.cc
	* src/magnet.h
	* test/AnnounceListTest.cc
	* test/Bencode2Test.cc
	* test/BencodeTest.cc
	* test/BittorrentHelperTest.cc
	* test/BtDependencyTest.cc
	* test/BtRegistryTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/MSEHandshakeTest.cc
	* test/MagnetTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/RequestGroupManTest.cc
	* test/UTMetadataDataExtensionMessageTest.cc
	* test/UTMetadataPostDownloadHandlerTest.cc
	* test/UTMetadataRequestExtensionMessageTest.cc
	* test/ValueBaseTest.cc
	* test/XmlRpcMethodTest.cc
2010-06-18 14:47:09 +00:00
Tatsuhiro Tsujikawa
4db349c1f3 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
	columns.
	* src
	* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa
625a102d1b 2009-12-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Halt metadata download immediately when metadata download is done.
	Don't wait unresponsive tracker.
	* src/ByteArrayDiskWriter.h
	* src/DefaultBtInteractive.cc
	* src/DefaultExtensionMessageFactory.cc
	* src/DefaultExtensionMessageFactory.h
	* src/PeerInteractionCommand.cc
	* src/UTMetadataDataExtensionMessage.cc
	* src/UTMetadataDataExtensionMessage.h
	* src/UTMetadataRequestExtensionMessage.cc
	* test/UTMetadataDataExtensionMessageTest.cc
	* test/UTMetadataRequestExtensionMessageTest.cc
2009-12-04 12:48:54 +00:00
Tatsuhiro Tsujikawa
6939be2765 2009-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed ExtensionMessage::getBencodedData() as
	ExtensionMessage::getPayload()
	* src/BtExtendedMessage.cc
	* src/ExtensionMessage.h
	* src/HandshakeExtensionMessage.cc
	* src/HandshakeExtensionMessage.h
	* src/UTMetadataDataExtensionMessage.cc
	* src/UTMetadataDataExtensionMessage.h
	* src/UTMetadataRejectExtensionMessage.cc
	* src/UTMetadataRejectExtensionMessage.h
	* src/UTMetadataRequestExtensionMessage.cc
	* src/UTMetadataRequestExtensionMessage.h
	* src/UTPexExtensionMessage.cc
	* src/UTPexExtensionMessage.h
	* test/HandshakeExtensionMessageTest.cc
	* test/MockExtensionMessage.h
	* test/UTMetadataDataExtensionMessageTest.cc
	* test/UTMetadataRejectExtensionMessageTest.cc
	* test/UTMetadataRequestExtensionMessageTest.cc
	* test/UTPexExtensionMessageTest.cc
2009-11-28 12:32:07 +00:00
Tatsuhiro Tsujikawa
c1730aeea9 2009-11-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed ut_metadata data handling. Implemented
	UTMetadataDataExtensionMessage::doReceivedAction().  Initialize
	PeerStorage in HandshakeExtensionMessage::doReceivedAction() when
	metadata_size is received.
	* src/DefaultExtensionMessageFactory.cc
	* src/DefaultExtensionMessageFactory.h
	* src/HandshakeExtensionMessage.cc
	* src/HandshakeExtensionMessage.h
	* src/UTMetadataDataExtensionMessage.cc
	* src/UTMetadataDataExtensionMessage.h
	* src/UTMetadataRequestExtensionMessage.cc
	* src/UTMetadataRequestFactory.cc
	* src/UTMetadataRequestFactory.h
	* src/UTMetadataRequestTracker.cc
	* src/UTMetadataRequestTracker.h
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/MockBtMessage.h
	* test/UTMetadataDataExtensionMessageTest.cc
	* test/UTMetadataRequestExtensionMessageTest.cc
	* test/UTMetadataRequestFactoryTest.cc
	* test/UTMetadataRequestTrackerTest.cc
	* test/extension_message_test_helper.h
2009-11-22 15:31:47 +00:00
Tatsuhiro Tsujikawa
93968c4fa5 2009-11-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Initial support of Extension for Peers to Send Metadata
	Files(BEP9). Currently aria2 only serves metadata and cannot get
	metadata from swarm.
	* src/BtConstants.h
	* src/DefaultBtInteractive.cc
	* src/DefaultExtensionMessageFactory.cc
	* src/DefaultExtensionMessageFactory.h
	* src/ExtensionMessage.h
	* src/ExtensionMessageRegistry.h
	* src/HandshakeExtensionMessage.cc
	* src/HandshakeExtensionMessage.h
	* src/Makefile.am
	* src/PeerConnection.h
	* src/PeerInteractionCommand.cc
	* src/UTMetadataDataExtensionMessage.cc
	* src/UTMetadataDataExtensionMessage.h
	* src/UTMetadataExtensionMessage.cc
	* src/UTMetadataExtensionMessage.h
	* src/UTMetadataRejectExtensionMessage.cc
	* src/UTMetadataRejectExtensionMessage.h
	* src/UTMetadataRequestExtensionMessage.cc
	* src/UTMetadataRequestExtensionMessage.h
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* test/BittorrentHelperTest.cc
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/Makefile.am
	* test/UTMetadataDataExtensionMessageTest.cc
	* test/UTMetadataRejectExtensionMessageTest.cc
	* test/UTMetadataRequestExtensionMessageTest.cc
2009-11-20 15:42:25 +00:00