diff options
author | aunsane <aunsane@gmail.com> | 2018-08-09 21:34:33 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-08-09 21:34:33 +0300 |
commit | 7258aff5987814c6a106b1e8c4bab975e34b7012 (patch) | |
tree | 0effa93c441b72cce1ad7a91bc6ca5a97d2fc5ab /protocols/Tox/libtox/src/toxcore/tox.api.h | |
parent | eab7305c241be4d85b86601ae97b4602935b067e (diff) |
Tox: toxcore updated to v0.2.5
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/tox.api.h')
-rw-r--r-- | protocols/Tox/libtox/src/toxcore/tox.api.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/tox.api.h b/protocols/Tox/libtox/src/toxcore/tox.api.h index 97a85312b4..243606410c 100644 --- a/protocols/Tox/libtox/src/toxcore/tox.api.h +++ b/protocols/Tox/libtox/src/toxcore/tox.api.h @@ -182,7 +182,7 @@ const VERSION_MINOR = 2; * The patch or revision number. Incremented when bugfixes are applied without * changing any functionality or API or ABI. */ -const VERSION_PATCH = 4; +const VERSION_PATCH = 5; /** * A macro to check at preprocessing time whether the client code is compatible @@ -245,10 +245,17 @@ const SECRET_KEY_SIZE = 32; /** * The size of a Tox Conference unique id in bytes. + * + * @deprecated Use $CONFERENCE_ID_SIZE instead. */ const CONFERENCE_UID_SIZE = 32; /** + * The size of a Tox Conference unique id in bytes. + */ +const CONFERENCE_ID_SIZE = 32; + +/** * The size of the nospam in bytes when written in a Tox address. */ const NOSPAM_SIZE = sizeof(uint32_t); @@ -2299,6 +2306,10 @@ namespace conference { * The invite packet failed to send. */ FAIL_SEND, + /** + * The client is not connected to the conference. + */ + NO_CONNECTION, } @@ -2464,11 +2475,38 @@ namespace conference { /** * Get the conference unique ID. * + * If id is NULL, this function has no effect. + * + * @param id A memory region large enough to store $CONFERENCE_ID_SIZE bytes. + * + * @return true on success. + */ + const bool get_id(uint32_t conference_number, uint8_t[CONFERENCE_ID_SIZE] id); + + /** + * Return the conference number associated with the specified id. + * + * @param id A byte array containing the conference id ($CONFERENCE_ID_SIZE). + * + * @return the conference number on success, an unspecified value on failure. + */ + const uint32_t by_id(const uint8_t[CONFERENCE_ID_SIZE] id) { + NULL, + /** + * No conference with the given id exists on the conference list. + */ + NOT_FOUND, + } + + /** + * Get the conference unique ID. + * * If uid is NULL, this function has no effect. * * @param uid A memory region large enough to store $CONFERENCE_UID_SIZE bytes. * * @return true on success. + * @deprecated use $get_id instead (exactly the same function, just renamed). */ const bool get_uid(uint32_t conference_number, uint8_t[CONFERENCE_UID_SIZE] uid); @@ -2478,6 +2516,7 @@ namespace conference { * @param uid A byte array containing the conference id ($CONFERENCE_UID_SIZE). * * @return the conference number on success, an unspecified value on failure. + * @deprecated use $by_id instead (exactly the same function, just renamed). */ const uint32_t by_uid(const uint8_t[CONFERENCE_UID_SIZE] uid) { NULL, @@ -2678,6 +2717,7 @@ typedef TOX_ERR_FILE_SEND_CHUNK Tox_Err_File_Send_Chunk; typedef TOX_ERR_CONFERENCE_NEW Tox_Err_Conference_New; typedef TOX_ERR_CONFERENCE_DELETE Tox_Err_Conference_Delete; typedef TOX_ERR_CONFERENCE_PEER_QUERY Tox_Err_Conference_Peer_Query; +typedef TOX_ERR_CONFERENCE_BY_ID Tox_Err_Conference_By_Id; typedef TOX_ERR_CONFERENCE_BY_UID Tox_Err_Conference_By_Uid; typedef TOX_ERR_CONFERENCE_INVITE Tox_Err_Conference_Invite; typedef TOX_ERR_CONFERENCE_JOIN Tox_Err_Conference_Join; |