summaryrefslogtreecommitdiff
path: root/toxcore/friend_requests.h
diff options
context:
space:
mode:
authorMarc Schütz <schuetzm@gmx.net>2014-06-10 20:54:48 +0200
committerMarc Schütz <schuetzm@gmx.net>2014-06-10 20:54:48 +0200
commit99d594014014a37fdee9e83575a8895400c9cd60 (patch)
tree55152fcfb850511b17ae2af9c77bf30778b465d2 /toxcore/friend_requests.h
parent8bdf487d199b82db85883b613e86deeba15f9b32 (diff)
Const correctness in various interdependent files
Diffstat (limited to 'toxcore/friend_requests.h')
-rw-r--r--toxcore/friend_requests.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/friend_requests.h b/toxcore/friend_requests.h
index 429ffbad..58ff91ce 100644
--- a/toxcore/friend_requests.h
+++ b/toxcore/friend_requests.h
@@ -30,12 +30,12 @@
30 30
31typedef struct { 31typedef struct {
32 uint32_t nospam; 32 uint32_t nospam;
33 void (*handle_friendrequest)(void *, uint8_t *, uint8_t *, uint16_t, void *); 33 void (*handle_friendrequest)(void *, const uint8_t *, const uint8_t *, uint16_t, void *);
34 uint8_t handle_friendrequest_isset; 34 uint8_t handle_friendrequest_isset;
35 void *handle_friendrequest_object; 35 void *handle_friendrequest_object;
36 void *handle_friendrequest_userdata; 36 void *handle_friendrequest_userdata;
37 37
38 int (*filter_function)(uint8_t *, void *); 38 int (*filter_function)(const uint8_t *, void *);
39 void *filter_function_userdata; 39 void *filter_function_userdata;
40 /* NOTE: The following is just a temporary fix for the multiple friend requests received at the same time problem. 40 /* NOTE: The following is just a temporary fix for the multiple friend requests received at the same time problem.
41 * TODO: Make this better (This will most likely tie in with the way we will handle spam.) 41 * TODO: Make this better (This will most likely tie in with the way we will handle spam.)
@@ -66,14 +66,14 @@ int remove_request_received(Friend_Requests *fr, uint8_t *client_id);
66/* Set the function that will be executed when a friend request for us is received. 66/* Set the function that will be executed when a friend request for us is received.
67 * Function format is function(uint8_t * public_key, uint8_t * data, uint16_t length, void * userdata) 67 * Function format is function(uint8_t * public_key, uint8_t * data, uint16_t length, void * userdata)
68 */ 68 */
69void callback_friendrequest(Friend_Requests *fr, void (*function)(void *, uint8_t *, uint8_t *, uint16_t, void *), 69void callback_friendrequest(Friend_Requests *fr, void (*function)(void *, const uint8_t *, const uint8_t *, uint16_t, void *),
70 void *object, void *userdata); 70 void *object, void *userdata);
71 71
72/* Set the function used to check if a friend request should be displayed to the user or not. 72/* Set the function used to check if a friend request should be displayed to the user or not.
73 * Function format is int function(uint8_t * public_key, void * userdata) 73 * Function format is int function(uint8_t * public_key, void * userdata)
74 * It must return 0 if the request is ok (anything else if it is bad.) 74 * It must return 0 if the request is ok (anything else if it is bad.)
75 */ 75 */
76void set_filter_function(Friend_Requests *fr, int (*function)(uint8_t *, void *), void *userdata); 76void set_filter_function(Friend_Requests *fr, int (*function)(const uint8_t *, void *), void *userdata);
77 77
78/* Sets up friendreq packet handlers. */ 78/* Sets up friendreq packet handlers. */
79void friendreq_init(Friend_Requests *fr, Onion_Client *onion_c); 79void friendreq_init(Friend_Requests *fr, Onion_Client *onion_c);