diff options
Diffstat (limited to 'other/apidsl/tox.in.h')
-rw-r--r-- | other/apidsl/tox.in.h | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/other/apidsl/tox.in.h b/other/apidsl/tox.in.h index 074897ad..806fb76c 100644 --- a/other/apidsl/tox.in.h +++ b/other/apidsl/tox.in.h | |||
@@ -76,6 +76,9 @@ extern "C" { | |||
76 | * enumeration value is outside the valid range of the type. If possible, the | 76 | * enumeration value is outside the valid range of the type. If possible, the |
77 | * function will try to use a sane default, but there will be no error code, | 77 | * function will try to use a sane default, but there will be no error code, |
78 | * and one possible action for the function to take is to have no effect. | 78 | * and one possible action for the function to take is to have no effect. |
79 | * | ||
80 | * Integer constants and the memory layout of publicly exposed structs are not | ||
81 | * part of the ABI. | ||
79 | */ | 82 | */ |
80 | 83 | ||
81 | /** \subsection events Events and callbacks | 84 | /** \subsection events Events and callbacks |
@@ -227,6 +230,10 @@ static namespace version { | |||
227 | * | 230 | * |
228 | * :: Numeric constants | 231 | * :: Numeric constants |
229 | * | 232 | * |
233 | * The values of these are not part of the ABI. Prefer to use the function | ||
234 | * versions of them for code that should remain compatible with future versions | ||
235 | * of toxcore. | ||
236 | * | ||
230 | ******************************************************************************/ | 237 | ******************************************************************************/ |
231 | 238 | ||
232 | 239 | ||
@@ -370,11 +377,11 @@ enum class SAVEDATA_TYPE { | |||
370 | */ | 377 | */ |
371 | NONE, | 378 | NONE, |
372 | /** | 379 | /** |
373 | * Savedata is one that was obtained from ${savedata.get} | 380 | * Savedata is one that was obtained from ${savedata.get}. |
374 | */ | 381 | */ |
375 | TOX_SAVE, | 382 | TOX_SAVE, |
376 | /** | 383 | /** |
377 | * Savedata is a secret key of length ${SECRET_KEY_SIZE} | 384 | * Savedata is a secret key of length $SECRET_KEY_SIZE. |
378 | */ | 385 | */ |
379 | SECRET_KEY, | 386 | SECRET_KEY, |
380 | } | 387 | } |
@@ -382,11 +389,20 @@ enum class SAVEDATA_TYPE { | |||
382 | 389 | ||
383 | static class options { | 390 | static class options { |
384 | /** | 391 | /** |
385 | * This struct contains all the startup options for Tox. You can either allocate | 392 | * This struct contains all the startup options for Tox. You can either |
386 | * this object yourself, and pass it to $default, or call | 393 | * allocate this object yourself, and pass it to $default, or call $new to get |
387 | * $new to get a new default options object. | 394 | * a new default options object. |
395 | * | ||
396 | * If you allocate it yourself, be aware that your binary will rely on the | ||
397 | * memory layout of this struct. In particular, if additional fields are added | ||
398 | * in future versions of the API, code that allocates it itself will become | ||
399 | * incompatible. | ||
400 | * | ||
401 | * The memory layout of this struct (size, alignment, and field order) is not | ||
402 | * part of the ABI. To remain compatible, prefer to use $new to allocate the | ||
403 | * object and accessor functions to set the members. | ||
388 | */ | 404 | */ |
389 | struct this { | 405 | struct this [get, set] { |
390 | /** | 406 | /** |
391 | * The type of socket to create. | 407 | * The type of socket to create. |
392 | * | 408 | * |
@@ -419,7 +435,10 @@ static class options { | |||
419 | * exceed 255 characters, and be in a NUL-terminated C string format | 435 | * exceed 255 characters, and be in a NUL-terminated C string format |
420 | * (255 chars + 1 NUL byte). | 436 | * (255 chars + 1 NUL byte). |
421 | * | 437 | * |
422 | * This member is ignored (it can be NULL) if proxy_type is TOX_PROXY_TYPE_NONE. | 438 | * This member is ignored (it can be NULL) if proxy_type is ${PROXY_TYPE.NONE}. |
439 | * | ||
440 | * The data pointed at by this member is owned by the user, so must | ||
441 | * outlive the options object. | ||
423 | */ | 442 | */ |
424 | string host; | 443 | string host; |
425 | 444 | ||
@@ -427,7 +446,7 @@ static class options { | |||
427 | * The port to use to connect to the proxy server. | 446 | * The port to use to connect to the proxy server. |
428 | * | 447 | * |
429 | * Ports must be in the range (1, 65535). The value is ignored if | 448 | * Ports must be in the range (1, 65535). The value is ignored if |
430 | * proxy_type is TOX_PROXY_TYPE_NONE. | 449 | * proxy_type is ${PROXY_TYPE.NONE}. |
431 | */ | 450 | */ |
432 | uint16_t port; | 451 | uint16_t port; |
433 | } | 452 | } |
@@ -472,6 +491,9 @@ static class options { | |||
472 | 491 | ||
473 | /** | 492 | /** |
474 | * The savedata. | 493 | * The savedata. |
494 | * | ||
495 | * The data pointed at by this member is owned by the user, so must | ||
496 | * outlive the options object. | ||
475 | */ | 497 | */ |
476 | const uint8_t[length] data; | 498 | const uint8_t[length] data; |
477 | 499 | ||
@@ -1567,7 +1589,7 @@ namespace friend { | |||
1567 | * This function is a wrapper to internal message-digest functions. | 1589 | * This function is a wrapper to internal message-digest functions. |
1568 | * | 1590 | * |
1569 | * @param hash A valid memory location the hash data. It must be at least | 1591 | * @param hash A valid memory location the hash data. It must be at least |
1570 | * TOX_HASH_LENGTH bytes in size. | 1592 | * $HASH_LENGTH bytes in size. |
1571 | * @param data Data to be hashed or NULL. | 1593 | * @param data Data to be hashed or NULL. |
1572 | * @param length Size of the data array or 0. | 1594 | * @param length Size of the data array or 0. |
1573 | * | 1595 | * |