diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2013-09-07 16:05:16 -0400 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2013-09-07 16:05:16 -0400 |
commit | f5bf85240045b46a101814caeecc0471b77f06f1 (patch) | |
tree | fe9a46245c2fd711f514e3bc40687063a1f49e39 /toxcore/tox.c | |
parent | eeec99723c3d9f86a904760a36e51bfcbc252717 (diff) |
Removed friendstatus from client API
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 25 |
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 | */ | ||
108 | int 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 | */ |
108 | int tox_friendstatus(void *tox, int friendnumber) | 119 | int 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. |