QXmppOmemoDeviceElement Class

The QXmppOmemoDeviceElement class represents an element of the OMEMO device list as defined by XEP-0384: OMEMO Encryption. More...

Header: #include <QXmppOmemoDeviceElement>

Public Functions

uint32_t id() const
QString label() const
void setId(uint32_t id)
void setLabel(const QString &label)
bool operator==(const QXmppOmemoDeviceElement &other) const

Static Public Members

bool isOmemoDeviceElement(const QDomElement &element)

Detailed Description

Member Function Documentation

uint32_t QXmppOmemoDeviceElement::id() const

Returns the ID of this device element.

The ID is used to identify a device and fetch its bundle. The ID is 0 if it is unset.

See also setId() and QXmppOmemoDeviceBundle.

[static] bool QXmppOmemoDeviceElement::isOmemoDeviceElement(const QDomElement &element)

Determines whether the given DOM element is an OMEMO device element.

Returns true if element is an OMEMO device element, otherwise false.

QString QXmppOmemoDeviceElement::label() const

Returns the label of this device element.

The label is a human-readable string used to identify the device by users. If no label is set, a default-constructed QString is returned.

See also setLabel().

void QXmppOmemoDeviceElement::setId(uint32_t id)

Sets this device element's ID to id.

The ID must be at least 1 and at most std::numeric_limits<int32_t>::max().

See also id().

void QXmppOmemoDeviceElement::setLabel(const QString &label)

Sets the optional label of this device element.

The label should not contain more than 53 characters.

See also label().

bool QXmppOmemoDeviceElement::operator==(const QXmppOmemoDeviceElement &other) const

Returns true if the IDs of this element and other match.