diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-07 14:27:58 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-07 14:27:58 -0700 |
commit | 49dd40797c74d3828b68426c947c1e3300fdf0f5 (patch) | |
tree | c8b9f4e2ee6ab7b618cebf15556981351cc38ab2 /toxcore/Messenger.c | |
parent | eeec99723c3d9f86a904760a36e51bfcbc252717 (diff) | |
parent | f7e14e5c6f47eca06b4a444f0da7f75750d13c59 (diff) |
Merge pull request #564 from nurupo/friendstatus-patch
Removed friendstatus from client-side API, replacing it with alternative functions
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index ff2c31aa..07893e02 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -275,18 +275,20 @@ int m_delfriend(Messenger *m, int friendnumber) | |||
275 | return 0; | 275 | return 0; |
276 | } | 276 | } |
277 | 277 | ||
278 | /* return FRIEND_ONLINE if friend is online. | 278 | int m_get_friend_connectionstatus(Messenger *m, int friendnumber) |
279 | * return FRIEND_CONFIRMED if friend is confirmed. | 279 | { |
280 | * return FRIEND_REQUESTED if the friend request was sent. | 280 | if (friend_not_valid(m, friendnumber)) |
281 | * return FRIEND_ADDED if the friend was added. | 281 | return -1; |
282 | * return NOFRIEND if there is no friend with that number. | 282 | |
283 | */ | 283 | return m->friendlist[friendnumber].status == FRIEND_ONLINE; |
284 | int m_friendstatus(Messenger *m, int friendnumber) | 284 | } |
285 | |||
286 | int m_friend_exists(Messenger *m, int friendnumber) | ||
285 | { | 287 | { |
286 | if (friend_not_valid(m, friendnumber)) | 288 | if (friend_not_valid(m, friendnumber)) |
287 | return NOFRIEND; | 289 | return 0; |
288 | 290 | ||
289 | return m->friendlist[friendnumber].status; | 291 | return m->friendlist[friendnumber].status > NOFRIEND; |
290 | } | 292 | } |
291 | 293 | ||
292 | /* Send a text chat message to an online friend. | 294 | /* Send a text chat message to an online friend. |