Gnutella::Handshaking::Handshaker Class Reference

#include <Handshaker.h> [code]

Inherits QObject.

Inheritance diagram for Gnutella::Handshaking::Handshaker:

Inheritance graph
[legend]
Collaboration diagram for Gnutella::Handshaking::Handshaker:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 36 of file Handshaker.h.

Signals

void handshakingStarted (Connection *)
void handshakingCompleted (Connection *, NodeInfo)
void handshakingFailed (Connection *, Gnutella::Handshaking::HandshakeError)

Public Member Functions

 Handshaker (LocalPeer *, NodeCache *, SlotAllocator *)
 ~Handshaker ()
void requestConnection (Connection *, const NodeAddress &)
void acceptConnection (Connection *connection)

Private Slots

void connectionEstablished (HandshakeSession *)
void receivedRequest (HandshakeSession *)
void receivedResponse (HandshakeSession *)
void handshakingCompleted (HandshakeSession *)
void handshakingFailed (HandshakeSession *)

Private Member Functions

 Handshaker (const Handshaker &)
Handshakeroperator= (const Handshaker &)
NodeInfo nodeInfo () const
bool hasFreePeerSlots () const
void setVisibleIp (const QHostAddress &ostAddress)
void tryNodes (QStringList nodeAddresses)
QStringList getTryNodes () const
HandshakeSessionnewSession (Connection *, const NodeAddress &)
void deleteSession (HandshakeSession *)
bool hasRequiredFeatures (const NodeInfo &nodeInfo)
bool compatibleNodeTypes (const NodeInfo &otherNodeInfo)
bool hasSlotsFor (const NodeInfo &)
int getRejectReason (HandshakeSession *session)

Private Attributes

HandshakerPrivatep

Friends

class HandshakeSession


Constructor & Destructor Documentation

Gnutella::Handshaking::Handshaker::Handshaker const Handshaker  )  [private]
 

Handshaker::Handshaker LocalPeer ,
NodeCache ,
SlotAllocator
 

Definition at line 57 of file Handshaker.cpp.

Handshaker::~Handshaker  ) 
 

Definition at line 86 of file Handshaker.cpp.


Member Function Documentation

void Handshaker::acceptConnection Connection connection  ) 
 

Definition at line 145 of file Handshaker.cpp.

bool Handshaker::compatibleNodeTypes const NodeInfo otherNodeInfo  )  [private]
 

Todo:
Promotion/demotion should maybe be implemented here:

Definition at line 197 of file Handshaker.cpp.

void Handshaker::connectionEstablished HandshakeSession  )  [private, slot]
 

Definition at line 152 of file Handshaker.cpp.

void Handshaker::deleteSession HandshakeSession  )  [private]
 

Definition at line 119 of file Handshaker.cpp.

int Handshaker::getRejectReason HandshakeSession session  )  [private]
 

Definition at line 213 of file Handshaker.cpp.

QStringList Gnutella::Handshaking::Handshaker::getTryNodes  )  const [private]
 

void Handshaker::handshakingCompleted HandshakeSession  )  [private, slot]
 

Definition at line 159 of file Handshaker.cpp.

void Gnutella::Handshaking::Handshaker::handshakingCompleted Connection ,
NodeInfo 
[signal]
 

void Handshaker::handshakingFailed HandshakeSession  )  [private, slot]
 

Definition at line 168 of file Handshaker.cpp.

void Gnutella::Handshaking::Handshaker::handshakingFailed Connection ,
Gnutella::Handshaking::HandshakeError 
[signal]
 

void Gnutella::Handshaking::Handshaker::handshakingStarted Connection  )  [signal]
 

bool Gnutella::Handshaking::Handshaker::hasFreePeerSlots  )  const [private]
 

bool Handshaker::hasRequiredFeatures const NodeInfo nodeInfo  )  [private]
 

Todo:
To be moved in a class SlotManager

Definition at line 182 of file Handshaker.cpp.

bool Gnutella::Handshaking::Handshaker::hasSlotsFor const NodeInfo  )  [private]
 

HandshakeSession * Handshaker::newSession Connection ,
const NodeAddress
[private]
 

Definition at line 91 of file Handshaker.cpp.

NodeInfo Gnutella::Handshaking::Handshaker::nodeInfo  )  const [private]
 

Handshaker& Gnutella::Handshaking::Handshaker::operator= const Handshaker  )  [private]
 

void Handshaker::receivedRequest HandshakeSession  )  [private, slot]
 

Definition at line 229 of file Handshaker.cpp.

void Handshaker::receivedResponse HandshakeSession  )  [private, slot]
 

Definition at line 240 of file Handshaker.cpp.

void Handshaker::requestConnection Connection ,
const NodeAddress
 

Definition at line 127 of file Handshaker.cpp.

void Handshaker::setVisibleIp const QHostAddress &  ostAddress  )  [private]
 

Definition at line 251 of file Handshaker.cpp.

void Gnutella::Handshaking::Handshaker::tryNodes QStringList  nodeAddresses  )  [private]
 


Friends And Related Function Documentation

friend class HandshakeSession [friend]
 

Definition at line 80 of file Handshaker.h.


Member Data Documentation

HandshakerPrivate* Gnutella::Handshaking::Handshaker::p [private]
 

Definition at line 78 of file Handshaker.h.


The documentation for this class was generated from the following files: