Add a GError parameter to MatrixAPICallback
This commit is contained in:
parent
6b6b3b8954
commit
e15df6ea2e
@ -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.
|
||||
*/
|
||||
|
@ -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 >*/
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user