X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreauthhandler.h;h=db54bec19ae6927f7b0445dc2e237f870d5163b7;hb=00b029d3947bc751893d735a495b03ea8796e139;hp=a16ca1def52638eede111936f27ffe793f95f47e;hpb=b65b9f7615165e8700a44d59b7275a55558dd45b;p=quassel.git diff --git a/src/core/coreauthhandler.h b/src/core/coreauthhandler.h index a16ca1de..db54bec1 100644 --- a/src/core/coreauthhandler.h +++ b/src/core/coreauthhandler.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -22,7 +22,9 @@ #define COREAUTHHANDLER_H #include "authhandler.h" +#include "metricsserver.h" #include "peerfactory.h" +#include "proxyline.h" #include "remotepeer.h" #include "types.h" @@ -31,19 +33,22 @@ class CoreAuthHandler : public AuthHandler Q_OBJECT public: - CoreAuthHandler(QTcpSocket *socket, QObject *parent = 0); + CoreAuthHandler(QTcpSocket* socket, QObject* parent = nullptr); + + QHostAddress hostAddress() const; + bool isLocal() const override; 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 setPeer(RemotePeer* peer); void startSsl(); bool checkClientRegistered(); @@ -59,8 +64,12 @@ private slots: void onProtocolVersionMismatch(int actual, int expected); private: - RemotePeer *_peer; + RemotePeer* _peer; + MetricsServer* _metricsServer; + bool _proxyReceived; + ProxyLine _proxyLine; + bool _useProxyLine; bool _magicReceived; bool _legacy; bool _clientRegistered;