X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreauthhandler.h;h=9a420af6d5a8e4da544819ba8a05a93bedf7042a;hb=db00831bca59a012242d1ad5fac52a20c6cd2956;hp=3f7ddf3c5195a3891cb58f4ec78a1e93d1a0aea9;hpb=9d54503555534a2c554f09a33df6afa33d6308ec;p=quassel.git diff --git a/src/core/coreauthhandler.h b/src/core/coreauthhandler.h index 3f7ddf3c..9a420af6 100644 --- a/src/core/coreauthhandler.h +++ b/src/core/coreauthhandler.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -22,6 +22,7 @@ #define COREAUTHHANDLER_H #include "authhandler.h" +#include "peerfactory.h" #include "remotepeer.h" #include "types.h" @@ -30,33 +31,41 @@ class CoreAuthHandler : public AuthHandler Q_OBJECT public: - CoreAuthHandler(QTcpSocket *socket, QObject *parent = 0); + CoreAuthHandler(QTcpSocket* socket, QObject* parent = nullptr); signals: - void handshakeComplete(RemotePeer *peer, UserId uid); + void handshakeComplete(RemotePeer* peer, UserId uid); private: using AuthHandler::handle; - void handle(const Protocol::RegisterClient &msg); - void handle(const Protocol::SetupData &msg); - void handle(const Protocol::Login &msg); + void handle(const Protocol::RegisterClient& msg) override; + void handle(const Protocol::SetupData& msg) override; + void handle(const Protocol::Login& msg) override; + + void setPeer(RemotePeer* peer); + void startSsl(); bool checkClientRegistered(); private slots: - void startSsl(); + void onReadyRead(); + #ifdef HAVE_SSL void onSslErrors(); #endif - // only in compat mode + // only in legacy mode void onProtocolVersionMismatch(int actual, int expected); private: - RemotePeer *_peer; + RemotePeer* _peer; + bool _magicReceived; + bool _legacy; bool _clientRegistered; + quint8 _connectionFeatures; + QVector _supportedProtos; }; #endif