QXmpp Namespace
| Header: | #include <Algorithms.h> |
| Since: | QXmpp 1.5 |
Namespaces
| namespace | Disco |
(since QXmpp 1.16) namespace | Muc |
(since QXmpp 1.8) namespace | Uri |
(since QXmpp 1.16) namespace | Xml |
Classes
(since QXmpp 1.7) struct | AuthenticationError |
(since QXmpp 1.7) struct | BindError |
(since QXmpp 1.5) struct | Cancelled |
(since QXmpp 1.9) struct | Reply |
(since QXmpp 1.5) struct | SendSuccess |
(since QXmpp 1.14) struct | StunServer |
(since QXmpp 1.5) struct | Success |
(since QXmpp 1.7) struct | TimeoutError |
(since QXmpp 1.14) struct | TurnServer |
Types
(since QXmpp 1.5) enum | Cipher { Aes128GcmNoPad, Aes256GcmNoPad, Aes256CbcPkcs7 } |
(since QXmpp 1.5) enum class | HashAlgorithm { Unknown, Md2, Md5, Shake128, Shake256, …, Blake2b_512 } |
(since QXmpp 1.14) enum class | JingleErrorCondition { OutOfOrder, TieBreak, UnknownSession, UnsupportedInfo } |
(since QXmpp 1.17) enum class | Namespace { Xml, Pie0, Stream, Client, Server, …, Fast0 } |
(since QXmpp 1.12) | Result |
(since QXmpp 1.5) enum | SceMode { SceAll, ScePublic, SceSensitive } |
(since QXmpp 1.5) enum class | SendError { SocketWriteError, Disconnected, EncryptionError } |
| SendResult | |
(since QXmpp 1.7) enum class | StreamError { BadFormat, BadNamespacePrefix, Conflict, ConnectionTimeout, HostGone, …, UnsupportedVersion } |
(since QXmpp 1.5) enum class | TrustLevel { Undecided, AutomaticallyDistrusted, ManuallyDistrusted, AutomaticallyTrusted, ManuallyTrusted, Authenticated } |
| flags | TrustLevels |
(since QXmpp 1.5) enum | TrustSecurityPolicy { NoSecurityPolicy, Toakafa } |
Functions
(since QXmpp 1.16) QString | formatXmlForDebug(QStringView raw, bool indent = true, int indentWidth = 2, bool colorize = false) |
(since QXmpp 1.11) QString | generateSequentialStanzaId() |
(since QXmpp 1.13) const QXmppError & | getError(const QXmpp::Result<T> &r) |
(since QXmpp 1.13) QXmppError & | getError(QXmpp::Result<T> &r) |
(since QXmpp 1.13) QXmppError | getError(QXmpp::Result<T> &&r) |
(since QXmpp 1.13) T & | getValue(QXmpp::Result<T> &r) |
(since QXmpp 1.13) T | getValue(QXmpp::Result<T> &&r) |
(since QXmpp 1.13) const T & | getValue(const QXmpp::Result<T> &r) |
(since QXmpp 1.5) bool | handleIqRequests(const QDomElement &element, QXmppClient *client, Handler handler) |
(since QXmpp 1.5) bool | handleIqRequests(const QDomElement &element, const std::optional<QXmppE2eeMetadata> &e2eeMetadata, QXmppClient *client, Handler handler) |
(since QXmpp 1.13) bool | hasError(const QXmpp::Result<T> &r) |
(since QXmpp 1.13) bool | hasValue(const QXmpp::Result<T> &r) |
| bool | isElement(const QDomElement &el) |
| bool | isIqElement(const QDomElement &el) |
(since QXmpp 1.17) std::optional<QXmpp::Namespace> | namespaceFromUri(QStringView uri) |
(since QXmpp 1.17) QString | namespaceUri(QXmpp::Namespace ns) |
(since QXmpp 1.5) bool | operator&(QXmpp::SceMode mode1, QXmpp::SceMode mode2) |
Detailed Description
Contains global functions and enumerations.
Namespaces
namespace QXmpp::Disco
Contains types for XEP-0030: Service Discovery.
[since QXmpp 1.16] namespace QXmpp::Muc
This namespace was introduced in QXmpp 1.16.
[since QXmpp 1.8] namespace QXmpp::Uri
Contains URI classes that can be serialized to URI queries (see QXmppUri).
This namespace was introduced in QXmpp 1.8.
[since QXmpp 1.16] namespace QXmpp::Xml
Contains types for generic and dynamically-registered XML extensions.
This namespace was introduced in QXmpp 1.16.
Classes
class AuthenticationError
Indicates an authentication error. More...
class BindError
Indicates a resource binding error. More...
class Cancelled
Unit struct used to indicate that a process has been cancelled. More...
class Reply
Message reply as defined in XEP-0461: Message Replies. More...
class SendSuccess
A struct indicating success when sending packets. More...
class StunServer
STUN server address. More...
class Success
An empty struct indicating success in results. More...
class TimeoutError
Unit struct indicating a client-side timeout (or keep-alive) error. More...
class TurnServer
TURN server address. More...
Type Documentation
[since QXmpp 1.5] enum QXmpp::Cipher
Cipher for encrypting data streams and files.
| Constant | Value |
|---|---|
QXmpp::Aes128GcmNoPad | 0 |
QXmpp::Aes256GcmNoPad | 1 |
QXmpp::Aes256CbcPkcs7 | 2 |
This enum was introduced in QXmpp 1.5.
[since QXmpp 1.5] enum class QXmpp::HashAlgorithm
Cryptographic hash algorithm as specified in XEP-0300: Use of Cryptographic Hash Functions in XMPP.
| Constant | Value | Description |
|---|---|---|
QXmpp::HashAlgorithm::Unknown | 0 | The algorithm is unknown or not set. |
QXmpp::HashAlgorithm::Md2 | 1 | MD2 hash algorithm. |
QXmpp::HashAlgorithm::Md5 | 2 | MD5 hash algorithm. |
QXmpp::HashAlgorithm::Shake128 | 3 | SHAKE-128 hash algorithm. |
QXmpp::HashAlgorithm::Shake256 | 4 | SHAKE-256 hash algorithm. |
QXmpp::HashAlgorithm::Sha1 | 5 | SHA-1 hash algorithm. |
QXmpp::HashAlgorithm::Sha224 | 6 | SHA-224 hash algorithm. |
QXmpp::HashAlgorithm::Sha256 | 7 | SHA-256 hash algorithm. |
QXmpp::HashAlgorithm::Sha384 | 8 | SHA-384 hash algorithm. |
QXmpp::HashAlgorithm::Sha512 | 9 | SHA-512 hash algorithm. |
QXmpp::HashAlgorithm::Sha3_256 | 10 | SHA3-256 hash algorithm. |
QXmpp::HashAlgorithm::Sha3_512 | 11 | SHA3-512 hash algorithm. |
QXmpp::HashAlgorithm::Blake2b_256 | 12 | BLAKE2b-256 hash algorithm. |
QXmpp::HashAlgorithm::Blake2b_512 | 13 | BLAKE2b-512 hash algorithm. |
This enum was introduced in QXmpp 1.5.
[since QXmpp 1.14] enum class QXmpp::JingleErrorCondition
XEP-0166: Jingle-specific error condition, used in QXmppStanza::Error.
| Constant | Value |
|---|---|
QXmpp::JingleErrorCondition::OutOfOrder | 0 |
QXmpp::JingleErrorCondition::TieBreak | 1 |
QXmpp::JingleErrorCondition::UnknownSession | 2 |
QXmpp::JingleErrorCondition::UnsupportedInfo | 3 |
This enum was introduced in QXmpp 1.14.
[since QXmpp 1.17] enum class QXmpp::Namespace
XML namespaces known to QXmpp.
The names consist of the name the specification is known by and the version from the URI, e.g. Mam2 for urn:xmpp:mam:2. If the name ends with a digit, an underscore separates the version, e.g. Bind2_0 for urn:xmpp:bind:0 of Bind 2. Namespaces without a version in their URI have no suffix.
Use namespaceUri() and namespaceFromUri() to convert between the values and the URIs.
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Xml | 0 | XML: http://www.w3.org/XML/1998/namespace |
QXmpp::Namespace::Pie0 | 1 | XEP-0227: Portable Import/Export Format for XMPP-IM Servers |
: urn:xmpp:pie:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Stream | 2 | XMPP: http://etherx.jabber.org/streams |
QXmpp::Namespace::Client | 3 | XMPP: jabber:client |
QXmpp::Namespace::Server | 4 | XMPP: jabber:server |
QXmpp::Namespace::Roster | 5 | XMPP: jabber:iq:roster |
QXmpp::Namespace::Tls | 6 | XMPP: urn:ietf:params:xml:ns:xmpp-tls |
QXmpp::Namespace::Sasl | 7 | XMPP: urn:ietf:params:xml:ns:xmpp-sasl |
QXmpp::Namespace::Bind | 8 | XMPP: urn:ietf:params:xml:ns:xmpp-bind |
QXmpp::Namespace::StreamError | 9 | XMPP: urn:ietf:params:xml:ns:xmpp-streams |
QXmpp::Namespace::Session | 10 | XMPP: urn:ietf:params:xml:ns:xmpp-session |
QXmpp::Namespace::Stanza | 11 | XMPP: urn:ietf:params:xml:ns:xmpp-stanzas |
QXmpp::Namespace::PreApproval | 12 | XMPP: urn:xmpp:features:pre-approval |
QXmpp::Namespace::RosterVersioning | 13 | XMPP: urn:xmpp:features:rosterver |
QXmpp::Namespace::Rpc | 14 | XEP-0009: Jabber-RPC |
: jabber:iq:rpc
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::FeatureNegotiation | 15 | XEP-0020: Feature Negotiation |
: http://jabber.org/protocol/feature-neg
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::LegacyOpenPgp | 16 | XEP-0027: Current Jabber OpenPGP Usage |
: jabber:x:encrypted
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::DiscoInfo | 17 | XEP-0030: Service Discovery |
: http://jabber.org/protocol/disco#info
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::DiscoItems | 18 | XEP-0030: Service Discovery |
: http://jabber.org/protocol/disco#items
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::ExtendedAddressing | 19 | XEP-0033: Extended Stanza Addressing |
: http://jabber.org/protocol/address
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Muc | 20 | XEP-0045: Multi-User Chat |
: http://jabber.org/protocol/muc
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MucAdmin | 21 | XEP-0045: Multi-User Chat |
: http://jabber.org/protocol/muc#admin
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MucOwner | 22 | XEP-0045: Multi-User Chat |
: http://jabber.org/protocol/muc#owner
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MucUser | 23 | XEP-0045: Multi-User Chat |
: http://jabber.org/protocol/muc#user
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MucRoomInfo | 24 | XEP-0045: Multi-User Chat |
: http://jabber.org/protocol/muc#roominfo
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MucRequest | 25 | XEP-0045: Multi-User Chat |
: http://jabber.org/protocol/muc#request
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MucRoomConfig | 26 | XEP-0045: Multi-User Chat |
: http://jabber.org/protocol/muc#roomconfig
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Ibb | 27 | XEP-0047: In-Band Bytestreams |
: http://jabber.org/protocol/ibb
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Bookmarks | 28 | XEP-0048: Bookmarks |
: storage:bookmarks
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PrivateXmlStorage | 29 | XEP-0049: Private XML Storage |
: jabber:iq:private
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::VCard | 30 | XEP-0054: vcard-temp |
: vcard-temp
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Rsm | 31 | XEP-0059: Result Set Management |
: http://jabber.org/protocol/rsm
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSub | 32 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubAutoCreate | 33 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#auto-create
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubConfigNode | 34 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#config-node
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubConfigNodeMax | 35 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#config-node-max
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubCreateAndConfigure | 36 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#create-and-configure
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubCreateNodes | 37 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#create-nodes
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubErrors | 38 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#errors
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubEvent | 39 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#event
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubMultiItems | 40 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#multi-items
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubNodeConfig | 41 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#node_config
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubOwner | 42 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#owner
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubPublish | 43 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#publish
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubPublishOptions | 44 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#publish-options
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::PubSubRsm | 45 | XEP-0060: Publish-Subscribe |
: http://jabber.org/protocol/pubsub#rsm
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Bytestreams | 46 | XEP-0065: SOCKS5 Bytestreams |
: http://jabber.org/protocol/bytestreams
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::OutOfBandData | 47 | XEP-0066: Out of Band Data |
: jabber:x:oob
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Xhtml | 48 | XEP-0071: XHTML-IM |
: http://www.w3.org/1999/xhtml
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::XhtmlIm | 49 | XEP-0071: XHTML-IM |
: http://jabber.org/protocol/xhtml-im
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Register | 50 | XEP-0077: In-Band Registration |
: jabber:iq:register
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::RegisterFeature | 51 | XEP-0077: In-Band Registration |
: http://jabber.org/features/iq-register
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Auth | 52 | XEP-0078: Non-SASL Authentication |
: jabber:iq:auth
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::AuthFeature | 53 | XEP-0078: Non-SASL Authentication |
: http://jabber.org/features/iq-auth
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Geoloc | 54 | XEP-0080: User Location |
: http://jabber.org/protocol/geoloc
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::GeolocNotify | 55 | XEP-0080: User Location |
: http://jabber.org/protocol/geoloc+notify
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::UserAvatarData | 56 | XEP-0084: User Avatar |
: urn:xmpp:avatar:data
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::UserAvatarMetadata | 57 | XEP-0084: User Avatar |
: urn:xmpp:avatar:metadata
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::ChatStates | 58 | XEP-0085: Chat State Notifications |
: http://jabber.org/protocol/chatstates
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::LegacyDelayedDelivery | 59 | XEP-0091: Legacy Delayed Delivery |
: jabber:x:delay
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::SoftwareVersion | 60 | XEP-0092: Software Version |
: jabber:iq:version
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::DataForms | 61 | XEP-0004: Data Forms |
: jabber:x:data
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::StreamInitiation | 62 | XEP-0095: Stream Initiation |
: http://jabber.org/protocol/si
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::StreamInitiationFileTransfer | 63 | XEP-0095: Stream Initiation |
: http://jabber.org/protocol/si/profile/file-transfer
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::UrlData | 64 | XEP-0103: URL Address Information |
: http://jabber.org/protocol/url-data
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Activity | 65 | XEP-0108: User Activity |
: http://jabber.org/protocol/activity
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Capabilities | 66 | XEP-0115: Entity Capabilities |
: http://jabber.org/protocol/caps
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Tune | 67 | XEP-0118: User Tune |
: http://jabber.org/protocol/tune
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::TuneNotify | 68 | XEP-0118: User Tune |
: http://jabber.org/protocol/tune+notify
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Archive | 69 | XEP-0136: Message Archiving |
: urn:xmpp:archive
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Compress | 70 | XEP-0138: Stream Compression |
: http://jabber.org/protocol/compress
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::CompressFeature | 71 | XEP-0138: Stream Compression |
: http://jabber.org/features/compress
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::RosterNotes | 72 | XEP-0145: Annotations |
: storage:rosternotes
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::VCardUpdate | 73 | XEP-0153: vCard-Based Avatars |
: vcard-temp:x:update
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::ContactAddresses | 74 | XEP-0157: Contact Addresses for XMPP Services |
: http://jabber.org/network/serverinfo
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Captcha | 75 | XEP-0158: CAPTCHA Forms |
: urn:xmpp:captcha
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Jingle1 | 76 | XEP-0166: Jingle |
: urn:xmpp:jingle:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleRawUdp1 | 77 | XEP-0166: Jingle |
: urn:xmpp:jingle:transports:raw-udp:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleIceUdp1 | 78 | XEP-0166: Jingle |
: urn:xmpp:jingle:transports:ice-udp:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleErrors1 | 79 | XEP-0166: Jingle |
: urn:xmpp:jingle:errors:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleRtp1 | 80 | XEP-0167: Jingle RTP Sessions |
: urn:xmpp:jingle:apps:rtp:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleRtpAudio | 81 | XEP-0167: Jingle RTP Sessions |
: urn:xmpp:jingle:apps:rtp:audio
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleRtpVideo | 82 | XEP-0167: Jingle RTP Sessions |
: urn:xmpp:jingle:apps:rtp:video
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleRtpInfo1 | 83 | XEP-0167: Jingle RTP Sessions |
: urn:xmpp:jingle:apps:rtp:info:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleRtpErrors1 | 84 | XEP-0167: Jingle RTP Sessions |
: urn:xmpp:jingle:apps:rtp:errors:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MessageReceipts | 85 | XEP-0184: Message Receipts |
: urn:xmpp:receipts
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Blocking | 86 | XEP-0191: Blocking Command |
: urn:xmpp:blocking
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::StreamManagement3 | 87 | XEP-0198: Stream Management |
: urn:xmpp:sm:3
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Ping | 88 | XEP-0199: XMPP Ping |
: urn:xmpp:ping
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::EntityTime | 89 | XEP-0202: Entity Time |
: urn:xmpp:time
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::DelayedDelivery | 90 | XEP-0203: Delayed Delivery |
: urn:xmpp:delay
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::ExternalServiceDiscovery2 | 91 | XEP-0215: External Service Discovery |
: urn:xmpp:extdisco:2
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::ServerDialback | 92 | XEP-0220: Server Dialback |
: jabber:server:dialback
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MediaElement | 93 | XEP-0221: Data Forms Media Element |
: urn:xmpp:media-element
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Attention0 | 94 | XEP-0224: Attention |
: urn:xmpp:attention:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::BitsOfBinary | 95 | XEP-0231: Bits of Binary |
: urn:xmpp:bob
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::DirectMucInvitation | 96 | XEP-0249: Direct MUC Invitations |
: jabber:x:conference
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Thumbnails1 | 97 | XEP-0264: Jingle Content Thumbnails |
: urn:xmpp:thumbs:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Muji0 | 98 | XEP-0272: Multiparty Jingle (Muji) |
: urn:xmpp:jingle:muji:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Carbons2 | 99 | XEP-0280: Message Carbons |
: urn:xmpp:carbons:2
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Moved1 | 100 | XEP-0283: Moved |
: urn:xmpp:moved:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleRtcpFeedback0 | 101 | XEP-0293: Jingle RTP Feedback Negotiation |
: urn:xmpp:jingle:apps:rtp:rtcp-fb:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleRtpHeaderExtensions0 | 102 | XEP-0294: Jingle RTP Header Extensions Negotiation |
: urn:xmpp:jingle:apps:rtp:rtp-hdrext:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Forwarding0 | 103 | XEP-0297: Stanza Forwarding |
: urn:xmpp:forward:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Hashes2 | 104 | XEP-0300: Use of Cryptographic Hash Functions in XMPP |
: urn:xmpp:hashes:2
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MucUnique | 105 | XEP-0307: Unique Room Names for Multi-User Chat |
: http://jabber.org/protocol/muc#unique
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MessageCorrection0 | 106 | XEP-0308: Last Message Correction |
: urn:xmpp:message-correct:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Mam2 | 107 | XEP-0313: Message Archive Management |
: urn:xmpp:mam:2
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Idle1 | 108 | XEP-0319: Last User Interaction in Presence |
: urn:xmpp:idle:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleDtls0 | 109 | XEP-0320: Use of DTLS-SRTP in Jingle Sessions |
: urn:xmpp:jingle:apps:dtls:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::ChatMarkers0 | 110 | XEP-0333: Chat Markers |
: urn:xmpp:chat-markers:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MessageProcessingHints | 111 | XEP-0334: Message Processing Hints |
: urn:xmpp:hints
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Csi0 | 112 | XEP-0352: Client State Indication |
: urn:xmpp:csi:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::JingleMessage0 | 113 | XEP-0353: Jingle Message Initiation |
: urn:xmpp:jingle-message:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Push0 | 114 | XEP-0357: Push Notifications |
: urn:xmpp:push:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::StanzaId0 | 115 | XEP-0359: Unique and Stable Stanza IDs |
: urn:xmpp:sid:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::HttpUpload0 | 116 | XEP-0363: HTTP File Upload |
: urn:xmpp:http:upload:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Otr0 | 117 | XEP-0364: Current Off-the-Record Messaging Usage |
: urn:xmpp:otr:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MessageAttaching1 | 118 | XEP-0367: Message Attaching |
: urn:xmpp:message-attaching:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixCore1 | 119 | XEP-0369: Mediated Information eXchange (MIX) |
: urn:xmpp:mix:core:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixCore1CreateChannel | 120 | XEP-0369: Mediated Information eXchange (MIX) |
: urn:xmpp:mix:core:1#create-channel
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixCore1Searchable | 121 | XEP-0369: Mediated Information eXchange (MIX) |
: urn:xmpp:mix:core:1#searchable
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixNodesInfo | 122 | XEP-0369: Mediated Information eXchange (MIX) |
: urn:xmpp:mix:nodes:info
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixNodesMessages | 123 | XEP-0369: Mediated Information eXchange (MIX) |
: urn:xmpp:mix:nodes:messages
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixNodesParticipants | 124 | XEP-0369: Mediated Information eXchange (MIX) |
: urn:xmpp:mix:nodes:participants
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::OpenPgp0 | 125 | XEP-0373: OpenPGP for XMPP |
: urn:xmpp:openpgp:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Reporting1 | 126 | XEP-0377: Blocking Command Reports |
: urn:xmpp:reporting:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Eme0 | 127 | XEP-0380: Explicit Message Encryption |
: urn:xmpp:eme:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Spoiler0 | 128 | XEP-0382: Spoiler messages |
: urn:xmpp:spoiler:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::LegacyOmemo | 129 | XEP-0384: OMEMO Encryption |
: eu.siacs.conversations.axolotl
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Omemo1 | 130 | XEP-0384: OMEMO Encryption |
: urn:xmpp:omemo:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Omemo2 | 131 | XEP-0384: OMEMO Encryption |
: urn:xmpp:omemo:2
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Omemo2Bundles | 132 | XEP-0384: OMEMO Encryption |
: urn:xmpp:omemo:2:bundles
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Omemo2Devices | 133 | XEP-0384: OMEMO Encryption |
: urn:xmpp:omemo:2:devices
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Bind2_0 | 134 | XEP-0386: Bind 2 |
: urn:xmpp:bind:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Sasl2_2 | 135 | XEP-0388: Extensible SASL Profile |
: urn:xmpp:sasl:2
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Bookmarks2_1 | 136 | XEP-0402: PEP Native Bookmarks |
: urn:xmpp:bookmarks:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixNodesPresence | 137 | XEP-0403: Mediated Information eXchange (MIX): Presence Support |
: urn:xmpp:mix:nodes:presence
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixNodesJidMap | 138 | XEP-0404: Mediated Information eXchange (MIX): JID Hidden Channels |
: urn:xmpp:mix:nodes:jidmap
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixPam2 | 139 | XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements |
: urn:xmpp:mix:pam:2
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixPam2Archive | 140 | XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements |
: urn:xmpp:mix:pam:2#archive
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixRoster0 | 141 | XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements |
: urn:xmpp:mix:roster:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixPresence0 | 142 | XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements |
: urn:xmpp:presence:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixAdmin0 | 143 | XEP-0406: Mediated Information eXchange (MIX): MIX Administration |
: urn:xmpp:mix:admin:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixNodesAllowed | 144 | XEP-0406: Mediated Information eXchange (MIX): MIX Administration |
: urn:xmpp:mix:nodes:allowed
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixNodesBanned | 145 | XEP-0406: Mediated Information eXchange (MIX): MIX Administration |
: urn:xmpp:mix:nodes:banned
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixNodesConfig | 146 | XEP-0406: Mediated Information eXchange (MIX): MIX Administration |
: urn:xmpp:mix:nodes:config
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MixMisc0 | 147 | XEP-0407: Mediated Information eXchange (MIX): Miscellaneous Capabilities |
: urn:xmpp:mix:misc:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MucSelfPingOptimization | 148 | XEP-0410: MUC Self-Ping (Schrödinger's Chat) |
: http://jabber.org/protocol/muc#self-ping-optimization
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::OccupantId0 | 149 | XEP-0421: Occupant identifiers for semi-anonymous MUCs |
: urn:xmpp:occupant-id:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MessageRetract1 | 150 | XEP-0424: Message Retraction |
: urn:xmpp:message-retract:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MessageRetract1Tombstone | 151 | XEP-0424: Message Retraction |
: urn:xmpp:message-retract:1#tombstone
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::MessageModerate1 | 152 | XEP-0425: Moderated Message Retraction |
: urn:xmpp:message-moderate:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Fallback0 | 153 | XEP-0428: Fallback Indication |
: urn:xmpp:fallback:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::TrustMessages1 | 154 | XEP-0434: Trust Messages (TM) |
: urn:xmpp:tm:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Reactions0 | 155 | XEP-0444: Message Reactions |
: urn:xmpp:reactions:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::FileMetadata0 | 156 | XEP-0446: File metadata element |
: urn:xmpp:file:metadata:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::StatelessFileSharing0 | 157 | XEP-0447: Stateless file sharing |
: urn:xmpp:sfs:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::EncryptedStatelessFileSharing0 | 158 | XEP-0448: Encryption for stateless file sharing |
: urn:xmpp:esfs:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Atm1 | 159 | XEP-0450: Automatic Trust Management (ATM) |
: urn:xmpp:atm:1
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Reply0 | 160 | XEP-0461: Message Replies |
: urn:xmpp:reply:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::CallInvites0 | 161 | XEP-0482: Call Invites |
: urn:xmpp:call-invites:0
| Constant | Value | Description |
|---|---|---|
QXmpp::Namespace::Fast0 | 162 | XEP-0484: Fast Authentication Streamlining Tokens |
: urn:xmpp:fast:0
This enum was introduced in QXmpp 1.17.
[alias, since QXmpp 1.12] template <typename T = QXmpp::Success> QXmpp::Result
Generic result type offering value or QXmppError.
T defaults to QXmpp::Success since QXmpp 1.13.
This typedef was introduced in QXmpp 1.12.
[since QXmpp 1.5] enum QXmpp::SceMode
Parsing/serialization mode when using Stanza Content Encryption (XEP-0420: Stanza Content Encryption).
| Constant | Value | Description |
|---|---|---|
QXmpp::SceAll | 0 | Processes all known elements. |
QXmpp::ScePublic | 1 | Only processes 'public' elements (e.g. needed for routing). |
QXmpp::SceSensitive | 2 | Only processes sensitive elements that should be encrypted. |
This enum was introduced in QXmpp 1.5.
[since QXmpp 1.5] enum class QXmpp::SendError
Describes the type of a packet sending error.
| Constant | Value | Description |
|---|---|---|
QXmpp::SendError::SocketWriteError | 0 | The packet was written to the socket with no success (only happens when Stream Management is disabled). |
QXmpp::SendError::Disconnected | 1 | The packet couldn't be sent because the connection hasn't been (re)established. |
QXmpp::SendError::EncryptionError | 2 | The packet couldn't be sent because prior encryption failed. |
This enum was introduced in QXmpp 1.5.
[alias] QXmpp::SendResult
A variant containing either a SendSuccess object or a QXmppError.
The QXmppError will likely contain a SendError.
[since QXmpp 1.7] enum class QXmpp::StreamError
All XMPP top-level stream errors.
| Constant | Value |
|---|---|
QXmpp::StreamError::BadFormat | 0 |
QXmpp::StreamError::BadNamespacePrefix | 1 |
QXmpp::StreamError::Conflict | 2 |
QXmpp::StreamError::ConnectionTimeout | 3 |
QXmpp::StreamError::HostGone | 4 |
QXmpp::StreamError::HostUnknown | 5 |
QXmpp::StreamError::ImproperAddressing | 6 |
QXmpp::StreamError::InternalServerError | 7 |
QXmpp::StreamError::InvalidFrom | 8 |
QXmpp::StreamError::InvalidId | 9 |
QXmpp::StreamError::InvalidNamespace | 10 |
QXmpp::StreamError::InvalidXml | 11 |
QXmpp::StreamError::NotAuthorized | 12 |
QXmpp::StreamError::NotWellFormed | 13 |
QXmpp::StreamError::PolicyViolation | 14 |
QXmpp::StreamError::RemoteConnectionFailed | 15 |
QXmpp::StreamError::Reset | 16 |
QXmpp::StreamError::ResourceConstraint | 17 |
QXmpp::StreamError::RestrictedXml | 18 |
QXmpp::StreamError::SystemShutdown | 19 |
QXmpp::StreamError::UndefinedCondition | 20 |
QXmpp::StreamError::UnsupportedEncoding | 21 |
QXmpp::StreamError::UnsupportedFeature | 22 |
QXmpp::StreamError::UnsupportedStanzaType | 23 |
QXmpp::StreamError::UnsupportedVersion | 24 |
This enum was introduced in QXmpp 1.7.
[since QXmpp 1.5] enum class QXmpp::TrustLevel
flags QXmpp::TrustLevels
Trust level of public long-term keys used by end-to-end encryption protocols
| Constant | Value | Description |
|---|---|---|
QXmpp::TrustLevel::Undecided | 1 | The key's trust is not decided. |
QXmpp::TrustLevel::AutomaticallyDistrusted | 2 | The key is automatically distrusted (e.g., by the security policy TOAKAFA). |
QXmpp::TrustLevel::ManuallyDistrusted | 4 | The key is manually distrusted (e.g., by clicking a button or XEP-0450: Automatic Trust Management (ATM)). |
QXmpp::TrustLevel::AutomaticallyTrusted | 8 | The key is automatically trusted (e.g., by the client for all keys of a bare JID until one of it is authenticated). |
QXmpp::TrustLevel::ManuallyTrusted | 16 | The key is manually trusted (e.g., by clicking a button). |
QXmpp::TrustLevel::Authenticated | 32 | The key is authenticated (e.g., by QR code scanning or XEP-0450: Automatic Trust Management (ATM)). |
This enum was introduced in QXmpp 1.5.
The TrustLevels type is a typedef for QFlags<TrustLevel>. It stores an OR combination of TrustLevel values.
See also QXmpp::TrustSecurityPolicy.
[since QXmpp 1.5] enum QXmpp::TrustSecurityPolicy
Security policy to decide which public long-term keys are used for encryption because they are trusted
| Constant | Value | Description |
|---|---|---|
QXmpp::NoSecurityPolicy | 0 | New keys must be trusted manually. |
QXmpp::Toakafa | 1 | New keys are trusted automatically until the first authentication but automatically distrusted afterwards (XEP-0450: Automatic Trust Management (ATM)). |
This enum was introduced in QXmpp 1.5.
Function Documentation
[since QXmpp 1.16] QString QXmpp::formatXmlForDebug(QStringView raw, bool indent = true, int indentWidth = 2, bool colorize = false)
Pretty-prints an XML fragment for debug display.
Reparses raw with QXmlStreamReader and re-emits it with line breaks and indentation. If colorize is true, ANSI 16-color escape sequences are inserted for terminal syntax highlighting (tags, attributes, text).
Tolerates XMPP stream fragments that are not standalone documents (such as inner child stanzas without their enclosing <stream:stream>). If the input cannot be parsed as XML at all, the original string is returned unchanged, so non-XML payloads (e.g. STUN packet dumps) pass through.
raw is the raw XML string. indent controls whether line breaks and indentation are added, and indentWidth sets the number of spaces per indentation level.
This function was introduced in QXmpp 1.16.
[since QXmpp 1.11] QString QXmpp::generateSequentialStanzaId()
Generates a new sequential stanza id. The ID is locally unique, not globally unique (see QXmppUtils::generateStanzaUuid()).
This is used for all QXmppStanzas automatically.
This function was introduced in QXmpp 1.11.
[since QXmpp 1.13] template <typename T> const QXmppError &QXmpp::getError(const QXmpp::Result<T> &r)
Returns the error of a result r or throws.
This function was introduced in QXmpp 1.13.
[since QXmpp 1.13] template <typename T> QXmppError &QXmpp::getError(QXmpp::Result<T> &r)
Returns the error of a result r or throws.
This is an overloaded function.
This function was introduced in QXmpp 1.13.
[since QXmpp 1.13] template <typename T> QXmppError QXmpp::getError(QXmpp::Result<T> &&r)
Returns the error of a result r or throws.
This is an overloaded function.
This function was introduced in QXmpp 1.13.
[since QXmpp 1.13] template <typename T> T &QXmpp::getValue(QXmpp::Result<T> &r)
Returns the value of a result or throws
r.
This function was introduced in QXmpp 1.13.
[since QXmpp 1.13] template <typename T> T QXmpp::getValue(QXmpp::Result<T> &&r)
Returns the value of a result or throws
This function was introduced in QXmpp 1.13.
[since QXmpp 1.13] template <typename T> const T &QXmpp::getValue(const QXmpp::Result<T> &r)
Returns the value of a result or throws
r.
This function was introduced in QXmpp 1.13.
[since QXmpp 1.5] template <typename... IqTypes, typename Handler> bool QXmpp::handleIqRequests(const QDomElement &element, QXmppClient *client, Handler handler)
Parses IQ requests, calls a handler and sends an IQ result or error.
It is the easiest to explain this function with a few examples.
auto handled = QXmpp::handleIqElements<QXmppVersionIq>(element, client, [](QXmppVersionIq iq) -> std::variant<QXmppVersionIq, QXmppStanza::Error> {
if (iq.type() == QXmppIq::Get) {
QXmppVersionIq response;
response.setName("MyApp");
response.setVersion("1.0");
// id, to and type of the IQ are set automatically.
return response;
} else if (iq.type() == QXmppIq::Set) {
return QXmppStanza::Error(QXmppStanza::Error::Cancel, QXmppStanza::Error::BadRequest, "IQ must be of type 'get'.");
}
});
It is also possible to handle multiple IQ types.
auto handled = QXmpp::handleIqElements<QXmppVersionIq, QXmppVCardIq>(
element, client, [](std::variant<QXmppVersionIq, QXmppVCardIq> iqVariant) {
// ...
});
It doesn't need to be a std::variant, it's only important that the object is callable with all the IQ types. You can for example use different lambdas per type using this 'overloaded' helper.
template<class... Ts>
struct overloaded : Ts... {
using Ts::operator()...;
};
// explicit deduction guide (not needed as of C++20)
template<class... Ts>
overloaded(Ts...) -> overloaded<Ts...>;
auto handled = QXmpp::handleIqElements<QXmppVersionIq, QXmppVCardIq>(
element, client, overloaded {
[](QXmppVersionIq iq) {
// ...
},
[](QXmppVCardIq iq) {
// ...
}
});
And another option is to an object with handleIq() functions.
auto handled = QXmpp::handleIqElements<QXmppVersionIq, QXmppVCardIq>(element, client, this);
// will call this->handleIq(QXmppVersionIq) or this->handleIq(QXmppVCardIq)
The return type of the handler function can be: 1. an QXmppIq based type 2. a std::variant of QXmppIq based types (multiple are possible) and optionally also QXmppStanza::Error 3. a QXmppTask of 1. or 2.
You don't need to set the values for id or the to address on the IQ result because that's done automatically. Unless you want to return an error IQ you also don't need to set the IQ type.
If you return an QXmppStanza::Error, a normal QXmppIq with the error will be sent.
element is the DOM element that might contain an IQ. client is the client that should be used to send the response. handler is a function that can handle the IQ types from the template parameter or an object that has handleIq() functions for each of the IQ types.
Returns whether the IQ could be parsed, handled and a response was or will be sent.
This function was introduced in QXmpp 1.5.
[since QXmpp 1.5] template <typename... IqTypes, typename Handler> bool QXmpp::handleIqRequests(const QDomElement &element, const std::optional<QXmppE2eeMetadata> &e2eeMetadata, QXmppClient *client, Handler handler)
Parses IQ requests, calls a handler and sends an IQ result or error.
It is the easiest to explain this function with a few examples.
auto handled = QXmpp::handleIqElements<QXmppVersionIq>(element, e2eeMetadata, client, [](QXmppVersionIq iq) -> std::variant<QXmppVersionIq, QXmppStanza::Error> {
if (iq.type() == QXmppIq::Get) {
QXmppVersionIq response;
response.setName("MyApp");
response.setVersion("1.0");
// id, to and type of the IQ are set automatically.
return response;
} else if (iq.type() == QXmppIq::Set) {
return QXmppStanza::Error(QXmppStanza::Error::Cancel, QXmppStanza::Error::BadRequest, "IQ must be of type 'get'.");
}
});
It is also possible to handle multiple IQ types.
auto handled = QXmpp::handleIqElements<QXmppVersionIq, QXmppVCardIq>(
element, e2eeMetadata, client, [](std::variant<QXmppVersionIq, QXmppVCardIq> iqVariant) {
// ...
});
It doesn't need to be a std::variant, it's only important that the object is callable with all the IQ types. You can for example use different lambdas per type using this 'overloaded' helper.
template<class... Ts>
struct overloaded : Ts... {
using Ts::operator()...;
};
// explicit deduction guide (not needed as of C++20)
template<class... Ts>
overloaded(Ts...) -> overloaded<Ts...>;
auto handled = QXmpp::handleIqElements<QXmppVersionIq, QXmppVCardIq>(
element, e2eeMetadata, client, overloaded {
[](QXmppVersionIq iq) {
// ...
},
[](QXmppVCardIq iq) {
// ...
}
});
And another option is to an object with handleIq() functions.
auto handled = QXmpp::handleIqElements<QXmppVersionIq, QXmppVCardIq>(element, e2eeMetadata, client, this);
// will call this->handleIq(QXmppVersionIq) or this->handleIq(QXmppVCardIq)
The return type of the handler function can be: 1. an QXmppIq based type 2. a std::variant of QXmppIq based types (multiple are possible) and optionally also QXmppStanza::Error 3. a QXmppTask of 1. or 2.
You don't need to set the values for id or the to address on the IQ result because that's done automatically. Unless you want to return an error IQ you also don't need to set the IQ type.
If you return an QXmppStanza::Error, a normal QXmppIq with the error will be sent.
The provided optional QXmppE2eeMetadata is set on the parsed IQ and used to correctly encrypt the IQ response using QXmppClient::reply().
element is the DOM element that might contain an IQ. e2eeMetadata is the end-to-end encryption metadata that is used to encrypt the response correctly and to be set on the parsed IQ. client is the client that should be used to send the response. handler is a function that can handle the IQ types from the template parameter or an object that has handleIq() functions for each of the IQ types.
Returns whether the IQ could be parsed, handled and a response was or will be sent.
This function was introduced in QXmpp 1.5.
[since QXmpp 1.13] template <typename T> bool QXmpp::hasError(const QXmpp::Result<T> &r)
Returns whether a result contains an error
r.
This function was introduced in QXmpp 1.13.
[since QXmpp 1.13] template <typename T> bool QXmpp::hasValue(const QXmpp::Result<T> &r)
Returns whether a result contains the expected value
r.
This function was introduced in QXmpp 1.13.
template <HasXmlTag T> bool QXmpp::isElement(const QDomElement &el)
Returns true if an XML element has the correct tag name and namespace URI for type T.
el.
template <typename T> bool QXmpp::isIqElement(const QDomElement &el)
Returns true if a QDomElement is an IQ stanza of a specific type T.
el.
[since QXmpp 1.17] std::optional<QXmpp::Namespace> QXmpp::namespaceFromUri(QStringView uri)
Returns the namespace with the URI uri or nothing if the namespace is not known to QXmpp.
This function was introduced in QXmpp 1.17.
[since QXmpp 1.17] QString QXmpp::namespaceUri(QXmpp::Namespace ns)
Returns the URI of the namespace ns.
This function was introduced in QXmpp 1.17.
[constexpr, since QXmpp 1.5] bool QXmpp::operator&(QXmpp::SceMode mode1, QXmpp::SceMode mode2)
Returns true if a mode is enabled in both mode1 and mode2.
When an SceMode is given you can use this to check whether Public or Private elements are enabled.
This function was introduced in QXmpp 1.5.