QXmpp::Omemo::Device Struct

A device of a JID listed in its device list of a version. More...

Header: #include <QXmppOmemoManager.h>
Since: QXmpp 1.18

Public Functions

QByteArray fingerprint() const
bool hasKey(const QByteArray &key) const
bool isAuthenticatable() const
bool isDistrusted() const

Detailed Description

\varQXmpp::Omemo::Device::version OMEMO version of the device list \var QXmpp::Omemo::Device::jid bare JID of the device's owner \var QXmpp::Omemo::Device::id device ID \var QXmpp::Omemo::Device::label label of the device, only available with OMEMO 2 and if it has been signed with the identity key of the device, i.e., not before the key is known \var QXmpp::Omemo::Device::keyId public identity key in the format of the version (Curve25519 for OMEMO 0, Ed25519 for OMEMO 2), empty until the bundle of the device has been fetched, e.g. for building a session \var QXmpp::Omemo::Device::trustLevel trust level of the key, Undecided while the key is unknown \var QXmpp::Omemo::Device::omemo0KeyId public identity key of OMEMO 0 of a device listed by DeviceWatch::devices() with OMEMO 2 that also uses OMEMO 0, empty otherwise and while the key is unknown, it has the same trust level as keyId

Member Function Documentation

QByteArray Device::fingerprint() const

Returns the key as shown to users for comparing it, e.g. as hex, and as used in URIs: the key of OMEMO 2 or the Curve25519 key of OMEMO 0 without its type byte, like shown by clients only supporting OMEMO 0. It is empty while the key is unknown.

See also OmemoManager::authenticate().

bool Device::hasKey(const QByteArray &key) const

Returns whether key is the key of the device in one of the versions (keyId or omemo0KeyId), e.g. the key of the sender of a message.

bool Device::isAuthenticatable() const

Returns whether the key can be authenticated by the user, e.g. via a QR code: it is known, its trust level has been decided and it is not authenticated yet.

See also OmemoManager::authenticate().

bool Device::isDistrusted() const

Returns whether the key is automatically or manually distrusted. Messages are not encrypted for the device by default then.