diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-29 14:07:17 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-29 14:07:17 +0100 |
commit | 74ecb0c4606724edfbe977984e9e9d61aa501851 (patch) | |
tree | 0ce7f9af13213310c30b517444d3ae6f88cd5097 /toxcore/tox.h | |
parent | 8e0eeff79f8cf355221b457bf458765ba1f59537 (diff) |
Update tox.h with constant functions.
These are now generated by apidsl.
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r-- | toxcore/tox.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h index 7838f1cb..bafa9c87 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -232,11 +232,15 @@ bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch); | |||
232 | */ | 232 | */ |
233 | #define TOX_PUBLIC_KEY_SIZE 32 | 233 | #define TOX_PUBLIC_KEY_SIZE 32 |
234 | 234 | ||
235 | uint32_t tox_public_key_size(void); | ||
236 | |||
235 | /** | 237 | /** |
236 | * The size of a Tox Secret Key in bytes. | 238 | * The size of a Tox Secret Key in bytes. |
237 | */ | 239 | */ |
238 | #define TOX_SECRET_KEY_SIZE 32 | 240 | #define TOX_SECRET_KEY_SIZE 32 |
239 | 241 | ||
242 | uint32_t tox_secret_key_size(void); | ||
243 | |||
240 | /** | 244 | /** |
241 | * The size of a Tox address in bytes. Tox addresses are in the format | 245 | * The size of a Tox address in bytes. Tox addresses are in the format |
242 | * [Public Key (TOX_PUBLIC_KEY_SIZE bytes)][nospam (4 bytes)][checksum (2 bytes)]. | 246 | * [Public Key (TOX_PUBLIC_KEY_SIZE bytes)][nospam (4 bytes)][checksum (2 bytes)]. |
@@ -247,46 +251,64 @@ bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch); | |||
247 | */ | 251 | */ |
248 | #define TOX_ADDRESS_SIZE (TOX_PUBLIC_KEY_SIZE + sizeof(uint32_t) + sizeof(uint16_t)) | 252 | #define TOX_ADDRESS_SIZE (TOX_PUBLIC_KEY_SIZE + sizeof(uint32_t) + sizeof(uint16_t)) |
249 | 253 | ||
254 | uint32_t tox_address_size(void); | ||
255 | |||
250 | /** | 256 | /** |
251 | * Maximum length of a nickname in bytes. | 257 | * Maximum length of a nickname in bytes. |
252 | */ | 258 | */ |
253 | #define TOX_MAX_NAME_LENGTH 128 | 259 | #define TOX_MAX_NAME_LENGTH 128 |
254 | 260 | ||
261 | uint32_t tox_max_name_length(void); | ||
262 | |||
255 | /** | 263 | /** |
256 | * Maximum length of a status message in bytes. | 264 | * Maximum length of a status message in bytes. |
257 | */ | 265 | */ |
258 | #define TOX_MAX_STATUS_MESSAGE_LENGTH 1007 | 266 | #define TOX_MAX_STATUS_MESSAGE_LENGTH 1007 |
259 | 267 | ||
268 | uint32_t tox_max_status_message_length(void); | ||
269 | |||
260 | /** | 270 | /** |
261 | * Maximum length of a friend request message in bytes. | 271 | * Maximum length of a friend request message in bytes. |
262 | */ | 272 | */ |
263 | #define TOX_MAX_FRIEND_REQUEST_LENGTH 1016 | 273 | #define TOX_MAX_FRIEND_REQUEST_LENGTH 1016 |
264 | 274 | ||
275 | uint32_t tox_max_friend_request_length(void); | ||
276 | |||
265 | /** | 277 | /** |
266 | * Maximum length of a single message after which it should be split. | 278 | * Maximum length of a single message after which it should be split. |
267 | */ | 279 | */ |
268 | #define TOX_MAX_MESSAGE_LENGTH 1372 | 280 | #define TOX_MAX_MESSAGE_LENGTH 1372 |
269 | 281 | ||
282 | uint32_t tox_max_message_length(void); | ||
283 | |||
270 | /** | 284 | /** |
271 | * Maximum size of custom packets. TODO: should be LENGTH? | 285 | * Maximum size of custom packets. TODO: should be LENGTH? |
272 | */ | 286 | */ |
273 | #define TOX_MAX_CUSTOM_PACKET_SIZE 1373 | 287 | #define TOX_MAX_CUSTOM_PACKET_SIZE 1373 |
274 | 288 | ||
289 | uint32_t tox_max_custom_packet_size(void); | ||
290 | |||
275 | /** | 291 | /** |
276 | * The number of bytes in a hash generated by tox_hash. | 292 | * The number of bytes in a hash generated by tox_hash. |
277 | */ | 293 | */ |
278 | #define TOX_HASH_LENGTH 32 | 294 | #define TOX_HASH_LENGTH 32 |
279 | 295 | ||
296 | uint32_t tox_hash_length(void); | ||
297 | |||
280 | /** | 298 | /** |
281 | * The number of bytes in a file id. | 299 | * The number of bytes in a file id. |
282 | */ | 300 | */ |
283 | #define TOX_FILE_ID_LENGTH 32 | 301 | #define TOX_FILE_ID_LENGTH 32 |
284 | 302 | ||
303 | uint32_t tox_file_id_length(void); | ||
304 | |||
285 | /** | 305 | /** |
286 | * Maximum file name length for file transfers. | 306 | * Maximum file name length for file transfers. |
287 | */ | 307 | */ |
288 | #define TOX_MAX_FILENAME_LENGTH 255 | 308 | #define TOX_MAX_FILENAME_LENGTH 255 |
289 | 309 | ||
310 | uint32_t tox_max_filename_length(void); | ||
311 | |||
290 | 312 | ||
291 | /******************************************************************************* | 313 | /******************************************************************************* |
292 | * | 314 | * |