From 5babb281c05a48c0b4bbfe3c6be1527f439beec2 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sun, 16 Mar 2014 13:24:39 -0400 Subject: Friend request callback now contains the Tox object. --- toxcore/friend_requests.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'toxcore/friend_requests.h') diff --git a/toxcore/friend_requests.h b/toxcore/friend_requests.h index 732dc4a2..722c7431 100644 --- a/toxcore/friend_requests.h +++ b/toxcore/friend_requests.h @@ -30,8 +30,9 @@ typedef struct { uint32_t nospam; - void (*handle_friendrequest)(uint8_t *, uint8_t *, uint16_t, void *); + void (*handle_friendrequest)(void *, uint8_t *, uint8_t *, uint16_t, void *); uint8_t handle_friendrequest_isset; + void *handle_friendrequest_object; void *handle_friendrequest_userdata; int (*filter_function)(uint8_t *, void *); @@ -57,8 +58,8 @@ uint32_t get_nospam(Friend_Requests *fr); /* Set the function that will be executed when a friend request for us is received. * Function format is function(uint8_t * public_key, uint8_t * data, uint16_t length, void * userdata) */ -void callback_friendrequest(Friend_Requests *fr, void (*function)(uint8_t *, uint8_t *, uint16_t, void *), - void *userdata); +void callback_friendrequest(Friend_Requests *fr, void (*function)(void *, uint8_t *, uint8_t *, uint16_t, void *), + void *object, void *userdata); /* Set the function used to check if a friend request should be displayed to the user or not. * Function format is int function(uint8_t * public_key, void * userdata) -- cgit v1.2.3