diff options
Diffstat (limited to 'toxcore/Messenger.h')
-rw-r--r-- | toxcore/Messenger.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index 78580dc0..81e661e1 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h | |||
@@ -456,6 +456,18 @@ void Messenger_save(Messenger *m, uint8_t *data); | |||
456 | /* Load the messenger from data of size length. */ | 456 | /* Load the messenger from data of size length. */ |
457 | int Messenger_load(Messenger *m, uint8_t *data, uint32_t length); | 457 | int Messenger_load(Messenger *m, uint8_t *data, uint32_t length); |
458 | 458 | ||
459 | /* Return the number of friends in the instance m. | ||
460 | * You should use this to determine how much memory to allocate | ||
461 | * for copy_friendlist. */ | ||
462 | size_t count_friendlist(Messenger *m); | ||
463 | |||
464 | /* Copy a list of valid friend IDs into the array out_list. | ||
465 | * If out_list is NULL, returns -1. | ||
466 | * Otherwise, returns the number of elements copied. | ||
467 | * If the array was too small, the contents | ||
468 | * of out_list will be truncated to list_size. */ | ||
469 | size_t copy_friendlist(Messenger *m, int *out_list, size_t list_size); | ||
470 | |||
459 | /* Allocate and return a list of valid friend id's. List must be freed by the | 471 | /* Allocate and return a list of valid friend id's. List must be freed by the |
460 | * caller. | 472 | * caller. |
461 | * | 473 | * |