QXmpp Version: 1.10.0
QXmppServerExtension.h
1// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPSERVEREXTENSION_H
6#define QXMPPSERVEREXTENSION_H
7
8#include "QXmppLogger.h"
9
10#include <QVariant>
11
12class QDomElement;
13
14class QXmppServer;
15class QXmppServerExtensionPrivate;
16
28class QXMPP_EXPORT QXmppServerExtension : public QXmppLoggable
29{
30 Q_OBJECT
31
32public:
34 ~QXmppServerExtension() override;
35 virtual QString extensionName() const;
36 virtual int extensionPriority() const;
37
38 virtual QStringList discoveryFeatures() const;
39 virtual QStringList discoveryItems() const;
40 virtual bool handleStanza(const QDomElement &stanza);
41 virtual QSet<QString> presenceSubscribers(const QString &jid);
42 virtual QSet<QString> presenceSubscriptions(const QString &jid);
43
44 virtual bool start();
45 virtual void stop();
46
47protected:
48 QXmppServer *server() const;
49
50private:
51 void setServer(QXmppServer *server);
52 const std::unique_ptr<QXmppServerExtensionPrivate> d;
53
54 friend class QXmppServer;
55};
56
57#endif
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:110
The QXmppServerExtension class is the base class for QXmppServer extensions.
Definition: QXmppServerExtension.h:29
The QXmppServer class represents an XMPP server.
Definition: QXmppServer.h:41