diff options
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r-- | toxcore/tox.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h index 4c597250..c52a644f 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -342,6 +342,59 @@ void tox_callback_read_receipt(Tox *tox, void (*function)(Tox *tox, int, uint32_ | |||
342 | */ | 342 | */ |
343 | void tox_callback_connectionstatus(Tox *tox, void (*function)(Tox *tox, int, uint8_t, void *), void *userdata); | 343 | void tox_callback_connectionstatus(Tox *tox, void (*function)(Tox *tox, int, uint8_t, void *), void *userdata); |
344 | 344 | ||
345 | /**********GROUP CHAT FUNCTIONS: WARNING WILL BREAK A LOT************/ | ||
346 | |||
347 | /* Set the callback for group invites. | ||
348 | * | ||
349 | * Function(Tox *tox, int friendnumber, uint8_t *group_public_key, void *userdata) | ||
350 | */ | ||
351 | void tox_callback_group_invite(Tox *tox, void (*function)(Tox *tox, int, uint8_t *, void *), void *userdata); | ||
352 | |||
353 | /* Set the callback for group messages. | ||
354 | * | ||
355 | * Function(Tox *tox, int groupnumber, uint8_t * message, uint16_t length, void *userdata) | ||
356 | */ | ||
357 | void tox_callback_group_message(Tox *tox, void (*function)(Tox *tox, int, uint8_t *, uint16_t, void *), | ||
358 | void *userdata); | ||
359 | |||
360 | /* Creates a new groupchat and puts it in the chats array. | ||
361 | * | ||
362 | * return group number on success. | ||
363 | * return -1 on failure. | ||
364 | */ | ||
365 | int tox_add_groupchat(Tox *tox); | ||
366 | |||
367 | /* Delete a groupchat from the chats array. | ||
368 | * | ||
369 | * return 0 on success. | ||
370 | * return -1 if failure. | ||
371 | */ | ||
372 | int tox_del_groupchat(Tox *tox, int groupnumber); | ||
373 | |||
374 | /* invite friendnumber to groupnumber | ||
375 | * return 0 on success | ||
376 | * return -1 on failure | ||
377 | */ | ||
378 | int tox_invite_friend(Tox *tox, int friendnumber, int groupnumber); | ||
379 | |||
380 | /* Join a group (you need to have been invited first.) | ||
381 | * | ||
382 | * returns group number on success | ||
383 | * returns -1 on failure. | ||
384 | */ | ||
385 | int tox_join_groupchat(Tox *tox, int friendnumber, uint8_t *friend_group_public_key); | ||
386 | |||
387 | |||
388 | /* send a group message | ||
389 | * return 0 on success | ||
390 | * return -1 on failure | ||
391 | */ | ||
392 | int tox_group_message_send(Tox *tox, int groupnumber, uint8_t *message, uint32_t length); | ||
393 | |||
394 | |||
395 | |||
396 | /******************END OF GROUP CHAT FUNCTIONS************************/ | ||
397 | |||
345 | /* | 398 | /* |
346 | * Use these two functions to bootstrap the client. | 399 | * Use these two functions to bootstrap the client. |
347 | */ | 400 | */ |