Typing: Changed all return values to int for consistency and the -1 error.

This commit is contained in:
Jman012 2014-02-16 17:06:11 -08:00
parent 00f38c8deb
commit 32afb6b1e4
3 changed files with 4 additions and 4 deletions

View File

@ -632,7 +632,7 @@ int m_set_usertyping(Messenger *m, int friendnumber, uint8_t is_typing)
return 0;
}
uint8_t m_get_istyping(Messenger *m, int friendnumber)
int m_get_istyping(Messenger *m, int friendnumber)
{
if (friend_not_valid(m, friendnumber))
return -1;

View File

@ -417,7 +417,7 @@ int m_set_usertyping(Messenger *m, int friendnumber, uint8_t is_typing);
* returns 0 if friend is not typing.
* returns 1 if friend is typing.
*/
uint8_t m_get_istyping(Messenger *m, int friendnumber);
int m_get_istyping(Messenger *m, int friendnumber);
/* Sets whether we send read receipts for friendnumber.
* This function is not lazy, and it will fail if yesno is not (0 or 1).

View File

@ -279,7 +279,7 @@ TOX_USERSTATUS tox_get_self_user_status(Tox *tox)
int tox_set_user_is_typing(Tox *tox, int friendnumber, uint8_t is_typing)
{
Messenger *m = tox;
return (int)m_set_usertyping(m, friendnumber, is_typing);
return m_set_usertyping(m, friendnumber, is_typing);
}
/* Get the typing status of a friend.
@ -290,7 +290,7 @@ int tox_set_user_is_typing(Tox *tox, int friendnumber, uint8_t is_typing)
int tox_get_is_typing(Tox *tox, int friendnumber)
{
Messenger *m = tox;
return (int)m_get_istyping(m, friendnumber);
return m_get_istyping(m, friendnumber);
}