X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fauthhandler.h;h=0d30e6624f42faf0a74b20a765debbb5add88ef1;hp=cfed51e461ddf9bb99b4a4cec7ffe2b4aadd503d;hb=ed5b2ff32158ae72c011eb1228f373cec05cbfeb;hpb=e55d141896130c9b82bfae60e23078b8b765d85e diff --git a/src/common/authhandler.h b/src/common/authhandler.h index cfed51e4..0d30e662 100644 --- a/src/common/authhandler.h +++ b/src/common/authhandler.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 * @@ -18,8 +18,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef AUTHHANDLER_H -#define AUTHHANDLER_H +#pragma once + +#include "common-export.h" #include @@ -27,15 +28,17 @@ class Peer; -class AuthHandler : public QObject +class COMMON_EXPORT AuthHandler : public QObject { Q_OBJECT public: - AuthHandler(QObject *parent = 0); + AuthHandler(QObject *parent = nullptr); QTcpSocket *socket() const; + bool isLocal() const; + virtual void handle(const Protocol::RegisterClient &) { invalidMessage(); } virtual void handle(const Protocol::ClientDenied &) { invalidMessage(); } virtual void handle(const Protocol::ClientRegistered &) { invalidMessage(); } @@ -68,8 +71,6 @@ protected slots: private: void invalidMessage(); - QTcpSocket *_socket; // FIXME: should be a QSharedPointer? -> premature disconnect before the peer has taken over - bool _disconnectedSent; + QTcpSocket *_socket{nullptr}; // FIXME: should be a QSharedPointer? -> premature disconnect before the peer has taken over + bool _disconnectedSent{false}; }; - -#endif