Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
InternalPeer Class Reference

#include </tmp/quassel/src/common/internalpeer.h>

Inheritance diagram for InternalPeer:
Collaboration diagram for InternalPeer:

Public Types

enum  EventType { SyncMessageEvent = QEvent::User, RpcCallEvent, InitRequestEvent, InitDataEvent }

Public Slots

void close (const QString &reason=QString())

Signals

void disconnected ()
void secureStateChanged (bool secure=true)
void lagUpdated (int msecs)

Public Member Functions

 InternalPeer (QObject *parent=0)
virtual ~InternalPeer ()
Protocol::Type protocol () const
QString description () const
SignalProxysignalProxy () const
void setSignalProxy (SignalProxy *proxy)
InternalPeerpeer () const
void setPeer (InternalPeer *peer)
bool isOpen () const
bool isSecure () const
bool isLocal () const
int lag () const
void dispatch (const Protocol::SyncMessage &msg)
void dispatch (const Protocol::RpcCall &msg)
void dispatch (const Protocol::InitRequest &msg)
void dispatch (const Protocol::InitData &msg)
void dispatch (const Protocol::RegisterClient &)
void dispatch (const Protocol::ClientDenied &)
void dispatch (const Protocol::ClientRegistered &)
void dispatch (const Protocol::SetupData &)
void dispatch (const Protocol::SetupFailed &)
void dispatch (const Protocol::SetupDone &)
void dispatch (const Protocol::Login &)
void dispatch (const Protocol::LoginFailed &)
void dispatch (const Protocol::LoginSuccess &)
void dispatch (const Protocol::SessionState &)
AuthHandlerauthHandler () const

Protected Member Functions

void customEvent (QEvent *event)
template<typename T >
void handle (const T &protoMessage)

Private Slots

void peerDisconnected ()

Private Member Functions

template<class T >
void dispatch (EventType eventType, const T &msg)

Private Attributes

SignalProxy_proxy
InternalPeer_peer
bool _isOpen

Detailed Description

Definition at line 30 of file internalpeer.h.

Member Enumeration Documentation

enum EventType
Enumerator:
SyncMessageEvent 
RpcCallEvent 
InitRequestEvent 
InitDataEvent 

Definition at line 35 of file internalpeer.h.

Constructor & Destructor Documentation

InternalPeer ( QObject *  parent = 0)

Definition at line 39 of file internalpeer.cpp.

~InternalPeer ( )
virtual

Definition at line 49 of file internalpeer.cpp.

References _isOpen, and Peer::disconnected().

Member Function Documentation

Protocol::Type protocol ( ) const
inlinevirtual

Implements Peer.

Definition at line 45 of file internalpeer.h.

References Protocol::InternalProtocol.

QString description ( ) const
virtual

Implements Peer.

Definition at line 56 of file internalpeer.cpp.

SignalProxy * signalProxy ( ) const
virtual

Implements Peer.

Definition at line 94 of file internalpeer.cpp.

References _proxy.

void setSignalProxy ( SignalProxy proxy)
virtual

Implements Peer.

Definition at line 100 of file internalpeer.cpp.

References _isOpen, _proxy, and Peer::disconnected().

InternalPeer* peer ( ) const

Referenced by setPeer().

void setPeer ( InternalPeer peer)

Definition at line 120 of file internalpeer.cpp.

References _peer, Peer::disconnected(), peer(), and peerDisconnected().

Referenced by Core::setupInternalClientSession().

bool isOpen ( ) const
virtual

Implements Peer.

Definition at line 62 of file internalpeer.cpp.

bool isSecure ( ) const
virtual

Implements Peer.

Definition at line 68 of file internalpeer.cpp.

bool isLocal ( ) const
virtual

Implements Peer.

Definition at line 74 of file internalpeer.cpp.

int lag ( ) const
virtual

Implements Peer.

Definition at line 88 of file internalpeer.cpp.

void dispatch ( const Protocol::SyncMessage msg)
virtual

Implements Peer.

Definition at line 142 of file internalpeer.cpp.

References SyncMessageEvent.

Referenced by dispatch().

void dispatch ( const Protocol::RpcCall msg)
virtual

Implements Peer.

Definition at line 148 of file internalpeer.cpp.

References dispatch(), and RpcCallEvent.

void dispatch ( const Protocol::InitRequest msg)
virtual

Implements Peer.

Definition at line 154 of file internalpeer.cpp.

References dispatch(), and InitRequestEvent.

void dispatch ( const Protocol::InitData msg)
virtual

Implements Peer.

Definition at line 160 of file internalpeer.cpp.

References dispatch(), and InitDataEvent.

void dispatch ( const Protocol::RegisterClient )
inlinevirtual

Implements Peer.

Definition at line 66 of file internalpeer.h.

void dispatch ( const Protocol::ClientDenied )
inlinevirtual

Implements Peer.

Definition at line 67 of file internalpeer.h.

void dispatch ( const Protocol::ClientRegistered )
inlinevirtual

Implements Peer.

Definition at line 68 of file internalpeer.h.

void dispatch ( const Protocol::SetupData )
inlinevirtual

Implements Peer.

Definition at line 69 of file internalpeer.h.

void dispatch ( const Protocol::SetupFailed )
inlinevirtual

Implements Peer.

Definition at line 70 of file internalpeer.h.

void dispatch ( const Protocol::SetupDone )
inlinevirtual

Implements Peer.

Definition at line 71 of file internalpeer.h.

void dispatch ( const Protocol::Login )
inlinevirtual

Implements Peer.

Definition at line 72 of file internalpeer.h.

void dispatch ( const Protocol::LoginFailed )
inlinevirtual

Implements Peer.

Definition at line 73 of file internalpeer.h.

void dispatch ( const Protocol::LoginSuccess )
inlinevirtual

Implements Peer.

Definition at line 74 of file internalpeer.h.

void dispatch ( const Protocol::SessionState )
inlinevirtual

Implements Peer.

Definition at line 75 of file internalpeer.h.

void close ( const QString &  reason = QString())
slot

Definition at line 80 of file internalpeer.cpp.

void customEvent ( QEvent *  event)
protected
void peerDisconnected ( )
privateslot

Definition at line 131 of file internalpeer.cpp.

References _isOpen, _peer, and Peer::disconnected().

Referenced by setPeer().

void dispatch ( EventType  eventType,
const T &  msg 
)
private

Definition at line 167 of file internalpeer.cpp.

References _peer, and Peer::handle().

AuthHandler * authHandler ( ) const
inherited

Definition at line 31 of file peer.cpp.

References Peer::_authHandler.

void disconnected ( )
signalinherited
void secureStateChanged ( bool  secure = true)
signalinherited

Referenced by RemotePeer::RemotePeer().

void lagUpdated ( int  msecs)
signalinherited
void handle ( const T &  protoMessage)
inlineprotectedinherited

Definition at line 97 of file peer.h.

References Protocol::AuthHandler, and Protocol::SignalProxy.

Referenced by customEvent(), and dispatch().

Member Data Documentation

SignalProxy* _proxy
private

Definition at line 91 of file internalpeer.h.

Referenced by setSignalProxy(), and signalProxy().

InternalPeer* _peer
private

Definition at line 92 of file internalpeer.h.

Referenced by dispatch(), peerDisconnected(), and setPeer().

bool _isOpen
private

Definition at line 93 of file internalpeer.h.

Referenced by peerDisconnected(), setSignalProxy(), and ~InternalPeer().


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