QXmpp Version: 1.10.0
QXmppOmemoMemoryStorage.h
1// SPDX-FileCopyrightText: 2022 Melvin Keskin <melvo@olomono.de>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPOMEMOMEMORYSTORAGE_H
6#define QXMPPOMEMOMEMORYSTORAGE_H
7
8#include "QXmppOmemoStorage.h"
9#include "QXmppTask.h"
10#include "qxmppomemo_export.h"
11
12#include <memory>
13
14class QXmppOmemoMemoryStoragePrivate;
15
16class QXMPPOMEMO_EXPORT QXmppOmemoMemoryStorage : public QXmppOmemoStorage
17{
18public:
20 ~QXmppOmemoMemoryStorage() override;
21
24
25 QXmppTask<void> setOwnDevice(const std::optional<OwnDevice> &device) override;
26
27 QXmppTask<void> addSignedPreKeyPair(uint32_t keyId, const SignedPreKeyPair &keyPair) override;
28 QXmppTask<void> removeSignedPreKeyPair(uint32_t keyId) override;
29
30 QXmppTask<void> addPreKeyPairs(const QHash<uint32_t, QByteArray> &keyPairs) override;
31 QXmppTask<void> removePreKeyPair(uint32_t keyId) override;
32
33 QXmppTask<void> addDevice(const QString &jid, uint32_t deviceId, const Device &device) override;
34 QXmppTask<void> removeDevice(const QString &jid, uint32_t deviceId) override;
35 QXmppTask<void> removeDevices(const QString &jid) override;
36
37 QXmppTask<void> resetAll() override;
39
40private:
41 std::unique_ptr<QXmppOmemoMemoryStoragePrivate> d;
42};
43
44#endif // QXMPPOMEMOMEMORYSTORAGE_H
The QXmppOmemoMemoryStorage class stores data used by XEP-0384: OMEMO Encryption in the memory.
Definition: QXmppOmemoMemoryStorage.h:17
The QXmppOmemoStorage class stores data used by XEP-0384: OMEMO Encryption.
Definition: QXmppOmemoStorage.h:17
virtual QXmppTask< void > addPreKeyPairs(const QHash< uint32_t, QByteArray > &keyPairs)=0
virtual QXmppTask< void > removeSignedPreKeyPair(uint32_t keyId)=0
virtual QXmppTask< OmemoData > allData()=0
virtual QXmppTask< void > removePreKeyPair(uint32_t keyId)=0
virtual QXmppTask< void > addSignedPreKeyPair(uint32_t keyId, const SignedPreKeyPair &keyPair)=0
virtual QXmppTask< void > addDevice(const QString &jid, uint32_t deviceId, const Device &device)=0
virtual QXmppTask< void > setOwnDevice(const std::optional< OwnDevice > &device)=0
virtual QXmppTask< void > removeDevice(const QString &jid, uint32_t deviceId)=0
virtual QXmppTask< void > removeDevices(const QString &jid)=0
virtual QXmppTask< void > resetAll()=0
Definition: QXmppTask.h:62
Definition: QXmppOmemoStorage.h:70
Definition: QXmppOmemoStorage.h:114