From 7258aff5987814c6a106b1e8c4bab975e34b7012 Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 9 Aug 2018 21:34:33 +0300 Subject: Tox: toxcore updated to v0.2.5 --- protocols/Tox/libtox/src/toxcore/tox.api.h | 42 +++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'protocols/Tox/libtox/src/toxcore/tox.api.h') 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,9 +245,16 @@ 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. */ @@ -2299,6 +2306,10 @@ namespace conference { * The invite packet failed to send. */ FAIL_SEND, + /** + * The client is not connected to the conference. + */ + NO_CONNECTION, } @@ -2461,6 +2472,32 @@ 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. * @@ -2469,6 +2506,7 @@ namespace conference { * @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; -- cgit v1.2.3