/***************************************************************************
- * 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 *
#pragma once
+#include "common-export.h"
+
#include <QAbstractSocket>
#include <QDataStream>
#include <QPointer>
#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;
QString clientVersion() const;
void setClientVersion(const QString &clientVersion);
+ bool hasFeature(Quassel::Feature feature) const;
Quassel::Features features() const;
void setFeatures(Quassel::Features features);
};
// 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);