summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index ded2da6d..8f4aef5b 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -132,7 +132,7 @@ int tox_friend_exists(Tox *tox, int friendnumber)
132 * return the message id if packet was successfully put into the send queue. 132 * return the message id if packet was successfully put into the send queue.
133 * return 0 if it was not. 133 * return 0 if it was not.
134 * 134 *
135 * You will want to retain the return value, it will be passed to your read receipt callback 135 * You will want to retain the return value, it will be passed to your read_receipt callback
136 * if one is received. 136 * if one is received.
137 * m_sendmessage_withid will send a message with the id of your choosing, 137 * m_sendmessage_withid will send a message with the id of your choosing,
138 * however we can generate an id for you by calling plain m_sendmessage. 138 * however we can generate an id for you by calling plain m_sendmessage.
@@ -150,15 +150,27 @@ uint32_t tox_sendmessage_withid(Tox *tox, int friendnumber, uint32_t theid, uint
150} 150}
151 151
152/* Send an action to an online friend. 152/* Send an action to an online friend.
153 * return 1 if packet was successfully put into the send queue. 153 *
154 * return the message id if packet was successfully put into the send queue.
154 * return 0 if it was not. 155 * return 0 if it was not.
156 *
157 * You will want to retain the return value, it will be passed to your read_receipt callback
158 * if one is received.
159 * m_sendaction_withid will send an action message with the id of your choosing,
160 * however we can generate an id for you by calling plain m_sendaction.
155 */ 161 */
156int tox_sendaction(Tox *tox, int friendnumber, uint8_t *action, uint32_t length) 162uint32_t tox_sendaction(Tox *tox, int friendnumber, uint8_t *action, uint32_t length)
157{ 163{
158 Messenger *m = tox; 164 Messenger *m = tox;
159 return m_sendaction(m, friendnumber, action, length); 165 return m_sendaction(m, friendnumber, action, length);
160} 166}
161 167
168uint32_t tox_sendaction_withid(Tox *tox, int friendnumber, uint32_t theid, uint8_t *action, uint32_t length)
169{
170 Messenger *m = tox;
171 return m_sendaction_withid(m, friendnumber, theid, action, length);
172}
173
162/* Set friendnumber's nickname. 174/* Set friendnumber's nickname.
163 * name must be a string of maximum MAX_NAME_LENGTH length. 175 * name must be a string of maximum MAX_NAME_LENGTH length.
164 * length must be at least 1 byte. 176 * length must be at least 1 byte.