diff options
Diffstat (limited to 'lib/database.h')
-rw-r--r-- | lib/database.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/database.h b/lib/database.h index 751ebd1d..30f2f203 100644 --- a/lib/database.h +++ b/lib/database.h @@ -7,9 +7,14 @@ #include <QtSql/QSqlQuery> #include <QtCore/QVector> +#include <QtCore/QHash> + #include "e2ee/e2ee.h" namespace Quotient { +class User; +class Room; + class QUOTIENT_API Database : public QObject { Q_OBJECT @@ -38,6 +43,10 @@ public: QOlmOutboundGroupSessionPtr loadCurrentOutboundMegolmSession(const QString& roomId, const PicklingMode& picklingMode); void saveCurrentOutboundMegolmSession(const QString& roomId, const PicklingMode& picklingMode, const QOlmOutboundGroupSessionPtr& data); + // Returns a map User -> [Device] that have not received key yet + QHash<QString, QStringList> devicesWithoutKey(Room* room, const QString &sessionId); + void setDevicesReceivedKey(const QString& roomId, QHash<User *, QStringList> devices, const QString& sessionId, int index); + private: void migrateTo1(); void migrateTo2(); |