libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
database.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021 Tobias Fella <fella@posteo.de>
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include <QtCore/QObject>
7#include <QtSql/QSqlQuery>
8#include <QtCore/QVector>
9
10#include <QtCore/QHash>
11
12#include "e2ee/e2ee_common.h"
13
14namespace Quotient {
15
16class QOlmAccount;
17class QOlmSession;
18class QOlmInboundGroupSession;
19class QOlmOutboundGroupSession;
20
22{
23public:
26
27 int version();
29 void commit();
34
37 void clear();
39 const QDateTime& timestamp);
42 const QString& roomId);
45 const QByteArray& senderKey,
49 const QString& eventId, qint64 ts);
51 const QString& sessionId,
55 const QDateTime& timestamp);
60 const QOlmSession& session);
61
62 // Returns a map UserId -> [DeviceId] that have not received key yet
65 const QByteArray& sessionId);
66 // 'devices' contains tuples {userId, deviceId, curveKey}
68 const QString& roomId,
71
75
79
82
85
86private:
87 void migrateTo1();
88 void migrateTo2();
89 void migrateTo3();
90 void migrateTo4();
91 void migrateTo5();
92 void migrateTo6();
93 void migrateTo7();
94 void migrateTo8();
95 void migrateTo9();
96 void migrateTo10();
97
101};
102} // namespace Quotient
#define QUOTIENT_API