diff options
author | Dr. David Alan Gilbert <dave@treblig.org> | 2016-08-31 21:21:29 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dave@treblig.org> | 2016-09-03 00:05:09 +0100 |
commit | 511fa3c1e886fd968c6e29fcafd80f840b0b6f51 (patch) | |
tree | d83bb37ae4260d42eeeec8875ac5e60d4e3c18b5 /matrix-api.h | |
parent | 98f3caedf836d06fe2b6b0572447ff5fa77e15de (diff) | |
download | purple-matrix-511fa3c1e886fd968c6e29fcafd80f840b0b6f51.tar.gz |
api: Upload a file
Upload a file to a Matrix server.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Diffstat (limited to 'matrix-api.h')
-rw-r--r-- | matrix-api.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/matrix-api.h b/matrix-api.h index 3cccb3b..cdeb134 100644 --- a/matrix-api.h +++ b/matrix-api.h @@ -227,6 +227,26 @@ MatrixApiRequestData *matrix_api_leave_room(MatrixConnectionData *conn, gpointer user_data); +/** + * Upload a file + * + * @param conn The connection with which to make the request + * @param ctype Content type of file + * @param data Raw data content of file + * @param data_len Length of the data + * @param callback Function to be called when the request completes + * @param user_data Opaque data to be passed to the callback + */ +MatrixApiRequestData *matrix_api_upload_file(MatrixConnectionData *conn, + const gchar *ctype, + const gchar *data, + gsize data_len, + MatrixApiCallback callback, + MatrixApiErrorCallback error_callback, + MatrixApiBadResponseCallback bad_response_callback, + gpointer user_data); + + #if 0 /** * Get the current state of a room |