Loading...
Searching...
No Matches
QXmppTrustStorage Class Referenceabstract

The QXmppTrustStorage class stores end-to-end encryption trust data. More...

Inheritance diagram for QXmppTrustStorage:
[legend]

## Public Member Functions

virtual QXmppTask< void > | setSecurityPolicy (const QString &encryption, QXmpp::TrustSecurityPolicy securityPolicy)=0
virtual QXmppTask< void > | resetSecurityPolicy (const QString &encryption)=0
virtual QXmppTask< QXmpp::TrustSecurityPolicy > | securityPolicy (const QString &encryption)=0
virtual QXmppTask< void > | setOwnKey (const QString &encryption, const QByteArray &keyId)=0
virtual QXmppTask< void > | resetOwnKey (const QString &encryption)=0
virtual QXmppTask< QByteArray > | ownKey (const QString &encryption)=0
virtual QXmppTask< void > | addKeys (const QString &encryption, const QString &keyOwnerJid, const QList< QByteArray > &keyIds, QXmpp::TrustLevel trustLevel=QXmpp::TrustLevel::AutomaticallyDistrusted)=0
virtual QXmppTask< void > | removeKeys (const QString &encryption, const QList< QByteArray > &keyIds)=0
virtual QXmppTask< void > | removeKeys (const QString &encryption, const QString &keyOwnerJid)=0
virtual QXmppTask< void > | removeKeys (const QString &encryption)=0
virtual QXmppTask< QHash< QXmpp::TrustLevel, QMultiHash< QString, QByteArray > > > | keys (const QString &encryption, QXmpp::TrustLevels trustLevels={})=0
virtual QXmppTask< QHash< QString, QHash< QByteArray, QXmpp::TrustLevel > > > | keys (const QString &encryption, const QList< QString > &keyOwnerJids, QXmpp::TrustLevels trustLevels={})=0
virtual QXmppTask< bool > | hasKey (const QString &encryption, const QString &keyOwnerJid, QXmpp::TrustLevels trustLevels)=0
virtual QXmppTask< QHash< QString, QMultiHash< QString, QByteArray > > > | setTrustLevel (const QString &encryption, const QMultiHash< QString, QByteArray > &keyIds, QXmpp::TrustLevel trustLevel)=0
virtual QXmppTask< QHash< QString, QMultiHash< QString, QByteArray > > > | setTrustLevel (const QString &encryption, const QList< QString > &keyOwnerJids, QXmpp::TrustLevel oldTrustLevel, QXmpp::TrustLevel newTrustLevel)=0
virtual QXmppTask< QXmpp::TrustLevel > | trustLevel (const QString &encryption, const QString &keyOwnerJid, const QByteArray &keyId)=0
virtual QXmppTask< void > | resetAll (const QString &encryption)=0

## Detailed Description

The QXmppTrustStorage class stores end-to-end encryption trust data.

The term "key" is used for a public long-term key.

Since
  QXmpp 1.5

## Member Function Documentation

## addKeys()

virtual QXmppTask< void > QXmppTrustStorage::addKeys | ( | const QString & | encryption,
|  | const QString & | keyOwnerJid,
|  | const QList< QByteArray > & | keyIds,
|  | QXmpp::TrustLevel | trustLevel = QXmpp::TrustLevel::AutomaticallyDistrusted )

pure virtual

Adds keys.

Parameters

  encryption | encryption protocol namespace
  keyOwnerJid | key owner's bare JID
  keyIds | IDs of the keys
  trustLevel | trust level of the keys

## hasKey()

virtual QXmppTask< bool > QXmppTrustStorage::hasKey | ( | const QString & | encryption,
|  | const QString & | keyOwnerJid,
|  | QXmpp::TrustLevels | trustLevels )

pure virtual

Returns whether at least one key of a key owner with a specific trust level is stored.

Parameters

  encryption | encryption protocol namespace
  keyOwnerJid | key owner's bare JID
  trustLevels | possible trust levels of the key

Returns
  whether a key of the key owner with a passed trust level is stored

## keys() [1/2]

virtual QXmppTask< QHash< QString, QHash< QByteArray, QXmpp::TrustLevel > > > QXmppTrustStorage::keys | ( | const QString & | encryption,
|  | const QList< QString > & | keyOwnerJids,
|  | QXmpp::TrustLevels | trustLevels = {} )

pure virtual

Returns the IDs of keys mapped to their trust levels for specific key owners.

If no trust levels are passed, all keys for encryption and keyOwnerJids are returned.

Parameters

  encryption | encryption protocol namespace
  keyOwnerJids | key owners' bare JIDs
  trustLevels | trust levels of the keys

Returns
  the key IDs mapped to their trust levels for specific key owners

## keys() [2/2]

virtual QXmppTask< QHash< QXmpp::TrustLevel, QMultiHash< QString, QByteArray > > > QXmppTrustStorage::keys | ( | const QString & | encryption,
|  | QXmpp::TrustLevels | trustLevels = {} )

pure virtual

Returns the JIDs of all key owners mapped to the IDs of their keys with specific trust levels.

If no trust levels are passed, all keys for encryption are returned.

