X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreauthhandler.h;h=1b4e6b916c1d79859aefb3a97007fa5ce37a95e6;hb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;hp=85580c93289fcde61a06f3362b1ae8ce47825e1e;hpb=64cf9f9b8a737dad5f29447805d4004cfd03c454;p=quassel.git diff --git a/src/core/coreauthhandler.h b/src/core/coreauthhandler.h index 85580c93..1b4e6b91 100644 --- a/src/core/coreauthhandler.h +++ b/src/core/coreauthhandler.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 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); @@ -42,21 +43,29 @@ private: void handle(const Protocol::SetupData &msg); void handle(const Protocol::Login &msg); + 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