libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
device_keys.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/converters.h>
6
7namespace Quotient {
8//! Device identity keys
10 //! The ID of the user the device belongs to. Must match the user ID used
11 //! when logging in.
13
14 //! The ID of the device these keys belong to. Must match the device ID used
15 //! when logging in.
17
18 //! The encryption algorithms supported by this device.
20
21 //! Public identity keys. The names of the properties should be in the
22 //! format `<algorithm>:<device_id>`. The keys themselves should be
23 //! encoded as specified by the key algorithm.
25
26 //! Signatures for the device key object. A map from user ID, to a map from
27 //! `<algorithm>:<device_id>` to the signature.
28 //!
29 //! The signature is calculated using the process described at [Signing
30 //! JSON](/appendices/#signing-json).
32};
33
34template <>
35struct JsonObjectConverter<DeviceKeys> {
36 static void dumpTo(QJsonObject& jo, const DeviceKeys& pod)
37 {
38 addParam(jo, "user_id"_L1, pod.userId);
39 addParam(jo, "device_id"_L1, pod.deviceId);
40 addParam(jo, "algorithms"_L1, pod.algorithms);
41 addParam(jo, "keys"_L1, pod.keys);
42 addParam(jo, "signatures"_L1, pod.signatures);
43 }
44 static void fillFrom(const QJsonObject& jo, DeviceKeys& pod)
45 {
46 fillFromJson(jo.value("user_id"_L1), pod.userId);
47 fillFromJson(jo.value("device_id"_L1), pod.deviceId);
48 fillFromJson(jo.value("algorithms"_L1), pod.algorithms);
49 fillFromJson(jo.value("keys"_L1), pod.keys);
50 fillFromJson(jo.value("signatures"_L1), pod.signatures);
51 }
52};
53
54} // namespace Quotient
#define QUOTIENT_API
QHash< QString, QString > keys
Device identity keys.
Definition device_keys.h:9
QStringList algorithms
The encryption algorithms supported by this device.
Definition device_keys.h:19