aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppAtmTrustMemoryStorage.h
blob: cb1a481b83131c390048b554f58e56cf1d5d30fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-FileCopyrightText: 2022 Melvin Keskin <melvo@olomono.de>
//
// SPDX-License-Identifier: LGPL-2.1-or-later

#ifndef QXMPPATMTRUSTMEMORYSTORAGE_H
#define QXMPPATMTRUSTMEMORYSTORAGE_H

#include "QXmppAtmTrustStorage.h"
#include "QXmppTrustMemoryStorage.h"

class QXmppAtmTrustMemoryStoragePrivate;

class QXMPP_EXPORT QXmppAtmTrustMemoryStorage : virtual public QXmppAtmTrustStorage, public QXmppTrustMemoryStorage
{
public:
    QXmppAtmTrustMemoryStorage();
    ~QXmppAtmTrustMemoryStorage();

    /// \cond
    QXmppTask<void> addKeysForPostponedTrustDecisions(const QString &encryption, const QByteArray &senderKeyId, const QList<QXmppTrustMessageKeyOwner> &keyOwners) override;
    QXmppTask<void> removeKeysForPostponedTrustDecisions(const QString &encryption, const QList<QByteArray> &keyIdsForAuthentication, const QList<QByteArray> &keyIdsForDistrusting) override;
    QXmppTask<void> removeKeysForPostponedTrustDecisions(const QString &encryption, const QList<QByteArray> &senderKeyIds) override;
    QXmppTask<void> removeKeysForPostponedTrustDecisions(const QString &encryption) override;
    QXmppTask<QHash<bool, QMultiHash<QString, QByteArray>>> keysForPostponedTrustDecisions(const QString &encryption, const QList<QByteArray> &senderKeyIds = {}) override;

    QXmppTask<void> resetAll(const QString &encryption) override;
    /// \endcond

private:
    const std::unique_ptr<QXmppAtmTrustMemoryStoragePrivate> d;
};

#endif  // QXMPPATMTRUSTMEMORYSTORAGE_H