diff options
author | Dr. David Alan Gilbert <dave@treblig.org> | 2016-11-03 02:19:15 +0000 |
---|---|---|
committer | Dr. David Alan Gilbert <dave@treblig.org> | 2016-11-13 17:17:27 +0000 |
commit | 991af2d7984aaf6c23bcb9ab2cc9c36477f0b1b0 (patch) | |
tree | 1cc7b9bca574428393fca0e5b369d62e0c1fe94b /matrix-api.h | |
parent | c64b6d5225c4bcbfa0dd83b28bf7c0db19705e30 (diff) | |
download | purple-matrix-991af2d7984aaf6c23bcb9ab2cc9c36477f0b1b0.tar.gz |
Pass body/len/content_type to completion callback
When a response can't be parsed as JSON pass the body and length
to the callback.
Also add the content_type.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Diffstat (limited to 'matrix-api.h')
-rw-r--r-- | matrix-api.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/matrix-api.h b/matrix-api.h index cdeb134..10ed37b 100644 --- a/matrix-api.h +++ b/matrix-api.h @@ -55,10 +55,17 @@ typedef struct _MatrixApiRequestData MatrixApiRequestData; * @param json_root NULL if there was no body, or it could not be * parsed as JSON; otherwise the root of the JSON * tree in the response + * @param body NULL if the body was parsable as JSON, else the raw + * body. + * @param body_len The length of the body (valid when body is) + * + * @param content_type The content type of the body */ typedef void (*MatrixApiCallback)(MatrixConnectionData *conn, gpointer user_data, - struct _JsonNode *json_root); + struct _JsonNode *json_root, + const char *body, + size_t body_len, const char *content_type); /** * Signature for functions which are called when there is an error calling the |