diff options
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r-- | toxcore/tox.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h index fc5ccafc..4cde9455 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -419,9 +419,12 @@ 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, int friendnumber, uint8_t *group_public_key, void *userdata) | 422 | * Function(Tox *tox, int32_t friendnumber, uint8_t *data, uint16_t length, void *userdata) |
423 | * | ||
424 | * data of length is what needs to be passed to join_groupchat(). | ||
423 | */ | 425 | */ |
424 | void tox_callback_group_invite(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, void *), void *userdata); | 426 | void tox_callback_group_invite(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *), |
427 | void *userdata); | ||
425 | 428 | ||
426 | /* Set the callback for group messages. | 429 | /* Set the callback for group messages. |
427 | * | 430 | * |
@@ -479,24 +482,25 @@ int tox_group_peername(const Tox *tox, int groupnumber, int peernumber, uint8_t | |||
479 | */ | 482 | */ |
480 | int tox_invite_friend(Tox *tox, int32_t friendnumber, int groupnumber); | 483 | int tox_invite_friend(Tox *tox, int32_t friendnumber, int groupnumber); |
481 | 484 | ||
482 | /* Join a group (you need to have been invited first.) | 485 | /* Join a group (you need to have been invited first.) using data of length obtained |
486 | * in the group invite callback. | ||
483 | * | 487 | * |
484 | * returns group number on success | 488 | * returns group number on success |
485 | * returns -1 on failure. | 489 | * returns -1 on failure. |
486 | */ | 490 | */ |
487 | int tox_join_groupchat(Tox *tox, int32_t friendnumber, const uint8_t *friend_group_public_key); | 491 | int tox_join_groupchat(Tox *tox, int32_t friendnumber, const uint8_t *data, uint16_t length); |
488 | 492 | ||
489 | /* send a group message | 493 | /* send a group message |
490 | * return 0 on success | 494 | * return 0 on success |
491 | * return -1 on failure | 495 | * return -1 on failure |
492 | */ | 496 | */ |
493 | int tox_group_message_send(Tox *tox, int groupnumber, const uint8_t *message, uint32_t length); | 497 | int tox_group_message_send(Tox *tox, int groupnumber, const uint8_t *message, uint16_t length); |
494 | 498 | ||
495 | /* send a group action | 499 | /* send a group action |
496 | * return 0 on success | 500 | * return 0 on success |
497 | * return -1 on failure | 501 | * return -1 on failure |
498 | */ | 502 | */ |
499 | int tox_group_action_send(Tox *tox, int groupnumber, const uint8_t *action, uint32_t length); | 503 | int tox_group_action_send(Tox *tox, int groupnumber, const uint8_t *action, uint16_t length); |
500 | 504 | ||
501 | /* Return the number of peers in the group chat on success. | 505 | /* Return the number of peers in the group chat on success. |
502 | * return -1 on failure | 506 | * return -1 on failure |