QXmppFallback Class

Header: #include <QXmppFallback.h>
Since: QXmpp 1.7

Public Types

struct Range
struct Reference
enum Element { Body, Subject }

Public Functions

QXmppFallback(const QString &forNamespace, const QList<QXmppFallback::Reference> &references)
const QString &forNamespace() const
const QList<QXmppFallback::Reference> &references() const
void setForNamespace(const QString &ns)
void setReferences(const QList<QXmppFallback::Reference> &references)
void toXml(QXmlStreamWriter *writer) const

Static Public Members

std::optional<QXmppFallback> fromDom(const QDomElement &el)

Detailed Description

Fallback marker for message stanzas as defined in XEP-0428: Fallback Indication.

See also QXmppFallback.

Member Type Documentation

enum QXmppFallback::Element

Describes the element of the message stanza this refers to.

ConstantValueDescription
QXmppFallback::Body0The fallback refers to the message body.
QXmppFallback::Subject1The fallback refers to the message subject.

Member Function Documentation

QXmppFallback::QXmppFallback(const QString &forNamespace, const QList<QXmppFallback::Reference> &references)

Creates a fallback marker.

const QString &QXmppFallback::forNamespace() const

Returns the namespace of the XEP that this fallback marker is referring to.

See also setForNamespace().

[static] std::optional<QXmppFallback> QXmppFallback::fromDom(const QDomElement &el)

Tries to parse el into a QXmppFallback object.

Returns an empty optional on failure, the parsed object otherwise.

const QList<QXmppFallback::Reference> &QXmppFallback::references() const

Returns the text references of this fallback marker.

See also setReferences().

void QXmppFallback::setForNamespace(const QString &ns)

Sets the namespace of the XEP that this fallback marker is referring to.

ns.

See also forNamespace().

void QXmppFallback::setReferences(const QList<QXmppFallback::Reference> &references)

Sets the text references of this fallback marker.

See also references().

void QXmppFallback::toXml(QXmlStreamWriter *writer) const

Serializes the object to XML.

writer.