diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-17 20:06:33 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-17 20:06:33 -0400 |
commit | 7c5b98397a85394add318cf897eb5b78703e55ea (patch) | |
tree | 3a30952c38c4a52e726467723b59c58c681a7d2f /toxcore/tox.c | |
parent | 9ce1828facc5e344d9de7bc6900bd378de99a425 (diff) | |
parent | 5a83c1296cee5b0bfaae564896f56d78ae265fbc (diff) |
Merge branch 'group-chat'
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c index 80d64626..4fba360b 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -379,9 +379,9 @@ void tox_callback_group_invite(void *tox, void (*function)(Messenger *tox, int, | |||
379 | } | 379 | } |
380 | /* Set the callback for group messages. | 380 | /* Set the callback for group messages. |
381 | * | 381 | * |
382 | * Function(Tox *tox, int groupnumber, uint8_t * message, uint16_t length, void *userdata) | 382 | * Function(Tox *tox, int groupnumber, int friendgroupnumber, uint8_t * message, uint16_t length, void *userdata) |
383 | */ | 383 | */ |
384 | void tox_callback_group_message(void *tox, void (*function)(Messenger *tox, int, uint8_t *, uint16_t, void *), | 384 | void tox_callback_group_message(void *tox, void (*function)(Messenger *tox, int, int, uint8_t *, uint16_t, void *), |
385 | void *userdata) | 385 | void *userdata) |
386 | { | 386 | { |
387 | Messenger *m = tox; | 387 | Messenger *m = tox; |
@@ -407,6 +407,18 @@ int tox_del_groupchat(void *tox, int groupnumber) | |||
407 | Messenger *m = tox; | 407 | Messenger *m = tox; |
408 | return del_groupchat(m, groupnumber); | 408 | return del_groupchat(m, groupnumber); |
409 | } | 409 | } |
410 | |||
411 | /* Copy the name of peernumber who is in groupnumber to name. | ||
412 | * name must be at least MAX_NICK_BYTES long. | ||
413 | * | ||
414 | * return length of name if success | ||
415 | * return -1 if failure | ||
416 | */ | ||
417 | int tox_group_peername(void *tox, int groupnumber, int peernumber, uint8_t *name) | ||
418 | { | ||
419 | Messenger *m = tox; | ||
420 | return m_group_peername(m, groupnumber, peernumber, name); | ||
421 | } | ||
410 | /* invite friendnumber to groupnumber | 422 | /* invite friendnumber to groupnumber |
411 | * return 0 on success | 423 | * return 0 on success |
412 | * return -1 on failure | 424 | * return -1 on failure |