X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreauthhandler.h;h=e26e94c0eb1c0b657de3f71f3d1f8af73ace6440;hp=3f7ddf3c5195a3891cb58f4ec78a1e93d1a0aea9;hb=c194ed5fb3d15e14b9364f9796d3521910dc72fe;hpb=9d54503555534a2c554f09a33df6afa33d6308ec diff --git a/src/core/coreauthhandler.h b/src/core/coreauthhandler.h index 3f7ddf3c..e26e94c0 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,7 +31,7 @@ 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); @@ -38,25 +39,33 @@ signals: 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; + bool _magicReceived; + bool _legacy; bool _clientRegistered; + quint8 _connectionFeatures; + QVector _supportedProtos; }; #endif