QXmpp  Version: 1.4.0
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 
31 class QDomElement;
32 
33 class QXmppServer;
34 class QXmppServerExtensionPrivate;
35 class QXmppStream;
36 
46 
47 class QXMPP_EXPORT QXmppServerExtension : public QXmppLoggable
48 {
49  Q_OBJECT
50 
51 public:
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 
66 protected:
67  QXmppServer *server() const;
68 
69 private:
70  void setServer(QXmppServer *server);
71  QXmppServerExtensionPrivate *const d;
72 
73  friend class QXmppServer;
74 };
75 
76 #endif
QXmppStream
The QXmppStream class is the base class for all XMPP streams.
Definition: QXmppStream.h:41
QXmppServer
The QXmppServer class represents an XMPP server.
Definition: QXmppServer.h:59
QXmppLoggable
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:123
QXmppServerExtension
The QXmppServerExtension class is the base class for QXmppServer extensions.
Definition: QXmppServerExtension.h:47