QXmpp  Version:1.0.0
QXmppDiscoveryManager.h
1 /*
2  * Copyright (C) 2008-2019 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
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 QXMPPDISCOVERYMANAGER_H
25 #define QXMPPDISCOVERYMANAGER_H
26 
27 #include "QXmppClientExtension.h"
28 
29 class QXmppDataForm;
30 class QXmppDiscoveryIq;
31 class QXmppDiscoveryManagerPrivate;
32 
37 
38 class QXMPP_EXPORT QXmppDiscoveryManager : public QXmppClientExtension
39 {
40  Q_OBJECT
41 
42 public:
45 
46  QXmppDiscoveryIq capabilities();
47 
48  QString requestInfo(const QString& jid, const QString& node = QString());
49  QString requestItems(const QString& jid, const QString& node = QString());
50 
51  QString clientCapabilitiesNode() const;
52  void setClientCapabilitiesNode(const QString&);
53 
54  // http://xmpp.org/registrar/disco-categories.html#client
55  QString clientCategory() const;
56  void setClientCategory(const QString&);
57 
58  void setClientName(const QString&);
59  QString clientName() const;
60 
61  QString clientType() const;
62  void setClientType(const QString&);
63 
64  QXmppDataForm clientInfoForm() const;
65  void setClientInfoForm(const QXmppDataForm &form);
66 
68  QStringList discoveryFeatures() const;
69  bool handleStanza(const QDomElement &element);
71 
72 signals:
74  void infoReceived(const QXmppDiscoveryIq&);
75 
77  void itemsReceived(const QXmppDiscoveryIq&);
78 
79 private:
80  QXmppDiscoveryManagerPrivate *d;
81 };
82 
83 #endif // QXMPPDISCOVERYMANAGER_H
The QXmppDiscoveryManager class makes it possible to discover information about other entities as def...
Definition: QXmppDiscoveryManager.h:38
The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms.
Definition: QXmppDataForm.h:40
virtual bool handleStanza(const QDomElement &stanza)=0
You need to implement this method to process incoming XMPP stanzas.
virtual QStringList discoveryFeatures() const
Definition: QXmppClientExtension.cpp:54
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:47