aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/cross_signing.cpp
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2022-10-06 19:27:24 +0200
committern-peugnet <n.peugnet@free.fr>2022-10-06 19:27:24 +0200
commitd911b207f49e936b3e992200796110f0749ed150 (patch)
tree96d20ebb4d074a4c1755e21cb316a52d584daee3 /lib/csapi/cross_signing.cpp
parent8ad8a74152c5701b6ca1f9a00487ba9257a439b4 (diff)
parent56c2f2e2b809b9077393eb617828f33d144f5634 (diff)
downloadlibquotient-d911b207f49e936b3e992200796110f0749ed150.tar.gz
libquotient-d911b207f49e936b3e992200796110f0749ed150.zip
New upstream version 0.7.0
Diffstat (limited to 'lib/csapi/cross_signing.cpp')
-rw-r--r--lib/csapi/cross_signing.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/csapi/cross_signing.cpp b/lib/csapi/cross_signing.cpp
new file mode 100644
index 00000000..83136d71
--- /dev/null
+++ b/lib/csapi/cross_signing.cpp
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#include "cross_signing.h"
+
+using namespace Quotient;
+
+UploadCrossSigningKeysJob::UploadCrossSigningKeysJob(
+ const Omittable<CrossSigningKey>& masterKey,
+ const Omittable<CrossSigningKey>& selfSigningKey,
+ const Omittable<CrossSigningKey>& userSigningKey,
+ const Omittable<AuthenticationData>& auth)
+ : BaseJob(HttpVerb::Post, QStringLiteral("UploadCrossSigningKeysJob"),
+ makePath("/_matrix/client/v3", "/keys/device_signing/upload"))
+{
+ QJsonObject _dataJson;
+ addParam<IfNotEmpty>(_dataJson, QStringLiteral("master_key"), masterKey);
+ addParam<IfNotEmpty>(_dataJson, QStringLiteral("self_signing_key"),
+ selfSigningKey);
+ addParam<IfNotEmpty>(_dataJson, QStringLiteral("user_signing_key"),
+ userSigningKey);
+ addParam<IfNotEmpty>(_dataJson, QStringLiteral("auth"), auth);
+ setRequestData({ _dataJson });
+}
+
+UploadCrossSigningSignaturesJob::UploadCrossSigningSignaturesJob(
+ const QHash<QString, QHash<QString, QJsonObject>>& signatures)
+ : BaseJob(HttpVerb::Post, QStringLiteral("UploadCrossSigningSignaturesJob"),
+ makePath("/_matrix/client/v3", "/keys/signatures/upload"))
+{
+ setRequestData({ toJson(signatures) });
+}