QXmpp  Version:1.0.0
QXmppServerExtension.h
1 /*
2  * Copyright (C) 2008-2019 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 
31 class QDomElement;
32 class QStringList;
33 
34 class QXmppServer;
35 class QXmppServerExtensionPrivate;
36 class QXmppStream;
37 
47 
48 class QXMPP_EXPORT QXmppServerExtension : public QXmppLoggable
49 {
50  Q_OBJECT
51 
52 public:
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 
67 protected:
68  QXmppServer *server() const;
69 
70 private:
71  void setServer(QXmppServer *server);
72  QXmppServerExtensionPrivate * const d;
73 
74  friend class QXmppServer;
75 };
76 
77 #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:111
QXmppServerExtension
The QXmppServerExtension class is the base class for QXmppServer extensions.
Definition: QXmppServerExtension.h:48