diff --git a/src/matrix-api.c b/src/matrix-api.c index 4b77fa6..83223cf 100644 --- a/src/matrix-api.c +++ b/src/matrix-api.c @@ -70,6 +70,7 @@ * @api: A #MatrixAPI implementation * @content: the JSON content of the response, as a #JsonNode * @data: User data specified when calling original request function + * @err: a #GError * * A callback function to use with API calls. */ diff --git a/src/matrix-api.h b/src/matrix-api.h index c0b0387..c84c192 100644 --- a/src/matrix-api.h +++ b/src/matrix-api.h @@ -32,7 +32,10 @@ G_BEGIN_DECLS typedef struct _MatrixAPIInterface MatrixAPIInterface; typedef struct _MatrixAPI MatrixAPI; -typedef void (*MatrixAPICallback)(MatrixAPI *api, JsonNode *content, gpointer data); +typedef void (*MatrixAPICallback)(MatrixAPI *api, + JsonNode *content, + gpointer data, + GError **err); struct _MatrixAPIInterface { /*< private >*/ diff --git a/src/matrix-http-api.c b/src/matrix-http-api.c index 49ce725..c23f556 100644 --- a/src/matrix-http-api.c +++ b/src/matrix-http-api.c @@ -376,7 +376,8 @@ response_callback(SoupSession *session, request->callback( MATRIX_API(api), content, - request->callback_data); + request->callback_data, + NULL); } } else { g_debug("Invalid response: %s", data); diff --git a/src/test-client.c b/src/test-client.c index 7cd0a80..cac5651 100644 --- a/src/test-client.c +++ b/src/test-client.c @@ -31,7 +31,7 @@ static GOptionEntry entries[] = { }; static void -login_finished(MatrixAPI *api, JsonNode *content, gpointer data) +login_finished(MatrixAPI *api, JsonNode *content, gpointer data, GError **err) { JsonPath *path = json_path_new(); JsonNode *result;