From f5bf85240045b46a101814caeecc0471b77f06f1 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Sat, 7 Sep 2013 16:05:16 -0400 Subject: Removed friendstatus from client API --- toxcore/tox.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'toxcore/tox.c') diff --git a/toxcore/tox.c b/toxcore/tox.c index 0af07ede..83b19e9b 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c @@ -99,16 +99,27 @@ int tox_delfriend(void *tox, int friendnumber) return m_delfriend(m, friendnumber); } -/* return 4 if friend is online. - * return 3 if friend is confirmed. - * return 2 if the friend request was sent. - * return 1 if the friend was added. - * return 0 if there is no friend with that number. +/* Checks friend's connecting status. + * + * return 1 if friend is connected to us (Online). + * return 0 if friend is not connected to us (Offline). + * return -1 on failure. + */ +int tox_get_friend_connectionstatus(void *tox, int friendnumber) +{ + Messenger *m = tox; + return m_get_friend_connectionstatus(m, friendnumber); +} + +/* Checks if there exists a friend with given friendnumber. + * + * return 1 if friend exists. + * return 0 if friend doesn't exist. */ -int tox_friendstatus(void *tox, int friendnumber) +int tox_friend_exists(void *tox, int friendnumber) { Messenger *m = tox; - return m_friendstatus(m, friendnumber); + return m_friend_exists(m, friendnumber); } /* Send a text chat message to an online friend. -- cgit v1.2.3