Loading...
Searching...
No Matches
QXmppTrustStorage.h
// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPTRUSTSTORAGE_H
#define QXMPPTRUSTSTORAGE_H
#include "QXmppGlobal.h"
#include "QXmppTrustLevel.h"
#include "QXmppTrustSecurityPolicy.h"
template<typename T>
class QXmppTask;
class QXMPP_EXPORT QXmppTrustStorage
{
public:
virtual ~QXmppTrustStorage() = default;
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;
};
#endif // QXMPPTRUSTSTORAGE_H
QXmppTask
Definition QXmppTask.h:62
QXmppTrustStorage
The QXmppTrustStorage class stores end-to-end encryption trust data.
Definition QXmppTrustStorage.h:16
QXmppTrustStorage::setTrustLevel
virtual QXmppTask< QHash< QString, QMultiHash< QString, QByteArray > > > setTrustLevel(const QString &encryption, const QList< QString > &keyOwnerJids, QXmpp::TrustLevel oldTrustLevel, QXmpp::TrustLevel newTrustLevel)=0
QXmppTrustStorage::resetAll
virtual QXmppTask< void > resetAll(const QString &encryption)=0
QXmppTrustStorage::removeKeys
virtual QXmppTask< void > removeKeys(const QString &encryption, const QList< QByteArray > &keyIds)=0
QXmppTrustStorage::resetSecurityPolicy
virtual QXmppTask< void > resetSecurityPolicy(const QString &encryption)=0
QXmppTrustStorage::trustLevel
virtual QXmppTask< QXmpp::TrustLevel > trustLevel(const QString &encryption, const QString &keyOwnerJid, const QByteArray &keyId)=0
QXmppTrustStorage::setSecurityPolicy
virtual QXmppTask< void > setSecurityPolicy(const QString &encryption, QXmpp::TrustSecurityPolicy securityPolicy)=0
QXmppTrustStorage::keys
virtual QXmppTask< QHash< QXmpp::TrustLevel, QMultiHash< QString, QByteArray > > > keys(const QString &encryption, QXmpp::TrustLevels trustLevels={})=0
QXmppTrustStorage::removeKeys
virtual QXmppTask< void > removeKeys(const QString &encryption)=0
QXmppTrustStorage::keys
virtual QXmppTask< QHash< QString, QHash< QByteArray, QXmpp::TrustLevel > > > keys(const QString &encryption, const QList< QString > &keyOwnerJids, QXmpp::TrustLevels trustLevels={})=0
QXmppTrustStorage::securityPolicy
virtual QXmppTask< QXmpp::TrustSecurityPolicy > securityPolicy(const QString &encryption)=0
QXmppTrustStorage::ownKey
virtual QXmppTask< QByteArray > ownKey(const QString &encryption)=0
QXmppTrustStorage::setOwnKey
virtual QXmppTask< void > setOwnKey(const QString &encryption, const QByteArray &keyId)=0
QXmppTrustStorage::hasKey
virtual QXmppTask< bool > hasKey(const QString &encryption, const QString &keyOwnerJid, QXmpp::TrustLevels trustLevels)=0
QXmppTrustStorage::addKeys
virtual QXmppTask< void > addKeys(const QString &encryption, const QString &keyOwnerJid, const QList< QByteArray > &keyIds, QXmpp::TrustLevel trustLevel=QXmpp::TrustLevel::AutomaticallyDistrusted)=0
QXmppTrustStorage::setTrustLevel
virtual QXmppTask< QHash< QString, QMultiHash< QString, QByteArray > > > setTrustLevel(const QString &encryption, const QMultiHash< QString, QByteArray > &keyIds, QXmpp::TrustLevel trustLevel)=0
QXmppTrustStorage::removeKeys
virtual QXmppTask< void > removeKeys(const QString &encryption, const QString &keyOwnerJid)=0
QXmppTrustStorage::resetOwnKey
virtual QXmppTask< void > resetOwnKey(const QString &encryption)=0
QXmpp::TrustLevel
TrustLevel
Definition QXmppTrustLevel.h:19
QXmpp::TrustLevel::AutomaticallyDistrusted
@ AutomaticallyDistrusted
QXmpp::TrustSecurityPolicy
TrustSecurityPolicy
Definition QXmppTrustSecurityPolicy.h:18