diff options
author | Black Hat <bhat@encom.eu.org> | 2019-09-26 22:22:36 -0700 |
---|---|---|
committer | Black Hat <bhat@encom.eu.org> | 2019-09-26 22:22:36 -0700 |
commit | 363cf452bcdbaf6ff1cf94a83ca66cbb31122346 (patch) | |
tree | c64c8fda885e4e1785130e8ee3e7c47fd18cbf67 /lib/csapi/definitions/device_keys.h | |
parent | 412e2cf19449e73aa7da729e9c5de6502687aade (diff) | |
parent | 944653463fe4134c82d85e2d01e2bc0fa43fd727 (diff) | |
download | libquotient-363cf452bcdbaf6ff1cf94a83ca66cbb31122346.tar.gz libquotient-363cf452bcdbaf6ff1cf94a83ca66cbb31122346.zip |
Merge branch 'master' of https://github.com/quotient-im/libQuotient into
bhat-libqtolm-update
Diffstat (limited to 'lib/csapi/definitions/device_keys.h')
-rw-r--r-- | lib/csapi/definitions/device_keys.h | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/lib/csapi/definitions/device_keys.h b/lib/csapi/definitions/device_keys.h index 8ebe1125..d1d8abef 100644 --- a/lib/csapi/definitions/device_keys.h +++ b/lib/csapi/definitions/device_keys.h @@ -8,36 +8,37 @@ #include <QtCore/QHash> -namespace QMatrixClient +namespace Quotient { - // Data structures - - /// Device identity keys - struct DeviceKeys - { - /// The ID of the user the device belongs to. Must match the user ID used - /// when logging in. - QString userId; - /// The ID of the device these keys belong to. Must match the device ID used - /// when logging in. - QString deviceId; - /// The encryption algorithms supported by this device. - QStringList algorithms; - /// Public identity keys. The names of the properties should be in the - /// format ``<algorithm>:<device_id>``. The keys themselves should be - /// encoded as specified by the key algorithm. - QHash<QString, QString> keys; - /// Signatures for the device key object. A map from user ID, to a map from - /// ``<algorithm>:<device_id>`` to the signature. - /// - /// The signature is calculated using the process described at `Signing - /// JSON`_. - QHash<QString, QHash<QString, QString>> signatures; - }; - template <> struct JsonObjectConverter<DeviceKeys> - { - static void dumpTo(QJsonObject& jo, const DeviceKeys& pod); - static void fillFrom(const QJsonObject& jo, DeviceKeys& pod); - }; - -} // namespace QMatrixClient + +// Data structures + +/// Device identity keys +struct DeviceKeys +{ + /// The ID of the user the device belongs to. Must match the user ID + /// usedwhen logging in. + QString userId; + /// The ID of the device these keys belong to. Must match the device ID + /// usedwhen logging in. + QString deviceId; + /// The encryption algorithms supported by this device. + QStringList algorithms; + /// Public identity keys. The names of the properties should be in theformat + /// ``<algorithm>:<device_id>``. The keys themselves should beencoded as + /// specified by the key algorithm. + QHash<QString, QString> keys; + /// Signatures for the device key object. A map from user ID, to a map + /// from``<algorithm>:<device_id>`` to the signature.The signature is + /// calculated using the process described at `SigningJSON`_. + QHash<QString, QHash<QString, QString>> signatures; +}; + +template <> +struct JsonObjectConverter<DeviceKeys> +{ + static void dumpTo(QJsonObject& jo, const DeviceKeys& pod); + static void fillFrom(const QJsonObject& jo, DeviceKeys& pod); +}; + +} // namespace Quotient |