summaryrefslogtreecommitdiff
path: root/toxcore/tox.h
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-07-21 04:10:05 +0200
committermannol <eniz_vukovic@hotmail.com>2014-07-21 04:10:05 +0200
commit79115259a81dc958041f18573f34299c083cebea (patch)
tree594fbf60dc01e2aa78c775c4e2d9977c5b18752f /toxcore/tox.h
parent2ca2baf120c5dd4dcdd9c450ef35560b0726136f (diff)
parentb63e4ad88fb93820fb740372f36d74c65b8b7b81 (diff)
Fixed conflicts
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r--toxcore/tox.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h
index 5418b03e..14426f31 100644
--- a/toxcore/tox.h
+++ b/toxcore/tox.h
@@ -90,7 +90,7 @@ void tox_get_address(const Tox *tox, uint8_t *address);
90 * data is the data and length is the length. 90 * data is the data and length is the length.
91 * 91 *
92 * return the friend number if success. 92 * return the friend number if success.
93 * return TOX_FA_TOOLONG if message length is too long. 93 * return TOX_FAERR_TOOLONG if message length is too long.
94 * return TOX_FAERR_NOMESSAGE if no message (message length must be >= 1 byte). 94 * return TOX_FAERR_NOMESSAGE if no message (message length must be >= 1 byte).
95 * return TOX_FAERR_OWNKEY if user's own key. 95 * return TOX_FAERR_OWNKEY if user's own key.
96 * return TOX_FAERR_ALREADYSENT if friend request already sent or already a friend. 96 * return TOX_FAERR_ALREADYSENT if friend request already sent or already a friend.
@@ -294,13 +294,13 @@ void tox_callback_friend_request(Tox *tox, void (*function)(Tox *tox, const uint
294 void *), void *userdata); 294 void *), void *userdata);
295 295
296/* Set the function that will be executed when a message from a friend is received. 296/* Set the function that will be executed when a message from a friend is received.
297 * Function format is: function(Tox *tox, int32_t friendnumber, uint8_t * message, uint32_t length, void *userdata) 297 * Function format is: function(Tox *tox, int32_t friendnumber, uint8_t * message, uint16_t length, void *userdata)
298 */ 298 */
299void tox_callback_friend_message(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *), 299void tox_callback_friend_message(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *),
300 void *userdata); 300 void *userdata);
301 301
302/* Set the function that will be executed when an action from a friend is received. 302/* Set the function that will be executed when an action from a friend is received.
303 * Function format is: function(Tox *tox, int32_t friendnumber, uint8_t * action, uint32_t length, void *userdata) 303 * Function format is: function(Tox *tox, int32_t friendnumber, uint8_t * action, uint16_t length, void *userdata)
304 */ 304 */
305void tox_callback_friend_action(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *), 305void tox_callback_friend_action(Tox *tox, void (*function)(Tox *tox, int32_t, const uint8_t *, uint16_t, void *),
306 void *userdata); 306 void *userdata);
@@ -495,20 +495,20 @@ uint32_t tox_get_chatlist(const Tox *tox, int *out_list, uint32_t list_size);
495 * tox_file_data_remaining(...) can be used to know how many bytes are left to send/receive. 495 * tox_file_data_remaining(...) can be used to know how many bytes are left to send/receive.
496 * 496 *
497 * If the connection breaks during file sending (The other person goes offline without pausing the sending and then comes back) 497 * If the connection breaks during file sending (The other person goes offline without pausing the sending and then comes back)
498 * the receiver must send a control packet with receive_send == 0 message_id = TOX_FILECONTROL_RESUME_BROKEN and the data being 498 * the receiver must send a control packet with send_receive == 1 message_id = TOX_FILECONTROL_RESUME_BROKEN and the data being
499 * a uint64_t (in host byte order) containing the number of bytes received. 499 * a uint64_t (in host byte order) containing the number of bytes received.
500 * 500 *
501 * If the sender receives this packet, he must send a control packet with receive_send == 1 and control_type == TOX_FILECONTROL_ACCEPT 501 * If the sender receives this packet, he must send a control packet with send_receive == 0 and control_type == TOX_FILECONTROL_ACCEPT
502 * then he must start sending file data from the position (data , uint64_t in host byte order) received in the TOX_FILECONTROL_RESUME_BROKEN packet. 502 * then he must start sending file data from the position (data , uint64_t in host byte order) received in the TOX_FILECONTROL_RESUME_BROKEN packet.
503 * 503 *
504 * To pause a file transfer send a control packet with control_type == TOX_FILECONTROL_PAUSE. 504 * To pause a file transfer send a control packet with control_type == TOX_FILECONTROL_PAUSE.
505 * To unpause a file transfer send a control packet with control_type == TOX_FILECONTROL_ACCEPT. 505 * To unpause a file transfer send a control packet with control_type == TOX_FILECONTROL_ACCEPT.
506 * 506 *
507 * If you receive a control packet with receive_send == 1 and control_type == TOX_FILECONTROL_PAUSE, you must stop sending filenumber until the other 507 * If you receive a control packet with receive_send == 1 and control_type == TOX_FILECONTROL_PAUSE, you must stop sending filenumber until the other
508 * person sends a control packet with receive_send == 1 and control_type == TOX_FILECONTROL_ACCEPT with the filenumber being a paused filenumber. 508 * person sends a control packet with send_receive == 0 and control_type == TOX_FILECONTROL_ACCEPT with the filenumber being a paused filenumber.
509 * 509 *
510 * If you receive a control packet with receive_send == 0 and control_type == TOX_FILECONTROL_PAUSE, it means the sender of filenumber has paused the 510 * If you receive a control packet with receive_send == 0 and control_type == TOX_FILECONTROL_PAUSE, it means the sender of filenumber has paused the
511 * transfer and will resume it later with a control packet with receive_send == 0 and control_type == TOX_FILECONTROL_ACCEPT for that file number. 511 * transfer and will resume it later with a control packet with send_receive == 1 and control_type == TOX_FILECONTROL_ACCEPT for that file number.
512 * 512 *
513 * More to come... 513 * More to come...
514 */ 514 */