summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/tox.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h
index 4920853e..84ba293a 100644
--- a/toxcore/tox.h
+++ b/toxcore/tox.h
@@ -290,32 +290,32 @@ uint32_t tox_get_num_online_friends(const Tox *tox);
290uint32_t tox_get_friendlist(const Tox *tox, int32_t *out_list, uint32_t list_size); 290uint32_t tox_get_friendlist(const Tox *tox, int32_t *out_list, uint32_t list_size);
291 291
292/* Set the function that will be executed when a friend request is received. 292/* Set the function that will be executed when a friend request is received.
293 * Function format is function(Tox *tox, uint8_t * public_key, uint8_t * data, uint16_t length, void *userdata) 293 * Function format is function(Tox *tox, const uint8_t * public_key, const uint8_t * data, uint16_t length, void *userdata)
294 */ 294 */
295void tox_callback_friend_request(Tox *tox, void (*function)(Tox *tox, const uint8_t *, const uint8_t *, uint16_t, 295void tox_callback_friend_request(Tox *tox, void (*function)(Tox *tox, const uint8_t *, const uint8_t *, uint16_t,
296 void *), void *userdata); 296 void *), void *userdata);
297 297
298/* Set the function that will be executed when a message from a friend is received. 298/* Set the function that will be executed when a message from a friend is received.
299 * Function format is: function(Tox *tox, int32_t friendnumber, uint8_t * message, uint16_t length, void *userdata) 299 * Function format is: function(Tox *tox, int32_t friendnumber, const uint8_t * message, uint16_t length, void *userdata)
300 */ 300 */
301void tox_callback_friend_message(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *), 301void tox_callback_friend_message(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *),
302 void *userdata); 302 void *userdata);
303 303
304/* Set the function that will be executed when an action from a friend is received. 304/* Set the function that will be executed when an action from a friend is received.
305 * Function format is: function(Tox *tox, int32_t friendnumber, uint8_t * action, uint16_t length, void *userdata) 305 * Function format is: function(Tox *tox, int32_t friendnumber, const uint8_t * action, uint16_t length, void *userdata)
306 */ 306 */
307void tox_callback_friend_action(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *), 307void tox_callback_friend_action(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *),
308 void *userdata); 308 void *userdata);
309 309
310/* Set the callback for name changes. 310/* Set the callback for name changes.
311 * function(Tox *tox, int32_t friendnumber, uint8_t *newname, uint16_t length, void *userdata) 311 * function(Tox *tox, int32_t friendnumber, const uint8_t *newname, uint16_t length, void *userdata)
312 * You are not responsible for freeing newname 312 * You are not responsible for freeing newname
313 */ 313 */
314void tox_callback_name_change(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *), 314void tox_callback_name_change(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *),
315 void *userdata); 315 void *userdata);
316 316
317/* Set the callback for status message changes. 317/* Set the callback for status message changes.
318 * function(Tox *tox, int32_t friendnumber, uint8_t *newstatus, uint16_t length, void *userdata) 318 * function(Tox *tox, int32_t friendnumber, const uint8_t *newstatus, uint16_t length, void *userdata)
319 * You are not responsible for freeing newstatus. 319 * You are not responsible for freeing newstatus.
320 */ 320 */
321void tox_callback_status_message(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *), 321void tox_callback_status_message(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *),
@@ -419,7 +419,7 @@ int tox_send_lossless_packet(const Tox *tox, int32_t friendnumber, const uint8_t
419 419
420/* Set the callback for group invites. 420/* Set the callback for group invites.
421 * 421 *
422 * Function(Tox *tox, int32_t friendnumber, uint8_t *data, uint16_t length, void *userdata) 422 * Function(Tox *tox, int32_t friendnumber, const uint8_t *data, uint16_t length, void *userdata)
423 * 423 *
424 * data of length is what needs to be passed to join_groupchat(). 424 * data of length is what needs to be passed to join_groupchat().
425 */ 425 */
@@ -428,14 +428,14 @@ void tox_callback_group_invite(Tox *tox, void (*function)(Tox *tox, int32_t, con
428 428
429/* Set the callback for group messages. 429/* Set the callback for group messages.
430 * 430 *
431 * Function(Tox *tox, int groupnumber, int peernumber, uint8_t * message, uint16_t length, void *userdata) 431 * Function(Tox *tox, int groupnumber, int peernumber, const uint8_t * message, uint16_t length, void *userdata)
432 */ 432 */
433void tox_callback_group_message(Tox *tox, void (*function)(Tox *tox, int, int, const uint8_t *, uint16_t, void *), 433void tox_callback_group_message(Tox *tox, void (*function)(Tox *tox, int, int, const uint8_t *, uint16_t, void *),
434 void *userdata); 434 void *userdata);
435 435
436/* Set the callback for group actions. 436/* Set the callback for group actions.
437 * 437 *
438 * Function(Tox *tox, int groupnumber, int peernumber, uint8_t * action, uint16_t length, void *userdata) 438 * Function(Tox *tox, int groupnumber, int peernumber, const uint8_t * action, uint16_t length, void *userdata)
439 */ 439 */
440void tox_callback_group_action(Tox *tox, void (*function)(Tox *tox, int, int, const uint8_t *, uint16_t, void *), 440void tox_callback_group_action(Tox *tox, void (*function)(Tox *tox, int, int, const uint8_t *, uint16_t, void *),
441 void *userdata); 441 void *userdata);
@@ -724,7 +724,7 @@ enum {
724}; 724};
725/* Set the callback for file send requests. 725/* Set the callback for file send requests.
726 * 726 *
727 * Function(Tox *tox, int32_t friendnumber, uint8_t filenumber, uint64_t filesize, uint8_t *filename, uint16_t filename_length, void *userdata) 727 * Function(Tox *tox, int32_t friendnumber, uint8_t filenumber, uint64_t filesize, const uint8_t *filename, uint16_t filename_length, void *userdata)
728 */ 728 */
729void tox_callback_file_send_request(Tox *tox, void (*function)(Tox *m, int32_t, uint8_t, uint64_t, const uint8_t *, 729void tox_callback_file_send_request(Tox *tox, void (*function)(Tox *m, int32_t, uint8_t, uint64_t, const uint8_t *,
730 uint16_t, void *), void *userdata); 730 uint16_t, void *), void *userdata);
@@ -734,7 +734,7 @@ void tox_callback_file_send_request(Tox *tox, void (*function)(Tox *m, int32_t,
734 * receive_send is 1 if the message is for a slot on which we are currently sending a file and 0 if the message 734 * receive_send is 1 if the message is for a slot on which we are currently sending a file and 0 if the message
735 * is for a slot on which we are receiving the file 735 * is for a slot on which we are receiving the file
736 * 736 *
737 * Function(Tox *tox, int32_t friendnumber, uint8_t receive_send, uint8_t filenumber, uint8_t control_type, uint8_t *data, uint16_t length, void *userdata) 737 * Function(Tox *tox, int32_t friendnumber, uint8_t receive_send, uint8_t filenumber, uint8_t control_type, const uint8_t *data, uint16_t length, void *userdata)
738 * 738 *
739 */ 739 */
740void tox_callback_file_control(Tox *tox, void (*function)(Tox *m, int32_t, uint8_t, uint8_t, uint8_t, const uint8_t *, 740void tox_callback_file_control(Tox *tox, void (*function)(Tox *m, int32_t, uint8_t, uint8_t, uint8_t, const uint8_t *,
@@ -742,7 +742,7 @@ void tox_callback_file_control(Tox *tox, void (*function)(Tox *m, int32_t, uint8
742 742
743/* Set the callback for file data. 743/* Set the callback for file data.
744 * 744 *
745 * Function(Tox *tox, int32_t friendnumber, uint8_t filenumber, uint8_t *data, uint16_t length, void *userdata) 745 * Function(Tox *tox, int32_t friendnumber, uint8_t filenumber, const uint8_t *data, uint16_t length, void *userdata)
746 * 746 *
747 */ 747 */
748void tox_callback_file_data(Tox *tox, void (*function)(Tox *m, int32_t, uint8_t, const uint8_t *, uint16_t length, 748void tox_callback_file_data(Tox *tox, void (*function)(Tox *m, int32_t, uint8_t, const uint8_t *, uint16_t length,