aboutsummaryrefslogtreecommitdiffstats
path: root/matrix-api.h
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dave@treblig.org>2017-02-05 18:55:45 +0000
committerDr. David Alan Gilbert <dave@treblig.org>2018-02-25 02:08:49 +0000
commitda5db06e8e057fb4f4e235f0d5322296fc44d953 (patch)
treeace541d527b218135563b34cf65e32be747f2bf7 /matrix-api.h
parentd76c2f707a8a648540e48de6b1452e202b93bdf0 (diff)
downloadpurple-matrix-da5db06e8e057fb4f4e235f0d5322296fc44d953.tar.gz
e2e: Add matrix_api_upload_keys
Add api call for uploading device and one time keys. It expects the json blobs to be presigned. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Diffstat (limited to 'matrix-api.h')
-rw-r--r--matrix-api.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/matrix-api.h b/matrix-api.h
index 089b9b3..763f587 100644
--- a/matrix-api.h
+++ b/matrix-api.h
@@ -362,6 +362,30 @@ MatrixApiRequestData *matrix_api_download_thumb(MatrixConnectionData *conn,
MatrixApiBadResponseCallback bad_response_callback,
gpointer user_data);
+/**
+ * e2e: Upload keys; one or more of the device keys and the one time keys
+ * @param conn The connection with which to make the request
+ * @param device_keys (optional) Json Object with the signed device keys
+ * device_keys gets unreferenced
+ * @param one_time_keys (optional) Json Object with one time key set
+ * one_time_keys gets unreferenced
+ * @param callback Function to be called when the request completes
+ * @param error_callback Function to be called if there is an error making
+ * the request. If NULL, matrix_api_error will be
+ * used.
+ * @param bad_response_callback Function to be called if the API gives a non-200
+ * response. If NULL, matrix_api_bad_response will be
+ * used.
+ * @param user_data Opaque data to be passed to the callbacks
+ *
+ */
+MatrixApiRequestData *matrix_api_upload_keys(MatrixConnectionData *conn,
+ struct _JsonObject *device_keys, struct _JsonObject *one_time_keys,
+ MatrixApiCallback callback,
+ MatrixApiErrorCallback error_callback,
+ MatrixApiBadResponseCallback bad_response_callback,
+ gpointer user_data);
+
#if 0
/**
* Get the current state of a room