libQuotient
A Qt library for building matrix clients
room_key_backup.h
Go to the documentation of this file.
1 // THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
2 
3 #pragma once
4 
5 #include <Quotient/csapi/definitions/key_backup_data.h>
6 
7 #include <Quotient/converters.h>
8 
9 namespace Quotient {
10 //! The backed up keys for a room.
11 struct QUOTIENT_API RoomKeyBackup {
12  //! A map of session IDs to key data.
13  QHash<QString, KeyBackupData> sessions;
14 };
15 
16 template <>
17 struct JsonObjectConverter<RoomKeyBackup> {
18  static void dumpTo(QJsonObject& jo, const RoomKeyBackup& pod)
19  {
20  addParam<>(jo, "sessions"_L1, pod.sessions);
21  }
22  static void fillFrom(const QJsonObject& jo, RoomKeyBackup& pod)
23  {
24  fillFromJson(jo.value("sessions"_L1), pod.sessions);
25  }
26 };
27 
28 } // namespace Quotient