From 571412f911326a988d0d84019ea6a4ee8b49b17d Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Thu, 10 Oct 2013 22:27:51 -0400 Subject: Added message ids to action messages --- toxcore/tox.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'toxcore/tox.h') diff --git a/toxcore/tox.h b/toxcore/tox.h index db4e6b57..39832073 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -209,7 +209,7 @@ int tox_friend_exists(Tox *tox, int friendnumber); * return the message id if packet was successfully put into the send queue. * return 0 if it was not. * - * You will want to retain the return value, it will be passed to your read receipt callback + * You will want to retain the return value, it will be passed to your read_receipt callback * if one is received. * m_sendmessage_withid will send a message with the id of your choosing, * however we can generate an id for you by calling plain m_sendmessage. @@ -219,10 +219,16 @@ uint32_t tox_sendmessage_withid(Tox *tox, int friendnumber, uint32_t theid, uint /* Send an action to an online friend. * - * return 1 if packet was successfully put into the send queue. + * return the message id if packet was successfully put into the send queue. * return 0 if it was not. + * + * You will want to retain the return value, it will be passed to your read_receipt callback + * if one is received. + * m_sendaction_withid will send an action message with the id of your choosing, + * however we can generate an id for you by calling plain m_sendaction. */ -int tox_sendaction(Tox *tox, int friendnumber, uint8_t *action, uint32_t length); +uint32_t tox_sendaction(Tox *tox, int friendnumber, uint8_t *action, uint32_t length); +uint32_t tox_sendaction_withid(Tox *tox, int friendnumber, uint32_t theid, uint8_t *action, uint32_t length); /* Set friendnumber's nickname. * name must be a string of maximum MAX_NAME_LENGTH length. -- cgit v1.2.3