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

#include </tmp/quassel/src/client/clientauthhandler.h>

Inheritance diagram for ClientAuthHandler:
Collaboration diagram for ClientAuthHandler:

Public Slots

void connectToCore ()
void login (const QString &previousError=QString())
void login (const QString &user, const QString &password, bool remember)
void setupCore (const Protocol::SetupData &setupData)
void close ()

Signals

void statusMessage (const QString &message)
void errorMessage (const QString &message)
void errorPopup (const QString &message)
void transferProgress (int current, int max)
void requestDisconnect (const QString &errorString=QString(), bool wantReconnect=false)
void connectionReady ()
void loginSuccessful (const CoreAccount &account)
void handshakeComplete (RemotePeer *peer, const Protocol::SessionState &sessionState)
void userAuthenticationRequired (CoreAccount *account, bool *valid, const QString &errorMessage=QString())
void handleNoSslInClient (bool *accepted)
void handleNoSslInCore (bool *accepted)
void encrypted (bool isEncrypted=true)
void startCoreSetup (const QVariantList &backendInfo)
void coreSetupSuccessful ()
void coreSetupFailed (const QString &error)
void disconnected ()
void socketError (QAbstractSocket::SocketError error, const QString &errorString)

Public Member Functions

 ClientAuthHandler (CoreAccount account, QObject *parent=0)
QTcpSocket * socket () const
bool isLocal () const
virtual void handle (const Protocol::RegisterClient &)
virtual void handle (const Protocol::SetupData &)
virtual void handle (const Protocol::Login &)
template<class T >
void handle (const T &)

Protected Member Functions

void setSocket (QTcpSocket *socket)

Private Slots

void onSocketConnected ()
void onSocketStateChanged (QAbstractSocket::SocketState state)
void onSocketError (QAbstractSocket::SocketError)
void onSocketDisconnected ()
void onReadyRead ()
void onProtocolVersionMismatch (int actual, int expected)
void onConnectionReady ()

Private Member Functions

void handle (const Protocol::ClientDenied &msg)
void handle (const Protocol::ClientRegistered &msg)
void handle (const Protocol::SetupFailed &msg)
void handle (const Protocol::SetupDone &msg)
void handle (const Protocol::LoginFailed &msg)
void handle (const Protocol::LoginSuccess &msg)
void handle (const Protocol::SessionState &msg)
void setPeer (RemotePeer *peer)
void checkAndEnableSsl (bool coreSupportsSsl)
void startRegistration ()

Private Attributes

RemotePeer_peer
bool _coreConfigured
QVariantList _backendInfo
CoreAccount _account
bool _probing
bool _legacy
quint8 _connectionFeatures

Detailed Description

Definition at line 32 of file clientauthhandler.h.

Constructor & Destructor Documentation

ClientAuthHandler ( CoreAccount  account,
QObject *  parent = 0 
)

Definition at line 39 of file clientauthhandler.cpp.

Member Function Documentation

void login ( const QString &  previousError = QString())
slot
void login ( const QString &  user,
const QString &  password,
bool  remember 
)
slot
void setupCore ( const Protocol::SetupData setupData)
slot

Definition at line 327 of file clientauthhandler.cpp.

References _peer, and RemotePeer::dispatch().

void statusMessage ( const QString &  message)
signal
void errorMessage ( const QString &  message)
signal

Referenced by connectToCore().

void errorPopup ( const QString &  message)
signal
void transferProgress ( int  current,
int  max 
)
signal

Referenced by setPeer().

void requestDisconnect ( const QString &  errorString = QString(),
bool  wantReconnect = false 
)
signal
void connectionReady ( )
signal

Referenced by onConnectionReady().

void loginSuccessful ( const CoreAccount account)
signal

Referenced by handle().

void handshakeComplete ( RemotePeer peer,
const Protocol::SessionState sessionState 
)
signal

Referenced by handle().

void userAuthenticationRequired ( CoreAccount account,
bool *  valid,
const QString &  errorMessage = QString() 
)
signal

Referenced by login().

void handleNoSslInClient ( bool *  accepted)
signal

Referenced by connectToCore().

void handleNoSslInCore ( bool *  accepted)
signal

Referenced by checkAndEnableSsl().

void encrypted ( bool  isEncrypted = true)
signal

Referenced by checkAndEnableSsl().

void startCoreSetup ( const QVariantList &  backendInfo)
signal

Referenced by onConnectionReady().

void coreSetupSuccessful ( )
signal

Referenced by handle().

void coreSetupFailed ( const QString &  error)
signal

Referenced by handle().

void handle ( const Protocol::ClientDenied msg)
private
void handle ( const Protocol::SetupFailed msg)
private

Definition at line 333 of file clientauthhandler.cpp.

References coreSetupFailed(), and SetupFailed::errorString.

void handle ( const Protocol::SetupDone msg)
private

Definition at line 339 of file clientauthhandler.cpp.

References coreSetupSuccessful().

void handle ( const Protocol::LoginFailed msg)
private

Definition at line 372 of file clientauthhandler.cpp.

References LoginFailed::errorString, and login().

void handle ( const Protocol::LoginSuccess msg)
private

Definition at line 378 of file clientauthhandler.cpp.

References _account, and loginSuccessful().

void handle ( const Protocol::SessionState msg)
private

Definition at line 386 of file clientauthhandler.cpp.

References _peer, handshakeComplete(), and AuthHandler::socket().

void startRegistration ( )
private
void onSocketStateChanged ( QAbstractSocket::SocketState  state)
privateslot
void onSocketError ( QAbstractSocket::SocketError  error)
privateslot

Definition at line 131 of file clientauthhandler.cpp.

References _legacy, and _probing.

void onSocketDisconnected ( )
privateslot
void onProtocolVersionMismatch ( int  actual,
int  expected 
)
privateslot

Definition at line 253 of file clientauthhandler.cpp.

References errorPopup(), and requestDisconnect().

Referenced by onReadyRead(), and onSocketConnected().

void onConnectionReady ( )
privateslot
bool isLocal ( ) const
inherited

Definition at line 48 of file authhandler.cpp.

References AuthHandler::socket().

virtual void handle ( const Protocol::RegisterClient )
inlinevirtualinherited

Definition at line 41 of file authhandler.h.

References AuthHandler::invalidMessage().

virtual void handle ( const Protocol::SetupData )
inlinevirtualinherited

Definition at line 44 of file authhandler.h.

References AuthHandler::invalidMessage().

virtual void handle ( const Protocol::Login )
inlinevirtualinherited

Definition at line 47 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

Member Data Documentation

RemotePeer* _peer
private
bool _coreConfigured
private

Definition at line 104 of file clientauthhandler.h.

Referenced by handle(), and onConnectionReady().

QVariantList _backendInfo
private

Definition at line 105 of file clientauthhandler.h.

Referenced by handle(), and onConnectionReady().

bool _probing
private
quint8 _connectionFeatures
private

Definition at line 109 of file clientauthhandler.h.

Referenced by onReadyRead(), and setPeer().


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