From 4c664fd07a66d03e58845edef2c4cd8dc04b51ba Mon Sep 17 00:00:00 2001 From: Anurag Agarwal Date: Sun, 22 Mar 2015 20:36:44 +0530 Subject: [PATCH] Fixes #1298 --- toxcore/tox.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/toxcore/tox.h b/toxcore/tox.h index a828325fd..e674fc654 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -1776,6 +1776,9 @@ void tox_callback_file_chunk_request(Tox *tox, tox_file_chunk_request_cb *functi /** * The function type for the `file_receive` callback. * + * Maximum filename length is TOX_MAX_FILENAME_LENGTH bytes. The filename should generally just be + * a file name, not a path with directory names. + * * The client should acquire resources to be associated with the file transfer. * Incoming file transfers start in the PAUSED state. After this callback * returns, a transfer can be rejected by sending a TOX_FILE_CONTROL_CANCEL @@ -1786,6 +1789,10 @@ void tox_callback_file_chunk_request(Tox *tox, tox_file_chunk_request_cb *functi * transfer request. * @param file_number The friend-specific file number the data received is * associated with. + * @param kind The meaning of the file to be sent. + * @param file_size Size in bytes of the file about to be received from the client, + * UINT64_MAX if unknown or streaming. + * @param filename_length Size in bytes of the filename. */ typedef void tox_file_recv_cb(Tox *tox, uint32_t friend_number, uint32_t file_number, uint32_t kind, uint64_t file_size, const uint8_t *filename, size_t filename_length, void *user_data);