QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppServerExtension.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Author:
5 * Jeremy Lainé
6 *
7 * Source:
8 * https://github.com/qxmpp-project/qxmpp
9 *
10 * This file is a part of QXmpp library.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 */
23
24#ifndef QXMPPSERVEREXTENSION_H
25#define QXMPPSERVEREXTENSION_H
26
27#include "QXmppLogger.h"
28
29#include <QVariant>
30
31class QDomElement;
32
33class QXmppServer;
34class QXmppServerExtensionPrivate;
35class QXmppStream;
36
46
47class QXMPP_EXPORT QXmppServerExtension : public QXmppLoggable
48{
49 Q_OBJECT
50
51public:
53 ~QXmppServerExtension() override;
54 virtual QString extensionName() const;
55 virtual int extensionPriority() const;
56
57 virtual QStringList discoveryFeatures() const;
58 virtual QStringList discoveryItems() const;
59 virtual bool handleStanza(const QDomElement &stanza);
60 virtual QSet<QString> presenceSubscribers(const QString &jid);
61 virtual QSet<QString> presenceSubscriptions(const QString &jid);
62
63 virtual bool start();
64 virtual void stop();
65
66protected:
67 QXmppServer *server() const;
68
69private:
70 void setServer(QXmppServer *server);
71 QXmppServerExtensionPrivate *const d;
72
73 friend class QXmppServer;
74};
75
76#endif
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:124
The QXmppServerExtension class is the base class for QXmppServer extensions.
Definition: QXmppServerExtension.h:48
The QXmppServer class represents an XMPP server.
Definition: QXmppServer.h:60
The QXmppStream class is the base class for all XMPP streams.
Definition: QXmppStream.h:42