mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
use bool in is typing callback.
This commit is contained in:
parent
52a0753e52
commit
308cf5da6d
|
@ -929,7 +929,7 @@ void m_callback_userstatus(Messenger *m, void (*function)(Messenger *m, uint32_t
|
||||||
m->friend_userstatuschange_userdata = userdata;
|
m->friend_userstatuschange_userdata = userdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, uint32_t, uint8_t, void *), void *userdata)
|
void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, uint32_t, _Bool, void *), void *userdata)
|
||||||
{
|
{
|
||||||
m->friend_typingchange = function;
|
m->friend_typingchange = function;
|
||||||
m->friend_typingchange_userdata = userdata;
|
m->friend_typingchange_userdata = userdata;
|
||||||
|
@ -2043,7 +2043,7 @@ static int handle_packet(void *object, int i, uint8_t *temp, uint16_t len)
|
||||||
if (data_length != 1)
|
if (data_length != 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
uint8_t typing = data[0];
|
_Bool typing = !!data[0];
|
||||||
|
|
||||||
set_friend_typing(m, i, typing);
|
set_friend_typing(m, i, typing);
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,7 @@ struct Messenger {
|
||||||
void *friend_statusmessagechange_userdata;
|
void *friend_statusmessagechange_userdata;
|
||||||
void (*friend_userstatuschange)(struct Messenger *m, uint32_t, uint8_t, void *);
|
void (*friend_userstatuschange)(struct Messenger *m, uint32_t, uint8_t, void *);
|
||||||
void *friend_userstatuschange_userdata;
|
void *friend_userstatuschange_userdata;
|
||||||
void (*friend_typingchange)(struct Messenger *m, uint32_t, uint8_t, void *);
|
void (*friend_typingchange)(struct Messenger *m, uint32_t, _Bool, void *);
|
||||||
void *friend_typingchange_userdata;
|
void *friend_typingchange_userdata;
|
||||||
void (*read_receipt)(struct Messenger *m, uint32_t, uint32_t, void *);
|
void (*read_receipt)(struct Messenger *m, uint32_t, uint32_t, void *);
|
||||||
void *read_receipt_userdata;
|
void *read_receipt_userdata;
|
||||||
|
@ -664,7 +664,7 @@ void m_callback_userstatus(Messenger *m, void (*function)(Messenger *m, uint32_t
|
||||||
/* Set the callback for typing changes.
|
/* Set the callback for typing changes.
|
||||||
* Function(uint32_t friendnumber, uint8_t is_typing)
|
* Function(uint32_t friendnumber, uint8_t is_typing)
|
||||||
*/
|
*/
|
||||||
void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, uint32_t, uint8_t, void *), void *userdata);
|
void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, uint32_t, _Bool, void *), void *userdata);
|
||||||
|
|
||||||
/* Set the callback for read receipts.
|
/* Set the callback for read receipts.
|
||||||
* Function(uint32_t friendnumber, uint32_t receipt)
|
* Function(uint32_t friendnumber, uint32_t receipt)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user