QXmpp: QXmppTrustMemoryStorage.h Source File

QXmpp Version: 1.14.3

Loading...
Searching...
No Matches
QXmppTrustMemoryStorage.h
1// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPTRUSTMEMORYSTORAGE_H
6#define QXMPPTRUSTMEMORYSTORAGE_H
7
8#include "QXmppTrustStorage.h"
9
10#include <memory>
11
12class QXmppTrustMemoryStoragePrivate;
13
14 class QXMPP_EXPORT QXmppTrustMemoryStorage : virtual public QXmppTrustStorage
15{
16public:
17 QXmppTrustMemoryStorage();
18 ~QXmppTrustMemoryStorage();
19
21 QXmppTask<void> setSecurityPolicy(const QString &encryption, QXmpp::TrustSecurityPolicy securityPolicy) override;
22 QXmppTask<void> resetSecurityPolicy(const QString &encryption) override;
23 QXmppTask<QXmpp::TrustSecurityPolicy> securityPolicy(const QString &encryption) override;
24
25 QXmppTask<void> setOwnKey(const QString &encryption, const QByteArray &keyId) override;
26 QXmppTask<void> resetOwnKey(const QString &encryption) override;
27 QXmppTask<QByteArray> ownKey(const QString &encryption) override;
28
29 QXmppTask<void> addKeys(const QString &encryption, const QString &keyOwnerJid, const QList<QByteArray> &keyIds, QXmpp::TrustLevel trustLevel = QXmpp::TrustLevel::AutomaticallyDistrusted) override;
30 QXmppTask<void> removeKeys(const QString &encryption, const QList<QByteArray> &keyIds) override;
31 QXmppTask<void> removeKeys(const QString &encryption, const QString &keyOwnerJid) override;
32 QXmppTask<void> removeKeys(const QString &encryption) override;
33 QXmppTask<QHash<QXmpp::TrustLevel, QMultiHash<QString, QByteArray>>> keys(const QString &encryption, QXmpp::TrustLevels trustLevels = {}) override;
34 QXmppTask<QHash<QString, QHash<QByteArray, QXmpp::TrustLevel>>> keys(const QString &encryption, const QList<QString> &keyOwnerJids, QXmpp::TrustLevels trustLevels = {}) override;
35 QXmppTask<bool> hasKey(const QString &encryption, const QString &keyOwnerJid, QXmpp::TrustLevels trustLevels) override;
36
37 QXmppTask<QHash<QString, QMultiHash<QString, QByteArray>>> setTrustLevel(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIds, QXmpp::TrustLevel trustLevel) override;
38 QXmppTask<QHash<QString, QMultiHash<QString, QByteArray>>> setTrustLevel(const QString &encryption, const QList<QString> &keyOwnerJids, QXmpp::TrustLevel oldTrustLevel, QXmpp::TrustLevel newTrustLevel) override;
39 QXmppTask<QXmpp::TrustLevel> trustLevel(const QString &encryption, const QString &keyOwnerJid, const QByteArray &keyId) override;
40
41 QXmppTask<void> resetAll(const QString &encryption) override;
43
44private:
45 std::unique_ptr<QXmppTrustMemoryStoragePrivate> d;
46};
47
48#endif // QXMPPTRUSTMEMORYSTORAGE_H
QXmppTask
Definition QXmppTask.h:46
QXmppTrustMemoryStorage::QXmppTrustMemoryStorage
QXmppTrustMemoryStorage()
Definition QXmppTrustMemoryStorage.cpp:45
QXmppTrustStorage
The QXmppTrustStorage class stores end-to-end encryption trust data.
Definition QXmppTrustStorage.h:16
QXmppTrustStorage::removeKeys
virtual QXmppTask< void > removeKeys(const QString &encryption, const QList< QByteArray > &keyIds)=0
QXmppTrustStorage::hasKey
virtual QXmppTask< bool > hasKey(const QString &encryption, const QString &keyOwnerJid, QXmpp::TrustLevels trustLevels)=0
QXmppTrustStorage::resetSecurityPolicy
virtual QXmppTask< void > resetSecurityPolicy(const QString &encryption)=0
QXmppTrustStorage::resetAll
virtual QXmppTask< void > resetAll(const QString &encryption)=0
QXmppTrustStorage::setOwnKey
virtual QXmppTask< void > setOwnKey(const QString &encryption, const QByteArray &keyId)=0
QXmppTrustStorage::setTrustLevel
virtual QXmppTask< QHash< QString, QMultiHash< QString, QByteArray > > > setTrustLevel(const QString &encryption, const QMultiHash< QString, QByteArray > &keyIds, QXmpp::TrustLevel trustLevel)=0
QXmppTrustStorage::resetOwnKey
virtual QXmppTask< void > resetOwnKey(const QString &encryption)=0
QXmppTrustStorage::keys
virtual QXmppTask< QHash< QXmpp::TrustLevel, QMultiHash< QString, QByteArray > > > keys(const QString &encryption, QXmpp::TrustLevels trustLevels={})=0
QXmppTrustStorage::securityPolicy
virtual QXmppTask< QXmpp::TrustSecurityPolicy > securityPolicy(const QString &encryption)=0
QXmppTrustStorage::setSecurityPolicy
virtual QXmppTask< void > setSecurityPolicy(const QString &encryption, QXmpp::TrustSecurityPolicy securityPolicy)=0
QXmppTrustStorage::trustLevel
virtual QXmppTask< QXmpp::TrustLevel > trustLevel(const QString &encryption, const QString &keyOwnerJid, const QByteArray &keyId)=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::ownKey
virtual QXmppTask< QByteArray > ownKey(const QString &encryption)=0
QXmpp::TrustLevel
TrustLevel
Definition QXmppTrustLevel.h:19
QXmpp::TrustLevel::AutomaticallyDistrusted
@ AutomaticallyDistrusted
Definition QXmppTrustLevel.h:24
QXmpp::TrustSecurityPolicy
TrustSecurityPolicy
Definition QXmppTrustSecurityPolicy.h:18