summaryrefslogtreecommitdiff
path: root/toxcore/tox.api.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-08 14:28:38 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-07-08 19:13:23 +0000
commit465c9380ea6e18463998fb967a34917a984a5ee8 (patch)
treeb99953dcd7eec490cfd236e27aa3f399bb62aa03 /toxcore/tox.api.h
parent2b49f803959cf47f81d1b49032f7c6f30ccc37f7 (diff)
Clarify the intent of "file kinds" in the API.
Diffstat (limited to 'toxcore/tox.api.h')
-rw-r--r--toxcore/tox.api.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/toxcore/tox.api.h b/toxcore/tox.api.h
index f2c210e1..f3286bc5 100644
--- a/toxcore/tox.api.h
+++ b/toxcore/tox.api.h
@@ -1647,6 +1647,14 @@ static bool hash(uint8_t[HASH_LENGTH] hash, const uint8_t[length] data);
1647 1647
1648namespace file { 1648namespace file {
1649 1649
1650 /**
1651 * A list of pre-defined file kinds. Toxcore itself does not behave
1652 * differently for different file kinds. These are a hint to the client
1653 * telling it what use the sender intended for the file. The `kind` parameter
1654 * in the send function and recv callback are `uint32_t`, not $KIND, because
1655 * clients can invent their own file kind. Unknown file kinds should be
1656 * treated as ${KIND.DATA}.
1657 */
1650 enum KIND { 1658 enum KIND {
1651 /** 1659 /**
1652 * Arbitrary file data. Clients can choose to handle it based on the file name 1660 * Arbitrary file data. Clients can choose to handle it based on the file name
@@ -2031,7 +2039,7 @@ namespace file {
2031 * transfer request. 2039 * transfer request.
2032 * @param file_number The friend-specific file number the data received is 2040 * @param file_number The friend-specific file number the data received is
2033 * associated with. 2041 * associated with.
2034 * @param kind The meaning of the file to be sent. 2042 * @param kind The meaning of the file that was sent.
2035 * @param file_size Size in bytes of the file the client wants to send, 2043 * @param file_size Size in bytes of the file the client wants to send,
2036 * UINT64_MAX if unknown or streaming. 2044 * UINT64_MAX if unknown or streaming.
2037 * @param filename Name of the file. Does not need to be the actual name. This 2045 * @param filename Name of the file. Does not need to be the actual name. This