From 7cf589e78483e6ca7daff2ddd1a30af8091a4448 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 3 Nov 2008 06:49:02 +0000 Subject: 2008-11-03 Tatsuhiro Tsujikawa Made BtRegistry non-static object. Now DownloadEngine has a reference to its object. * src/AbstractBtMessage.cc * src/ActivePeerConnectionCommand.cc * src/ActivePeerConnectionCommand.h * src/BtContextAwareCommand.cc * src/BtContextAwareCommand.h * src/BtExtendedMessage.cc * src/BtExtendedMessage.h * src/BtInterestedMessage.cc * src/BtInterestedMessage.h * src/BtNotInterestedMessage.cc * src/BtNotInterestedMessage.h * src/BtRegistry.cc * src/BtRegistry.h * src/BtSeederStateChoke.cc * src/BtSetup.cc * src/DHTGetPeersCommand.cc * src/DHTGetPeersCommand.h * src/DHTPeerAnnounceEntry.cc * src/DHTPeerAnnounceEntry.h * src/DHTPeerAnnounceStorage.cc * src/DHTPeerAnnounceStorage.h * src/DHTPeerLookupTask.cc * src/DHTPeerLookupTask.h * src/DHTSetup.cc * src/DHTSetup.h * src/DHTTaskFactory.h * src/DHTTaskFactoryImpl.cc * src/DHTTaskFactoryImpl.h * src/DefaultBtAnnounce.cc * src/DefaultBtInteractive.cc * src/DefaultBtInteractive.h * src/DefaultBtMessageDispatcher.cc * src/DefaultBtMessageDispatcher.h * src/DefaultBtMessageFactory.cc * src/DefaultBtMessageFactory.h * src/DefaultBtMessageReceiver.cc * src/DefaultBtProgressInfoFile.cc * src/DefaultBtProgressInfoFile.h * src/DefaultBtRequestFactory.cc * src/DefaultBtRequestFactory.h * src/DefaultExtensionMessageFactory.cc * src/DefaultExtensionMessageFactory.h * src/DefaultPeerStorage.cc * src/DefaultPeerStorage.h * src/DownloadEngine.cc * src/DownloadEngine.h * src/InitiatorMSEHandshakeCommand.cc * src/InitiatorMSEHandshakeCommand.h * src/MSEHandshake.cc * src/MSEHandshake.h * src/Makefile.am * src/Makefile.in * src/PeerChokeCommand.cc * src/PeerChokeCommand.h * src/PeerInitiateConnectionCommand.cc * src/PeerInitiateConnectionCommand.h * src/PeerInteractionCommand.cc * src/PeerInteractionCommand.h * src/PeerObject.h * src/PeerReceiveHandshakeCommand.cc * src/PeerReceiveHandshakeCommand.h * src/ReceiverMSEHandshakeCommand.cc * src/RequestGroup.cc * src/RequestGroup.h * src/RequestGroupMan.cc * src/RequestGroupMan.h * src/SeedCheckCommand.cc * src/SeedCheckCommand.h * src/ShareRatioSeedCriteria.h * src/SimpleBtMessage.cc * src/TrackerWatcherCommand.cc * src/TrackerWatcherCommand.h * src/UTPexExtensionMessage.cc * src/UTPexExtensionMessage.h * test/BtCancelMessageTest.cc * test/BtChokeMessageTest.cc * test/BtExtendedMessageTest.cc * test/BtInterestedMessageTest.cc * test/BtNotInterestedMessageTest.cc * test/BtPieceMessageTest.cc * test/BtPortMessageTest.cc * test/BtRegistryTest.cc * test/BtRejectMessageTest.cc * test/BtRequestMessageTest.cc * test/DHTPeerAnnounceEntryTest.cc * test/DHTPeerAnnounceStorageTest.cc * test/DefaultBtMessageDispatcherTest.cc * test/DefaultBtMessageFactoryTest.cc * test/DefaultBtProgressInfoFileTest.cc * test/DefaultBtRequestFactoryTest.cc * test/DefaultExtensionMessageFactoryTest.cc * test/MSEHandshakeTest.cc * test/MockDHTTaskFactory.h * test/ShareRatioSeedCriteriaTest.cc * test/UTPexExtensionMessageTest.cc --- src/DHTPeerLookupTask.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/DHTPeerLookupTask.cc') diff --git a/src/DHTPeerLookupTask.cc b/src/DHTPeerLookupTask.cc index a2fe6836..392d4a1d 100644 --- a/src/DHTPeerLookupTask.cc +++ b/src/DHTPeerLookupTask.cc @@ -41,7 +41,6 @@ #include "DHTNodeLookupEntry.h" #include "DHTMessageDispatcher.h" #include "DHTMessageCallback.h" -#include "BtRegistry.h" #include "PeerStorage.h" #include "BtRuntime.h" #include "BtContext.h" @@ -52,9 +51,7 @@ namespace aria2 { DHTPeerLookupTask::DHTPeerLookupTask(const SharedHandle& btContext): DHTAbstractNodeLookupTask(btContext->getInfoHash()), - _ctx(btContext), - _peerStorage(PEER_STORAGE(btContext)), - _btRuntime(BT_RUNTIME(btContext)) {} + _ctx(btContext) {} void DHTPeerLookupTask::getNodesFromMessage(std::deque >& nodes, @@ -110,4 +107,14 @@ const std::deque >& DHTPeerLookupTask::getPeers() const return _peers; } +void DHTPeerLookupTask::setBtRuntime(const SharedHandle& btRuntime) +{ + _btRuntime = btRuntime; +} + +void DHTPeerLookupTask::setPeerStorage(const SharedHandle& ps) +{ + _peerStorage = ps; +} + } // namespace aria2 -- cgit