X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fpeer.h;h=6b824cfd2a2c57f02d4c5f4ea4d9ffc4468d4879;hb=28cee4568aeb1ce3014d11234e40f19e7aeae5bd;hp=32ee0b5f5eb1edcfa7842e344c3374401b8be070;hpb=44428e76a8b2ad9617bef927edd01dd3a1a5caaf;p=quassel.git diff --git a/src/common/peer.h b/src/common/peer.h index 32ee0b5f..6b824cfd 100644 --- a/src/common/peer.h +++ b/src/common/peer.h @@ -34,7 +34,7 @@ class Peer : public QObject Q_OBJECT public: - Peer(AuthHandler *authHandler, QObject *parent = 0); + explicit Peer(AuthHandler *authHandler, QObject *parent = 0); virtual Protocol::Type protocol() const = 0; virtual QString description() const = 0; @@ -42,6 +42,18 @@ public: virtual SignalProxy *signalProxy() const = 0; virtual void setSignalProxy(SignalProxy *proxy) = 0; + const QDateTime &connectedSince() const; + void setConnectedSince(const QDateTime &connectedSince); + + const QString &buildDate() const; + void setBuildDate(const QString &buildDate); + + const QString &clientVersion() const; + void setClientVersion(const QString &clientVersion); + + int id() const; + void setId(int id); + AuthHandler *authHandler() const; virtual bool isOpen() const = 0; @@ -53,12 +65,6 @@ public: virtual QString address() const = 0; virtual quint16 port() const = 0; - int _id = -1; - - QDateTime _connectedSince; - QString _buildDate; - QString _clientVersion; - public slots: /* Handshake messages */ virtual void dispatch(const Protocol::RegisterClient &) = 0; @@ -91,6 +97,13 @@ protected: private: QPointer _authHandler; + + QDateTime _connectedSince; + + QString _buildDate; + QString _clientVersion; + + int _id = -1; }; // We need to special-case Peer* in attached signals/slots, so typedef it for the meta type system