diff options
author | Jin^eLD <jin@mediatomb.cc> | 2013-09-05 00:45:36 +0300 |
---|---|---|
committer | Jin^eLD <jin@mediatomb.cc> | 2013-09-05 01:30:28 +0300 |
commit | b9455efd8430d3578376400f986e62223f1504b3 (patch) | |
tree | afff930b4067b5fb0edf5b3b5963f4a26db434ff /toxcore/tox.c | |
parent | 31f43799e11ea824db79de2458a4ac29e6f22c3d (diff) |
Function for retreiving a list of friend numbers
This should allow clients to sync the Tox friend list with their UI/etc.
lists.
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 11 |
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 | */ | ||
256 | int 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) |