summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-09-07 14:27:58 -0700
committerirungentoo <irungentoo@gmail.com>2013-09-07 14:27:58 -0700
commit49dd40797c74d3828b68426c947c1e3300fdf0f5 (patch)
treec8b9f4e2ee6ab7b618cebf15556981351cc38ab2 /toxcore/tox.c
parenteeec99723c3d9f86a904760a36e51bfcbc252717 (diff)
parentf7e14e5c6f47eca06b4a444f0da7f75750d13c59 (diff)
Merge pull request #564 from nurupo/friendstatus-patch
Removed friendstatus from client-side API, replacing it with alternative functions
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c25
1 files changed, 18 insertions, 7 deletions
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)
99 return m_delfriend(m, friendnumber); 99 return m_delfriend(m, friendnumber);
100} 100}
101 101
102/* return 4 if friend is online. 102/* Checks friend's connecting status.
103 * return 3 if friend is confirmed. 103 *
104 * return 2 if the friend request was sent. 104 * return 1 if friend is connected to us (Online).
105 * return 1 if the friend was added. 105 * return 0 if friend is not connected to us (Offline).
106 * return 0 if there is no friend with that number. 106 * return -1 on failure.
107 */
108int tox_get_friend_connectionstatus(void *tox, int friendnumber)
109{
110 Messenger *m = tox;
111 return m_get_friend_connectionstatus(m, friendnumber);
112}
113
114/* Checks if there exists a friend with given friendnumber.
115 *
116 * return 1 if friend exists.
117 * return 0 if friend doesn't exist.
107 */ 118 */
108int tox_friendstatus(void *tox, int friendnumber) 119int tox_friend_exists(void *tox, int friendnumber)
109{ 120{
110 Messenger *m = tox; 121 Messenger *m = tox;
111 return m_friendstatus(m, friendnumber); 122 return m_friend_exists(m, friendnumber);
112} 123}
113 124
114/* Send a text chat message to an online friend. 125/* Send a text chat message to an online friend.