Parameters

  encryption | encryption protocol namespace
  trustLevels | trust levels of the keys

Returns
  the key owner JIDs mapped to their keys with specific trust levels

## ownKey()

virtual QXmppTask< QByteArray > QXmppTrustStorage::ownKey | ( | const QString & | encryption | ) |

pure virtual

Returns the own key (i.e., the key used by this client instance) for an encryption protocol.

Parameters

  encryption | encryption protocol namespace

Returns
  the ID of the own key

## removeKeys() [1/3]

virtual QXmppTask< void > QXmppTrustStorage::removeKeys | ( | const QString & | encryption | ) |

pure virtual

Removes all keys for encryption.

Parameters

  encryption | encryption protocol namespace

## removeKeys() [2/3]

virtual QXmppTask< void > QXmppTrustStorage::removeKeys | ( | const QString & | encryption,
|  | const QList< QByteArray > & | keyIds )

pure virtual

Removes keys.

Parameters

  encryption | encryption protocol namespace
  keyIds | IDs of the keys

## removeKeys() [3/3]

virtual QXmppTask< void > QXmppTrustStorage::removeKeys | ( | const QString & | encryption,
|  | const QString & | keyOwnerJid )

pure virtual

Removes all keys of a key owner.

Parameters

  encryption | encryption protocol namespace
  keyOwnerJid | key owner's bare JID

## resetAll()

virtual QXmppTask< void > QXmppTrustStorage::resetAll | ( | const QString & | encryption | ) |

pure virtual

Resets all data for encryption.

Parameters

  encryption | encryption protocol namespace

## resetOwnKey()

virtual QXmppTask< void > QXmppTrustStorage::resetOwnKey | ( | const QString & | encryption | ) |

pure virtual

Resets the own key (i.e., the key used by this client instance) for an encryption protocol.

Parameters

  encryption | encryption protocol namespace

## resetSecurityPolicy()

virtual QXmppTask< void > QXmppTrustStorage::resetSecurityPolicy | ( | const QString & | encryption | ) |

pure virtual

Resets the security policy for an encryption protocol.

Parameters

  encryption | encryption protocol namespace

## securityPolicy()

virtual QXmppTask< QXmpp::TrustSecurityPolicy > QXmppTrustStorage::securityPolicy | ( | const QString & | encryption | ) |

pure virtual

Returns the security policy for an encryption protocol.

Parameters

  encryption | encryption protocol namespace

Returns
  the set security policy

## setOwnKey()

virtual QXmppTask< void > QXmppTrustStorage::setOwnKey | ( | const QString & | encryption,
|  | const QByteArray & | keyId )

pure virtual

Sets the own key (i.e., the key used by this client instance) for an encryption protocol.

Parameters

  encryption | encryption protocol namespace
  keyId | ID of the key

## setSecurityPolicy()

virtual QXmppTask< void > QXmppTrustStorage::setSecurityPolicy | ( | const QString & | encryption,
|  | QXmpp::TrustSecurityPolicy | securityPolicy )

pure virtual

Sets the security policy for an encryption protocol.

Parameters

  encryption | encryption protocol namespace
  securityPolicy | security policy being applied

## setTrustLevel() [1/2]

virtual QXmppTask< QHash< QString, QMultiHash< QString, QByteArray > > > QXmppTrustStorage::setTrustLevel | ( | const QString & | encryption,
|  | const QList< QString > & | keyOwnerJids,
|  | QXmpp::TrustLevel | oldTrustLevel,
|  | QXmpp::TrustLevel | newTrustLevel )

pure virtual

Sets the trust level of keys specified by their key owner and trust level.

Parameters

  encryption | encryption protocol namespace
  keyOwnerJids | key owners' bare JIDs
  oldTrustLevel | trust level being changed
  newTrustLevel | trust level being set

Returns
  the key owner JIDs mapped to their modified keys for specific encryption protocols

## setTrustLevel() [2/2]

virtual QXmppTask< QHash< QString, QMultiHash< QString, QByteArray > > > QXmppTrustStorage::setTrustLevel | ( | const QString & | encryption,
|  | const QMultiHash< QString, QByteArray > & | keyIds,
|  | QXmpp::TrustLevel | trustLevel )

pure virtual

Sets the trust level of keys.

If a key is not stored, it is added to the storage.

Parameters

  encryption | encryption protocol namespace
  keyIds | key owners' bare JIDs mapped to the IDs of their keys
  trustLevel | trust level being set

Returns
  the key owner JIDs mapped to their modified keys for specific encryption protocols

## trustLevel()

virtual QXmppTask< QXmpp::TrustLevel > QXmppTrustStorage::trustLevel | ( | const QString & | encryption,
|  | const QString & | keyOwnerJid,
|  | const QByteArray & | keyId )

pure virtual

Returns the trust level of a key.

If the key is not stored, the trust in that key is undecided.

Parameters

  encryption | encryption protocol namespace
  keyOwnerJid | key owner's bare JID
  keyId | ID of the key

Returns
  the key's trust level

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

- QXmppTrustStorage.h
- QXmppTrustStorage.cpp