QXmpp Version: 1.10.0
|
The QXmppDiscoveryManager class makes it possible to discover information about other entities as defined by XEP-0030: Service Discovery. More...
#include <QXmppDiscoveryManager.h>
Public Types | |
using | InfoResult = std::variant< QXmppDiscoveryIq, QXmppError > |
using | ItemsResult = std::variant< QList< QXmppDiscoveryIq::Item >, QXmppError > |
Signals | |
void | infoReceived (const QXmppDiscoveryIq &) |
This signal is emitted when an information response is received. | |
void | itemsReceived (const QXmppDiscoveryIq &) |
This signal is emitted when an items response is received. | |
Signals inherited from QXmppLoggable | |
void | setGauge (const QString &gauge, double value) |
Sets the given gauge to value. | |
void | logMessage (QXmppLogger::MessageType type, const QString &msg) |
This signal is emitted to send logging messages. | |
void | updateCounter (const QString &counter, qint64 amount=1) |
Updates the given counter by amount. | |
Public Member Functions | |
QXmppDiscoveryIq | capabilities () |
QString | requestInfo (const QString &jid, const QString &node=QString()) |
QString | requestItems (const QString &jid, const QString &node=QString()) |
QXmppTask< InfoResult > | requestDiscoInfo (const QString &jid, const QString &node={}) |
QXmppTask< ItemsResult > | requestDiscoItems (const QString &jid, const QString &node={}) |
QString | clientCapabilitiesNode () const |
void | setClientCapabilitiesNode (const QString &) |
QString | clientCategory () const |
void | setClientCategory (const QString &) |
void | setClientName (const QString &) |
Sets the name of the local XMPP client. | |
QString | clientName () const |
QString | clientType () const |
void | setClientType (const QString &) |
QXmppDataForm | clientInfoForm () const |
void | setClientInfoForm (const QXmppDataForm &form) |
Public Member Functions inherited from QXmppClientExtension | |
QXmppClientExtension () | |
virtual QStringList | discoveryFeatures () const |
virtual QList< QXmppDiscoveryIq::Identity > | discoveryIdentities () const |
virtual bool | handleStanza (const QDomElement &stanza) |
You need to implement this method to process incoming XMPP stanzas. More... | |
virtual bool | handleStanza (const QDomElement &stanza, const std::optional< QXmppE2eeMetadata > &e2eeMetadata) |
You need to implement this method to process incoming XMPP stanzas. More... | |
Public Member Functions inherited from QXmppLoggable | |
QXmppLoggable (QObject *parent=nullptr) | |
Additional Inherited Members | |
Protected Member Functions inherited from QXmppClientExtension | |
QXmppClient * | client () const |
virtual void | setClient (QXmppClient *client) |
virtual void | onRegistered (QXmppClient *client) |
virtual void | onUnregistered (QXmppClient *client) |
void | injectIq (const QDomElement &element, const std::optional< QXmppE2eeMetadata > &e2eeMetadata) |
bool | injectMessage (QXmppMessage &&message) |
Protected Member Functions inherited from QXmppLoggable | |
void | debug (const QString &message) |
void | info (const QString &message) |
void | warning (const QString &message) |
void | logReceived (const QString &message) |
void | logSent (const QString &message) |
The QXmppDiscoveryManager class makes it possible to discover information about other entities as defined by XEP-0030: Service Discovery.
Contains the discovery information result in the form of an QXmppDiscoveryIq or (in case the request did not succeed) a QXmppStanza::Error.
Contains a list of service discovery items or (in case the request did not succeed) a QXmppStanza::Error.
QXmppDiscoveryIq QXmppDiscoveryManager::capabilities | ( | ) |
Returns the client's full capabilities.
QString QXmppDiscoveryManager::clientCapabilitiesNode | ( | ) | const |
Returns the capabilities node of the local XMPP client.
By default this is "https://github.com/qxmpp-project/qxmpp".
QString QXmppDiscoveryManager::clientCategory | ( | ) | const |
Returns the category of the local XMPP client.
By default this is "client".
QXmppDataForm QXmppDiscoveryManager::clientInfoForm | ( | ) | const |
Returns the client's extended information form, as defined by XEP-0128: Service Discovery Extensions.
QString QXmppDiscoveryManager::clientName | ( | ) | const |
Returns the name of the local XMPP client.
By default this is "Based on QXmpp x.y.z".
QString QXmppDiscoveryManager::clientType | ( | ) | const |
Returns the type of the local XMPP client.
With Qt builds for Android, Blackberry, iOS or Windows Phone this is set to "phone", otherwise it defaults to "pc".
QXmppTask< QXmppDiscoveryManager::InfoResult > QXmppDiscoveryManager::requestDiscoInfo | ( | const QString & | jid, |
const QString & | node = {} |
||
) |
Requests information from the specified XMPP entity.
jid | The target entity's JID. |
node | The target node (optional). |
QXmppTask< QXmppDiscoveryManager::ItemsResult > QXmppDiscoveryManager::requestDiscoItems | ( | const QString & | jid, |
const QString & | node = {} |
||
) |
Requests items from the specified XMPP entity.
jid | The target entity's JID. |
node | The target node (optional). |
QString QXmppDiscoveryManager::requestInfo | ( | const QString & | jid, |
const QString & | node = QString() |
||
) |
Requests information from the specified XMPP entity.
jid | The target entity's JID. |
node | The target node (optional). |
QString QXmppDiscoveryManager::requestItems | ( | const QString & | jid, |
const QString & | node = QString() |
||
) |
Requests items from the specified XMPP entity.
jid | The target entity's JID. |
node | The target node (optional). |
void QXmppDiscoveryManager::setClientCapabilitiesNode | ( | const QString & | node | ) |
Sets the capabilities node of the local XMPP client.
node |
void QXmppDiscoveryManager::setClientCategory | ( | const QString & | category | ) |
Sets the category of the local XMPP client.
You can find a list of valid categories at: http://xmpp.org/registrar/disco-categories.html
category |
void QXmppDiscoveryManager::setClientInfoForm | ( | const QXmppDataForm & | form | ) |
Sets the client's extended information form, as defined by XEP-0128: Service Discovery Extensions.
void QXmppDiscoveryManager::setClientType | ( | const QString & | type | ) |
Sets the type of the local XMPP client.
You can find a list of valid types at: http://xmpp.org/registrar/disco-categories.html