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

#include </tmp/quassel/src/core/coreauthhandler.h>

Inheritance diagram for CoreAuthHandler:
Collaboration diagram for CoreAuthHandler:

Public Slots

void close ()

Signals

void handshakeComplete (RemotePeer *peer, UserId uid)
void disconnected ()
void socketError (QAbstractSocket::SocketError error, const QString &errorString)

Public Member Functions

 CoreAuthHandler (QTcpSocket *socket, QObject *parent=0)
QTcpSocket * socket () const
bool isLocal () const
virtual void handle (const Protocol::ClientDenied &)
virtual void handle (const Protocol::ClientRegistered &)
virtual void handle (const Protocol::SetupFailed &)
virtual void handle (const Protocol::SetupDone &)
virtual void handle (const Protocol::LoginFailed &)
virtual void handle (const Protocol::LoginSuccess &)
virtual void handle (const Protocol::SessionState &)
template<class T >
void handle (const T &)

Protected Slots

virtual void onSocketError (QAbstractSocket::SocketError error)
virtual void onSocketDisconnected ()

Protected Member Functions

void setSocket (QTcpSocket *socket)

Private Slots

void onReadyRead ()
void onProtocolVersionMismatch (int actual, int expected)

Private Member Functions

void handle (const Protocol::RegisterClient &msg)
void handle (const Protocol::SetupData &msg)
void handle (const Protocol::Login &msg)
void setPeer (RemotePeer *peer)
void startSsl ()
bool checkClientRegistered ()

Private Attributes

RemotePeer_peer
bool _magicReceived
bool _legacy
bool _clientRegistered
quint8 _connectionFeatures
QVector
< PeerFactory::ProtoDescriptor
_supportedProtos

Detailed Description

Definition at line 29 of file coreauthhandler.h.

Constructor & Destructor Documentation

CoreAuthHandler ( QTcpSocket *  socket,
QObject *  parent = 0 
)

Definition at line 32 of file coreauthhandler.cpp.

References onReadyRead(), and AuthHandler::setSocket().

Member Function Documentation

void handshakeComplete ( RemotePeer peer,
UserId  uid 
)
signal

Referenced by handle().

void setPeer ( RemotePeer peer)
private

Definition at line 121 of file coreauthhandler.cpp.

References _peer, onReadyRead(), RemotePeer::protocolName(), and AuthHandler::socket().

Referenced by onReadyRead().

void startSsl ( )
private

Definition at line 230 of file coreauthhandler.cpp.

References _peer, RemotePeer::description(), and AuthHandler::socket().

Referenced by handle(), and onReadyRead().

bool checkClientRegistered ( )
private
void onProtocolVersionMismatch ( int  actual,
int  expected 
)
privateslot
bool isLocal ( ) const
inherited

Definition at line 48 of file authhandler.cpp.

References AuthHandler::socket().

virtual void handle ( const Protocol::ClientDenied )
inlinevirtualinherited

Definition at line 42 of file authhandler.h.

References AuthHandler::invalidMessage().

virtual void handle ( const Protocol::ClientRegistered )
inlinevirtualinherited

Definition at line 43 of file authhandler.h.

References AuthHandler::invalidMessage().

virtual void handle ( const Protocol::SetupFailed )
inlinevirtualinherited

Definition at line 45 of file authhandler.h.

References AuthHandler::invalidMessage().

virtual void handle ( const Protocol::SetupDone )
inlinevirtualinherited

Definition at line 46 of file authhandler.h.

References AuthHandler::invalidMessage().

virtual void handle ( const Protocol::LoginFailed )
inlinevirtualinherited

Definition at line 48 of file authhandler.h.

References AuthHandler::invalidMessage().

virtual void handle ( const Protocol::LoginSuccess )
inlinevirtualinherited

Definition at line 49 of file authhandler.h.

References AuthHandler::invalidMessage().

virtual void handle ( const Protocol::SessionState )
inlinevirtualinherited

Definition at line 50 of file authhandler.h.

References AuthHandler::invalidMessage().

void handle ( const T &  )
inlineinherited

Definition at line 54 of file authhandler.h.

References AuthHandler::invalidMessage().

void close ( )
slotinherited

Definition at line 88 of file authhandler.cpp.

References AuthHandler::_socket.

void disconnected ( )
signalinherited
void socketError ( QAbstractSocket::SocketError  error,
const QString &  errorString 
)
signalinherited
void setSocket ( QTcpSocket *  socket)
protectedinherited
void onSocketError ( QAbstractSocket::SocketError  error)
protectedvirtualslotinherited
void onSocketDisconnected ( )
protectedvirtualslotinherited

Definition at line 73 of file authhandler.cpp.

References AuthHandler::_disconnectedSent, and AuthHandler::disconnected().

Referenced by AuthHandler::setSocket().

Member Data Documentation

bool _magicReceived
private

Definition at line 64 of file coreauthhandler.h.

Referenced by onReadyRead().

bool _legacy
private

Definition at line 65 of file coreauthhandler.h.

Referenced by handle(), and onReadyRead().

bool _clientRegistered
private

Definition at line 66 of file coreauthhandler.h.

Referenced by checkClientRegistered(), and handle().

quint8 _connectionFeatures
private

Definition at line 67 of file coreauthhandler.h.

Referenced by handle(), and onReadyRead().

QVector<PeerFactory::ProtoDescriptor> _supportedProtos
private

Definition at line 68 of file coreauthhandler.h.

Referenced by onReadyRead().


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