QXmpp Version: 0.9.3
QXmppServerExtension.h
1/*
2 * Copyright (C) 2008-2014 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 <QVariant>
28
29#include "QXmppLogger.h"
30
31class QDomElement;
32class QStringList;
33
34class QXmppServer;
35class QXmppServerExtensionPrivate;
36class QXmppStream;
37
47
48class QXMPP_EXPORT QXmppServerExtension : public QXmppLoggable
49{
50 Q_OBJECT
51
52public:
55 virtual QString extensionName() const;
56 virtual int extensionPriority() const;
57
58 virtual QStringList discoveryFeatures() const;
59 virtual QStringList discoveryItems() const;
60 virtual bool handleStanza(const QDomElement &stanza);
61 virtual QSet<QString> presenceSubscribers(const QString &jid);
62 virtual QSet<QString> presenceSubscriptions(const QString &jid);
63
64 virtual bool start();
65 virtual void stop();
66
67protected:
68 QXmppServer *server() const;
69
70private:
71 void setServer(QXmppServer *server);
72 QXmppServerExtensionPrivate * const d;
73
74 friend class QXmppServer;
75};
76
77#endif
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:112
The QXmppServerExtension class is the base class for QXmppServer extensions.
Definition: QXmppServerExtension.h:49
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