2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Reverted changes which deleted peerConnection from
	DefaultBtInteractive.
	* src/DefaultBtInteractive.cc
	* src/DefaultBtInteractive.h
	* src/PeerInteractionCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-06-13 11:00:43 +00:00
parent 7584ad1437
commit 6ae473e77f
4 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Reverted changes which deleted peerConnection from
DefaultBtInteractive.
* src/DefaultBtInteractive.cc
* src/DefaultBtInteractive.h
* src/PeerInteractionCommand.cc
2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten DHTRegistry Rewritten DHTRegistry

View File

@ -63,6 +63,7 @@
#include "BtMessageDispatcher.h" #include "BtMessageDispatcher.h"
#include "BtMessageFactory.h" #include "BtMessageFactory.h"
#include "BtRequestFactory.h" #include "BtRequestFactory.h"
#include "PeerConnection.h"
#include "Logger.h" #include "Logger.h"
#include "LogFactory.h" #include "LogFactory.h"
#include "StringFormat.h" #include "StringFormat.h"
@ -625,6 +626,12 @@ void DefaultBtInteractive::setBtRequestFactory
_btRequestFactory = factory; _btRequestFactory = factory;
} }
void DefaultBtInteractive::setPeerConnection
(const SharedHandle<PeerConnection>& peerConnection)
{
_peerConnection = peerConnection;
}
void DefaultBtInteractive::setExtensionMessageFactory void DefaultBtInteractive::setExtensionMessageFactory
(const SharedHandle<ExtensionMessageFactory>& factory) (const SharedHandle<ExtensionMessageFactory>& factory)
{ {

View File

@ -54,6 +54,7 @@ class BtMessageReceiver;
class BtMessageDispatcher; class BtMessageDispatcher;
class BtMessageFactory; class BtMessageFactory;
class BtRequestFactory; class BtRequestFactory;
class PeerConnection;
class ExtensionMessageFactory; class ExtensionMessageFactory;
class ExtensionMessageRegistry; class ExtensionMessageRegistry;
class DHTNode; class DHTNode;
@ -112,6 +113,9 @@ private:
SharedHandle<BtMessageReceiver> _btMessageReceiver; SharedHandle<BtMessageReceiver> _btMessageReceiver;
SharedHandle<BtMessageDispatcher> _dispatcher; SharedHandle<BtMessageDispatcher> _dispatcher;
SharedHandle<BtRequestFactory> _btRequestFactory; SharedHandle<BtRequestFactory> _btRequestFactory;
// Although _peerStorage is not used in this class, this object
// holds the reference so that _peerConnection is not deleted.
SharedHandle<PeerConnection> _peerConnection;
SharedHandle<BtMessageFactory> _messageFactory; SharedHandle<BtMessageFactory> _messageFactory;
SharedHandle<ExtensionMessageFactory> _extensionMessageFactory; SharedHandle<ExtensionMessageFactory> _extensionMessageFactory;
SharedHandle<ExtensionMessageRegistry> _extensionMessageRegistry; SharedHandle<ExtensionMessageRegistry> _extensionMessageRegistry;
@ -206,6 +210,8 @@ public:
void setBtRequestFactory(const SharedHandle<BtRequestFactory>& factory); void setBtRequestFactory(const SharedHandle<BtRequestFactory>& factory);
void setPeerConnection(const SharedHandle<PeerConnection>& peerConnection);
void setBtMessageFactory(const SharedHandle<BtMessageFactory>& factory); void setBtMessageFactory(const SharedHandle<BtMessageFactory>& factory);
void setExtensionMessageFactory void setExtensionMessageFactory

View File

@ -182,6 +182,7 @@ PeerInteractionCommand::PeerInteractionCommand
btInteractive->setBtMessageReceiver(receiver); btInteractive->setBtMessageReceiver(receiver);
btInteractive->setDispatcher(dispatcher); btInteractive->setDispatcher(dispatcher);
btInteractive->setBtRequestFactory(reqFactory); btInteractive->setBtRequestFactory(reqFactory);
btInteractive->setPeerConnection(peerConnection);
btInteractive->setExtensionMessageFactory(extensionMessageFactory); btInteractive->setExtensionMessageFactory(extensionMessageFactory);
btInteractive->setExtensionMessageRegistry(exMsgRegistry); btInteractive->setExtensionMessageRegistry(exMsgRegistry);
btInteractive->setKeepAliveInterval btInteractive->setKeepAliveInterval