QXmpp: QXmppOmemoStorage Class Reference

QXmpp Version: 1.14.3

Loading...
Searching...
No Matches
QXmppOmemoStorage Class Referenceabstract

The QXmppOmemoStorage class stores data used by XEP-0384: OMEMO Encryption. More...

Inheritance diagram for QXmppOmemoStorage:

## Classes
struct | OwnDevice
struct | Device
struct | SignedPreKeyPair
struct | OmemoData

## Public Member Functions
virtual QXmppTask< OmemoData > | allData ()=0
virtual QXmppTask< void > | setOwnDevice (const std::optional< OwnDevice > &device)=0
virtual QXmppTask< void > | addSignedPreKeyPair (uint32_t keyId, const SignedPreKeyPair &keyPair)=0
virtual QXmppTask< void > | removeSignedPreKeyPair (uint32_t keyId)=0
virtual QXmppTask< void > | addPreKeyPairs (const QHash< uint32_t, QByteArray > &keyPairs)=0
virtual QXmppTask< void > | removePreKeyPair (uint32_t keyId)=0
virtual QXmppTask< void > | addDevice (const QString &jid, uint32_t deviceId, const Device &device)=0
virtual QXmppTask< void > | removeDevice (const QString &jid, uint32_t deviceId)=0
virtual QXmppTask< void > | removeDevices (const QString &jid)=0
virtual QXmppTask< void > | resetAll ()=0

## Detailed Description

The QXmppOmemoStorage class stores data used by XEP-0384: OMEMO Encryption.

Since
  QXmpp 1.5

## Member Function Documentation

## ◆ addDevice()

virtual QXmppTask< void > QXmppOmemoStorage::addDevice | ( | const QString & | jid,
|  | uint32_t | deviceId,
|  | const Device & | device )
| pure virtual

Adds other devices (i.e., all devices but the own one).

Parameters

  jid | JID of the device owner
  deviceId | ID of the device
  device | device being added

## ◆ addPreKeyPairs()

virtual QXmppTask< void > QXmppOmemoStorage::addPreKeyPairs | ( | const QHash< uint32_t, QByteArray > & | keyPairs | ) |
| pure virtual

Adds pre key pairs.

Parameters

  keyPairs | key IDs mapped to the pre key pairs

## ◆ addSignedPreKeyPair()

virtual QXmppTask< void > QXmppOmemoStorage::addSignedPreKeyPair | ( | uint32_t | keyId,
|  | const SignedPreKeyPair & | keyPair )
| pure virtual

Adds a signed pre key pair.

Parameters

  keyId | ID of the signed pre key pair
  keyPair | signed pre key pair

## ◆ allData()

virtual QXmppTask< OmemoData > QXmppOmemoStorage::allData | ( |  | ) |
| pure virtual

Returns all data used by OMEMO.

Returns
  the OMEMO data

## ◆ removeDevice()

virtual QXmppTask< void > QXmppOmemoStorage::removeDevice | ( | const QString & | jid,
|  | uint32_t | deviceId )
| pure virtual

Removes a device of the other devices (i.e., all devices but the own one).

Parameters

  jid | JID of the device owner
  deviceId | ID of the device being removed

## ◆ removeDevices()

virtual QXmppTask< void > QXmppOmemoStorage::removeDevices | ( | const QString & | jid | ) |
| pure virtual

Removes all devices of a passed JID from the other devices (i.e., all devices but the own one).

Parameters

  jid | JID of the device owner

## ◆ removePreKeyPair()

virtual QXmppTask< void > QXmppOmemoStorage::removePreKeyPair | ( | uint32_t | keyId | ) |
| pure virtual

Removes a pre key pair.

Parameters

  keyId | ID of the pre key pair

## ◆ removeSignedPreKeyPair()

virtual QXmppTask< void > QXmppOmemoStorage::removeSignedPreKeyPair | ( | uint32_t | keyId | ) |
| pure virtual

Removes a signed pre key pair.

Parameters

  keyId | ID of the signed pre key pair

## ◆ resetAll()

virtual QXmppTask< void > QXmppOmemoStorage::resetAll | ( |  | ) |
| pure virtual

Resets all data.

## ◆ setOwnDevice()

virtual QXmppTask< void > QXmppOmemoStorage::setOwnDevice | ( | const std::optional< OwnDevice > & | device | ) |
| pure virtual

Sets the own device (i.e., the device used by this client instance).

Parameters

  device | own device

The documentation for this class was generated from the following files:

- QXmppOmemoStorage.h
- QXmppOmemoStorage.cpp