QXmpp: QXmppOmemoMemoryStorage.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
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
16 class QXMPPOMEMO_EXPORT QXmppOmemoMemoryStorage : public QXmppOmemoStorage
17{
18public:
19 QXmppOmemoMemoryStorage();
20 ~QXmppOmemoMemoryStorage() override;
21
23 QXmppTask<OmemoData> allData() override;
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
QXmppOmemoMemoryStorage::QXmppOmemoMemoryStorage
QXmppOmemoMemoryStorage()
Definition QXmppOmemoMemoryStorage.cpp:40
QXmppOmemoStorage
The QXmppOmemoStorage class stores data used by XEP-0384: OMEMO Encryption.
Definition QXmppOmemoStorage.h:17
QXmppOmemoStorage::removePreKeyPair
virtual QXmppTask< void > removePreKeyPair(uint32_t keyId)=0
QXmppOmemoStorage::removeDevice
virtual QXmppTask< void > removeDevice(const QString &jid, uint32_t deviceId)=0
QXmppOmemoStorage::addDevice
virtual QXmppTask< void > addDevice(const QString &jid, uint32_t deviceId, const Device &device)=0
QXmppOmemoStorage::setOwnDevice
virtual QXmppTask< void > setOwnDevice(const std::optional< OwnDevice > &device)=0
QXmppOmemoStorage::removeDevices
virtual QXmppTask< void > removeDevices(const QString &jid)=0
QXmppOmemoStorage::addSignedPreKeyPair
virtual QXmppTask< void > addSignedPreKeyPair(uint32_t keyId, const SignedPreKeyPair &keyPair)=0
QXmppOmemoStorage::resetAll
virtual QXmppTask< void > resetAll()=0
QXmppOmemoStorage::removeSignedPreKeyPair
virtual QXmppTask< void > removeSignedPreKeyPair(uint32_t keyId)=0
QXmppOmemoStorage::allData
virtual QXmppTask< OmemoData > allData()=0
QXmppOmemoStorage::addPreKeyPairs
virtual QXmppTask< void > addPreKeyPairs(const QHash< uint32_t, QByteArray > &keyPairs)=0
QXmppTask
Definition QXmppTask.h:46
QXmppOmemoStorage::Device
Definition QXmppOmemoStorage.h:70
QXmppOmemoStorage::SignedPreKeyPair
Definition QXmppOmemoStorage.h:114