diff options
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c index 5e110cbe..b5e754bb 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -477,6 +477,29 @@ int tox_group_message_send(Tox *tox, int groupnumber, uint8_t *message, uint32_t | |||
477 | return group_message_send(m, groupnumber, message, length); | 477 | return group_message_send(m, groupnumber, message, length); |
478 | } | 478 | } |
479 | 479 | ||
480 | /* Return the number of peers in the group chat on success. | ||
481 | * return -1 on failure | ||
482 | */ | ||
483 | int tox_group_number_peers(Tox *tox, int groupnumber) | ||
484 | { | ||
485 | Messenger *m = tox; | ||
486 | return group_number_peers(m, groupnumber); | ||
487 | } | ||
488 | |||
489 | /* List all the peers in the group chat. | ||
490 | * | ||
491 | * Copies the names of the peers to the name[length][MAX_NICK_BYTES] array. | ||
492 | * | ||
493 | * returns the number of peers on success. | ||
494 | * | ||
495 | * return -1 on failure. | ||
496 | */ | ||
497 | int tox_group_copy_names(Tox *tox, int groupnumber, uint8_t names[][TOX_MAX_NAME_LENGTH], uint16_t length) | ||
498 | { | ||
499 | Messenger *m = tox; | ||
500 | return group_names(m, groupnumber, names, length); | ||
501 | } | ||
502 | |||
480 | /* Return the number of chats in the instance m. | 503 | /* Return the number of chats in the instance m. |
481 | * You should use this to determine how much memory to allocate | 504 | * You should use this to determine how much memory to allocate |
482 | * for copy_chatlist. */ | 505 | * for copy_chatlist. */ |