summaryrefslogtreecommitdiff
path: root/toxcore/tox.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r--toxcore/tox.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h
index f3118270..447a1146 100644
--- a/toxcore/tox.h
+++ b/toxcore/tox.h
@@ -128,6 +128,13 @@ TOX_USERSTATUS;
128typedef struct Tox Tox; 128typedef struct Tox Tox;
129#endif 129#endif
130 130
131/* NOTE: Strings in Tox are all UTF-8, also the last byte in all strings must be NULL (0).
132 *
133 * The length when passing those strings to the core includes that NULL character.
134 *
135 * If you send non NULL terminated strings Tox will force NULL terminates them when it receives them.
136 */
137
131/* return TOX_FRIEND_ADDRESS_SIZE byte address to give to others. 138/* return TOX_FRIEND_ADDRESS_SIZE byte address to give to others.
132 * format: [client_id (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)] 139 * format: [client_id (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)]
133 */ 140 */
@@ -284,6 +291,9 @@ void tox_set_sends_receipts(Tox *tox, int friendnumber, int yesno);
284 * for copy_friendlist. */ 291 * for copy_friendlist. */
285uint32_t tox_count_friendlist(Tox *tox); 292uint32_t tox_count_friendlist(Tox *tox);
286 293
294/* Return the number of online friends in the instance m. */
295uint32_t tox_get_num_online_friends(Tox *tox);
296
287/* Copy a list of valid friend IDs into the array out_list. 297/* Copy a list of valid friend IDs into the array out_list.
288 * If out_list is NULL, returns 0. 298 * If out_list is NULL, returns 0.
289 * Otherwise, returns the number of elements copied. 299 * Otherwise, returns the number of elements copied.