aboutsummaryrefslogtreecommitdiff
path: root/atm_db.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-08-28 00:20:54 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-18 10:35:30 +0200
commit5bbe04c9ca091a0626f34afe5e3ba2141e2963de (patch)
tree35e76183618fe557b4ded5735fb846e3c6cf3995 /atm_db.h
parentd32b9e93572c5e6999a7323139de38cc1a7197cf (diff)
WIP OMEMO TrustDb/JidDb
Diffstat (limited to 'atm_db.h')
-rw-r--r--atm_db.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/atm_db.h b/atm_db.h
new file mode 100644
index 0000000..0cbc247
--- /dev/null
+++ b/atm_db.h
@@ -0,0 +1,37 @@
+#ifndef ATM_DB_H
+#define ATM_DB_H
+
+#include "jiddb.h"
+#include "trust_db.h"
+#include <QXmppAtmTrustStorage.h>
+#include <QXmppTask.h>
+#include <QXmppTrustMessageKeyOwner.h>
+#include <QByteArray>
+#include <QHash>
+#include <QMultiHash>
+#include <QList>
+#include <QString>
+
+class AtmDb : public TrustDb, virtual public QXmppAtmTrustStorage
+{
+public:
+ AtmDb(const QString &jid, const JidDb &db);
+
+ 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;
+};
+
+#endif