X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fpeer.h;h=6b824cfd2a2c57f02d4c5f4ea4d9ffc4468d4879;hb=28cee4568aeb1ce3014d11234e40f19e7aeae5bd;hp=79204b4f9996a33b2e4cf312ef1eed2f7e1c3caf;hpb=465e723c31d36f28eff7665ca2a8e0fb34427c29;p=quassel.git diff --git a/src/common/peer.h b/src/common/peer.h index 79204b4f..6b824cfd 100644 --- a/src/common/peer.h +++ b/src/common/peer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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; @@ -50,6 +62,9 @@ public: virtual int lag() const = 0; + virtual QString address() const = 0; + virtual quint16 port() const = 0; + public slots: /* Handshake messages */ virtual void dispatch(const Protocol::RegisterClient &) = 0; @@ -82,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