aboutsummaryrefslogtreecommitdiff
path: root/lib/database.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-08-26 08:34:09 +0200
committerGitHub <noreply@github.com>2022-08-26 08:34:09 +0200
commitb257cf4e38d540a0063f06ebdb51dcd2574cc809 (patch)
tree68e43acc8a0577110c0d03b8d04265622a895a3e /lib/database.h
parent4ad2f6e165a4eb486155eae652e187dc4d6b7d99 (diff)
parent6404b8cd4d57468b810538da04f8017fb13ccc37 (diff)
downloadlibquotient-b257cf4e38d540a0063f06ebdb51dcd2574cc809.tar.gz
libquotient-b257cf4e38d540a0063f06ebdb51dcd2574cc809.zip
Merge #547: Implement device verification
Diffstat (limited to 'lib/database.h')
-rw-r--r--lib/database.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/database.h b/lib/database.h
index 4091d61b..8a133f8e 100644
--- a/lib/database.h
+++ b/lib/database.h
@@ -12,8 +12,6 @@
#include "e2ee/e2ee.h"
namespace Quotient {
-class User;
-class Room;
class QUOTIENT_API Database : public QObject
{
@@ -59,7 +57,8 @@ public:
const QByteArray& pickle);
// Returns a map UserId -> [DeviceId] that have not received key yet
- QMultiHash<QString, QString> devicesWithoutKey(const QString& roomId, QMultiHash<QString, QString> devices,
+ QMultiHash<QString, QString> devicesWithoutKey(
+ const QString& roomId, QMultiHash<QString, QString> devices,
const QString& sessionId);
// 'devices' contains tuples {userId, deviceId, curveKey}
void setDevicesReceivedKey(
@@ -67,12 +66,16 @@ public:
const QVector<std::tuple<QString, QString, QString>>& devices,
const QString& sessionId, int index);
+ bool isSessionVerified(const QString& edKey);
+ void setSessionVerified(const QString& edKeyId);
+
private:
void migrateTo1();
void migrateTo2();
void migrateTo3();
void migrateTo4();
+ void migrateTo5();
QString m_matrixId;
};
-}
+} // namespace Quotient