X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fauthhandler.h;h=a14b7e4c26c55ef08ea25acedfa85f20ed97e571;hb=4ee99e398eab6e96cfc3750a32fcf6c0b87e1f6f;hp=c2ac3ffe597f3af69a2e61e2f85d6c2f27c6bed8;hpb=a95ad2de573027f9bee36db972bcae4195168d0c;p=quassel.git diff --git a/src/common/authhandler.h b/src/common/authhandler.h index c2ac3ffe..a14b7e4c 100644 --- a/src/common/authhandler.h +++ b/src/common/authhandler.h @@ -22,7 +22,7 @@ #include "common-export.h" -#include +#include #include "protocol.h" @@ -35,9 +35,9 @@ class COMMON_EXPORT AuthHandler : public QObject public: AuthHandler(QObject* parent = nullptr); - QTcpSocket* socket() const; + QSslSocket* socket() const; - bool isLocal() const; + virtual bool isLocal() const; virtual void handle(const Protocol::RegisterClient&) { invalidMessage(); } virtual void handle(const Protocol::ClientDenied&) { invalidMessage(); } @@ -65,7 +65,7 @@ signals: void socketError(QAbstractSocket::SocketError error, const QString& errorString); protected: - void setSocket(QTcpSocket* socket); + void setSocket(QSslSocket* socket); protected slots: virtual void onSocketError(QAbstractSocket::SocketError error); @@ -74,6 +74,6 @@ protected slots: private: void invalidMessage(); - QTcpSocket* _socket{nullptr}; // FIXME: should be a QSharedPointer? -> premature disconnect before the peer has taken over + QSslSocket* _socket{nullptr}; // FIXME: should be a QSharedPointer? -> premature disconnect before the peer has taken over bool _disconnectedSent{false}; };