QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QXmppTrustStorage Class Referenceabstract

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

Inheritance diagram for QXmppTrustStorage:
Inheritance graph
[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::TrustSecurityPolicysecurityPolicy (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::TrustLeveltrustLevel (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.

Warning
THIS API IS NOT FINALIZED YET!
Since
QXmpp 1.5

Member Function Documentation

◆ addKeys()

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

Adds keys.

Parameters
encryptionencryption protocol namespace
keyOwnerJidkey owner's bare JID
keyIdsIDs of the keys
trustLeveltrust level of the keys

◆ hasKey()

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
encryptionencryption protocol namespace
keyOwnerJidkey owner's bare JID
trustLevelspossible trust levels of the key
Returns
whether a key of the key owner with a passed trust level is stored

◆ keys() [1/2]

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
encryptionencryption protocol namespace
keyOwnerJidskey owners' bare JIDs
trustLevelstrust levels of the keys
Returns
the key IDs mapped to their trust levels for specific key owners

◆ keys() [2/2]

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
encryptionencryption protocol namespace
trustLevelstrust levels of the keys
Returns
the key owner JIDs mapped to their keys with specific trust levels

◆ ownKey()

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
encryptionencryption protocol namespace
Returns
the ID of the own key

◆ removeKeys() [1/3]

QXmppTrustStorage::removeKeys ( const QString &  encryption)
pure virtual

Removes all keys for encryption.

Parameters
encryptionencryption protocol namespace

◆ removeKeys() [2/3]

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

Removes keys.

Parameters
encryptionencryption protocol namespace
keyIdsIDs of the keys

◆ removeKeys() [3/3]

QXmppTrustStorage::removeKeys ( const QString &  encryption,
const QString &  keyOwnerJid 
)
pure virtual

Removes all keys of a key owner.

Parameters
encryptionencryption protocol namespace
keyOwnerJidkey owner's bare JID

◆ resetAll()

QXmppTrustStorage::resetAll ( const QString &  encryption)
pure virtual

Resets all data for encryption.

Parameters
encryptionencryption protocol namespace

◆ resetOwnKey()

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
encryptionencryption protocol namespace

◆ resetSecurityPolicy()

QXmppTrustStorage::resetSecurityPolicy ( const QString &  encryption)
pure virtual

Resets the security policy for an encryption protocol.

Parameters
encryptionencryption protocol namespace

◆ securityPolicy()

QXmppTrustStorage::securityPolicy ( const QString &  encryption)
pure virtual

Returns the security policy for an encryption protocol.

Parameters
encryptionencryption protocol namespace
Returns
the set security policy

◆ setOwnKey()

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
encryptionencryption protocol namespace
keyIdID of the key

◆ setSecurityPolicy()

QXmppTrustStorage::setSecurityPolicy ( const QString &  encryption,
QXmpp::TrustSecurityPolicy  securityPolicy 
)
pure virtual

Sets the security policy for an encryption protocol.

Parameters
encryptionencryption protocol namespace
securityPolicysecurity policy being applied

◆ setTrustLevel() [1/2]

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
encryptionencryption protocol namespace
keyOwnerJidskey owners' bare JIDs
oldTrustLeveltrust level being changed
newTrustLeveltrust level being set
Returns
the key owner JIDs mapped to their modified keys for specific encryption protocols

◆ setTrustLevel() [2/2]

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
encryptionencryption protocol namespace
keyIdskey owners' bare JIDs mapped to the IDs of their keys
trustLeveltrust level being set
Returns
the key owner JIDs mapped to their modified keys for specific encryption protocols

◆ 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
encryptionencryption protocol namespace
keyOwnerJidkey owner's bare JID
keyIdID of the key
Returns
the key's trust level

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