QXmppTrustStorage Class
The QXmppTrustStorage class stores end-to-end encryption trust data. More...
| Header: | #include <QXmppTrustStorage> |
| Since: | QXmpp 1.5 |
| Inherited By: |
Public Functions
| virtual QXmppTask<void> | addKeys(const QString &encryption, const QString &keyOwnerJid, const QList<QByteArray> &keyIds, QXmpp::TrustLevel trustLevel = QXmpp::TrustLevel::AutomaticallyDistrusted) = 0 |
| virtual QXmppTask<bool> | hasKey(const QString &encryption, const QString &keyOwnerJid, QXmpp::TrustLevels trustLevels) = 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<QByteArray> | ownKey(const QString &encryption) = 0 |
| virtual QXmppTask<void> | removeKeys(const QString &encryption) = 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> | resetAll(const QString &encryption) = 0 |
| virtual QXmppTask<void> | resetOwnKey(const QString &encryption) = 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> | setSecurityPolicy(const QString &encryption, QXmpp::TrustSecurityPolicy securityPolicy) = 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 |
Detailed Description
The term "key" is used for a public long-term key.
Member Function Documentation
[pure virtual] QXmppTask<void> QXmppTrustStorage::addKeys(const QString &encryption, const QString &keyOwnerJid, const QList<QByteArray> &keyIds, QXmpp::TrustLevel trustLevel = QXmpp::TrustLevel::AutomaticallyDistrusted)
Adds keys.
encryption is the encryption protocol namespace. keyOwnerJid is the key owner's bare JID. keyIds are the IDs of the keys. trustLevel is the trust level of the keys.
[pure virtual] QXmppTask<bool> QXmppTrustStorage::hasKey(const QString &encryption, const QString &keyOwnerJid, QXmpp::TrustLevels trustLevels)
Returns whether at least one key of the key owner with bare JID keyOwnerJid and one of the possible trust levels trustLevels is stored for the encryption protocol namespace encryption.
[pure virtual] QXmppTask<QHash<QXmpp::TrustLevel, QMultiHash<QString, QByteArray>>> QXmppTrustStorage::keys(const QString &encryption, QXmpp::TrustLevels trustLevels = {})
Returns the JIDs of all key owners mapped to the IDs of their keys with the trust levels trustLevels for the encryption protocol namespace encryption.
If no trust levels are passed, all keys for encryption are returned.
[pure virtual] QXmppTask<QHash<QString, QHash<QByteArray, QXmpp::TrustLevel>>> QXmppTrustStorage::keys(const QString &encryption, const QList<QString> &keyOwnerJids, QXmpp::TrustLevels trustLevels = {})
Returns the IDs of keys mapped to their trust levels for the key owners with bare JIDs keyOwnerJids and the encryption protocol namespace encryption, restricted to the trust levels trustLevels.
If no trust levels are passed, all keys for encryption and keyOwnerJids are returned.
[pure virtual] QXmppTask<QByteArray> QXmppTrustStorage::ownKey(const QString &encryption)
Returns the ID of the own key (i.e., the key used by this client instance) for the encryption protocol namespace encryption.
See also setOwnKey().
[pure virtual] QXmppTask<void> QXmppTrustStorage::removeKeys(const QString &encryption)
Removes all keys for the encryption protocol namespace encryption.
[pure virtual] QXmppTask<void> QXmppTrustStorage::removeKeys(const QString &encryption, const QList<QByteArray> &keyIds)
Removes the keys with IDs keyIds for the encryption protocol namespace encryption.
[pure virtual] QXmppTask<void> QXmppTrustStorage::removeKeys(const QString &encryption, const QString &keyOwnerJid)
Removes all keys of the key owner with bare JID keyOwnerJid for the encryption protocol namespace encryption.
[pure virtual] QXmppTask<void> QXmppTrustStorage::resetAll(const QString &encryption)
Resets all data for the encryption protocol namespace encryption.
[pure virtual] QXmppTask<void> QXmppTrustStorage::resetOwnKey(const QString &encryption)
Resets the own key (i.e., the key used by this client instance) for the encryption protocol namespace encryption.
[pure virtual] QXmppTask<void> QXmppTrustStorage::resetSecurityPolicy(const QString &encryption)
Resets the security policy for the encryption protocol namespace encryption.
[pure virtual] QXmppTask<QXmpp::TrustSecurityPolicy> QXmppTrustStorage::securityPolicy(const QString &encryption)
Returns the security policy for the encryption protocol namespace encryption.
See also setSecurityPolicy().
[pure virtual] QXmppTask<void> QXmppTrustStorage::setOwnKey(const QString &encryption, const QByteArray &keyId)
Sets the own key (i.e., the key used by this client instance) for the encryption protocol namespace encryption to the key with ID keyId.
See also ownKey().
[pure virtual] QXmppTask<void> QXmppTrustStorage::setSecurityPolicy(const QString &encryption, QXmpp::TrustSecurityPolicy securityPolicy)
Sets the security policy securityPolicy for the encryption protocol namespace encryption.
See also securityPolicy().
[pure virtual] QXmppTask<QHash<QString, QMultiHash<QString, QByteArray>>> QXmppTrustStorage::setTrustLevel(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIds, QXmpp::TrustLevel trustLevel)
Sets the trust level trustLevel of keys for the encryption protocol namespace encryption. keyIds maps key owners' bare JIDs to the IDs of their keys.
If a key is not stored, it is added to the storage.
Returns the key owner JIDs mapped to their modified keys for specific encryption protocols.
See also trustLevel().
[pure virtual] QXmppTask<QHash<QString, QMultiHash<QString, QByteArray>>> QXmppTrustStorage::setTrustLevel(const QString &encryption, const QList<QString> &keyOwnerJids, QXmpp::TrustLevel oldTrustLevel, QXmpp::TrustLevel newTrustLevel)
Sets the trust level of keys specified by their key owner and trust level.
encryption is the encryption protocol namespace. keyOwnerJids are the key owners' bare JIDs. oldTrustLevel is the trust level being changed. newTrustLevel is the trust level being set.
Returns the key owner JIDs mapped to their modified keys for specific encryption protocols.
[pure virtual] QXmppTask<QXmpp::TrustLevel> QXmppTrustStorage::trustLevel(const QString &encryption, const QString &keyOwnerJid, const QByteArray &keyId)
Returns the trust level of the key with ID keyId, owned by the JID keyOwnerJid, for the encryption protocol namespace encryption.
If the key is not stored, the trust in that key is undecided.
See also setTrustLevel().