aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomkeyevent.h
diff options
context:
space:
mode:
authorAlexey Andreyev <aa13q@ya.ru>2019-08-23 13:23:42 +0300
committerAlexey Andreev <aa13q@ya.ru>2020-02-25 17:27:40 +0300
commit60c0f079f0366e501de6658b5fb56ec905da0c31 (patch)
treeb3dd380efc24449af15a47c1c1206a9960cee343 /lib/events/roomkeyevent.h
parent2de9cb11b4157eebacc3906df79a8d6d4fb43651 (diff)
downloadlibquotient-60c0f079f0366e501de6658b5fb56ec905da0c31.tar.gz
libquotient-60c0f079f0366e501de6658b5fb56ec905da0c31.zip
E2EE: introduce RoomKeyEvent
Signed-off-by: Alexey Andreev <aa13q@ya.ru>
Diffstat (limited to 'lib/events/roomkeyevent.h')
-rw-r--r--lib/events/roomkeyevent.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/events/roomkeyevent.h b/lib/events/roomkeyevent.h
new file mode 100644
index 00000000..e4bcfd71
--- /dev/null
+++ b/lib/events/roomkeyevent.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "event.h"
+
+namespace Quotient {
+class RoomKeyEvent : public Event
+{
+public:
+ DEFINE_EVENT_TYPEID("m.room_key", RoomKeyEvent)
+
+ RoomKeyEvent(const QJsonObject& obj);
+
+ const QString algorithm() const { return _algorithm; }
+ const QString roomId() const { return _roomId; }
+ const QString sessionId() const { return _sessionId; }
+ const QString sessionKey() const { return _sessionKey; }
+
+private:
+ QString _algorithm;
+ QString _roomId;
+ QString _sessionId;
+ QString _sessionKey;
+};
+REGISTER_EVENT_TYPE(RoomKeyEvent)
+} // namespace Quotient