aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-25 22:48:53 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-29 08:21:27 +0200
commit64797165f04a16d290dd27c2f962060b40f85be3 (patch)
treed7a862543711fa5fc7876134612549fce59144cd /lib/connection.h
parentc2e9256b1c334bdadcc208429084cbc83496fb4b (diff)
downloadlibquotient-64797165f04a16d290dd27c2f962060b40f85be3.tar.gz
libquotient-64797165f04a16d290dd27c2f962060b40f85be3.zip
Refactor creation of Megolm sessions in Room
Notably, replace a multi-level hash map with QMultiHash and factor out Room::P::createOlmSession().
Diffstat (limited to 'lib/connection.h')
-rw-r--r--lib/connection.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/connection.h b/lib/connection.h
index 43e285c1..a2824744 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -318,16 +318,16 @@ public:
bool isLoggedIn() const;
#ifdef Quotient_E2EE_ENABLED
QOlmAccount* olmAccount() const;
- Database* database();
+ Database* database() const;
UnorderedMap<QString, QOlmInboundGroupSessionPtr> loadRoomMegolmSessions(
const Room* room);
void saveMegolmSession(const Room* room,
const QOlmInboundGroupSession& session);
bool hasOlmSession(const QString& user, const QString& deviceId) const;
- QOlmOutboundGroupSessionPtr loadCurrentOutboundMegolmSession(Room* room);
- void saveCurrentOutboundMegolmSession(Room *room, const QOlmOutboundGroupSessionPtr& data);
-
+ QOlmOutboundGroupSessionPtr loadCurrentOutboundMegolmSession(
+ const QString& roomId) const;
+ void saveCurrentOutboundMegolmSession(const QString& roomId, const QOlmOutboundGroupSession &session) const;
//This assumes that an olm session with (user, device) exists
std::pair<QOlmMessage::Type, QByteArray> olmEncryptMessage(