X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fpeer.h;h=803f15b52c2b814ebb2507d49bf1d0d1f5db0d76;hb=c194ed5fb3d15e14b9364f9796d3521910dc72fe;hp=fbc17914889f244b7ab56bd842f48a51e2bccc02;hpb=f353beded3963b67da6ac0878700dee8e61abfc4;p=quassel.git diff --git a/src/common/peer.h b/src/common/peer.h index fbc17914..803f15b5 100644 --- a/src/common/peer.h +++ b/src/common/peer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 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 * @@ -20,6 +20,8 @@ #pragma once +#include "common-export.h" + #include #include #include @@ -29,12 +31,12 @@ #include "quassel.h" #include "signalproxy.h" -class Peer : public QObject +class COMMON_EXPORT Peer : public QObject { Q_OBJECT public: - explicit Peer(AuthHandler *authHandler, QObject *parent = 0); + explicit Peer(AuthHandler *authHandler, QObject *parent = nullptr); virtual Protocol::Type protocol() const = 0; virtual QString description() const = 0; @@ -51,6 +53,7 @@ public: QString clientVersion() const; void setClientVersion(const QString &clientVersion); + bool hasFeature(Quassel::Feature feature) const; Quassel::Features features() const; void setFeatures(Quassel::Features features); @@ -111,7 +114,7 @@ private: }; // We need to special-case Peer* in attached signals/slots, so typedef it for the meta type system -typedef Peer * PeerPtr; +using PeerPtr = Peer *; Q_DECLARE_METATYPE(PeerPtr) QDataStream &operator<<(QDataStream &out, PeerPtr ptr);