summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-12-10 09:07:09 -0500
committerirungentoo <irungentoo@gmail.com>2014-12-10 09:07:09 -0500
commit13dd76995f05fd4759c8f639322671536014e14c (patch)
treeb20b7da4f354e4381198bffc3655383b9574cda7
parent4ec9295259fa74b921628195c8028a1b7622ec94 (diff)
Add define for the maximum length of the friend request to the public api.
-rw-r--r--toxcore/tox.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h
index b956a38f..3b72eede 100644
--- a/toxcore/tox.h
+++ b/toxcore/tox.h
@@ -36,6 +36,8 @@ extern "C" {
36/* Maximum length of single messages after which they should be split. */ 36/* Maximum length of single messages after which they should be split. */
37#define TOX_MAX_MESSAGE_LENGTH 1368 37#define TOX_MAX_MESSAGE_LENGTH 1368
38#define TOX_MAX_STATUSMESSAGE_LENGTH 1007 38#define TOX_MAX_STATUSMESSAGE_LENGTH 1007
39#define TOX_MAX_FRIENDREQUEST_LENGTH 1016
40
39#define TOX_CLIENT_ID_SIZE 32 41#define TOX_CLIENT_ID_SIZE 32
40#define TOX_AVATAR_MAX_DATA_LENGTH 16384 42#define TOX_AVATAR_MAX_DATA_LENGTH 16384
41#define TOX_HASH_LENGTH /*crypto_hash_sha256_BYTES*/ 32 43#define TOX_HASH_LENGTH /*crypto_hash_sha256_BYTES*/ 32
@@ -102,7 +104,7 @@ void tox_get_address(const Tox *tox, uint8_t *address);
102/* Add a friend. 104/* Add a friend.
103 * Set the data that will be sent along with friend request. 105 * Set the data that will be sent along with friend request.
104 * address is the address of the friend (returned by getaddress of the friend you wish to add) it must be TOX_FRIEND_ADDRESS_SIZE bytes. TODO: add checksum. 106 * address is the address of the friend (returned by getaddress of the friend you wish to add) it must be TOX_FRIEND_ADDRESS_SIZE bytes. TODO: add checksum.
105 * data is the data and length is the length. 107 * data is the data and length is the length (maximum length of data is TOX_MAX_FRIENDREQUEST_LENGTH).
106 * 108 *
107 * return the friend number if success. 109 * return the friend number if success.
108 * return TOX_FAERR_TOOLONG if message length is too long. 110 * return TOX_FAERR_TOOLONG if message length is too long.