summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index 23ca6572..e55f51ca 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -247,6 +247,17 @@ void tox_set_sends_receipts(void *tox, int friendnumber, int yesno)
247 m_set_sends_receipts(m, friendnumber, yesno); 247 m_set_sends_receipts(m, friendnumber, yesno);
248} 248}
249 249
250/* Allocate and return a list of valid friend id's. List must be freed by the
251 * caller.
252 *
253 * retun 0 if success.
254 * return -1 if failure.
255 */
256int tox_get_friendlist(void *tox, int **out_list, uint32_t *out_list_length)
257{
258 Messenger *m = tox;
259 return get_friendlist(m, out_list, out_list_length);
260}
250 261
251/* Set the function that will be executed when a friend request is received. 262/* Set the function that will be executed when a friend request is received.
252 * Function format is function(uint8_t * public_key, uint8_t * data, uint16_t length) 263 * Function format is function(uint8_t * public_key, uint8_t * data, uint16_t length)