summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/tox.h
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-08-09 21:34:33 +0300
committeraunsane <aunsane@gmail.com>2018-08-09 21:34:33 +0300
commit7258aff5987814c6a106b1e8c4bab975e34b7012 (patch)
tree0effa93c441b72cce1ad7a91bc6ca5a97d2fc5ab /protocols/Tox/libtox/src/toxcore/tox.h
parenteab7305c241be4d85b86601ae97b4602935b067e (diff)
Tox: toxcore updated to v0.2.5
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/tox.h')
-rw-r--r--protocols/Tox/libtox/src/toxcore/tox.h59
1 files changed, 58 insertions, 1 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/tox.h b/protocols/Tox/libtox/src/toxcore/tox.h
index f8279afeee..2c40389bf6 100644
--- a/protocols/Tox/libtox/src/toxcore/tox.h
+++ b/protocols/Tox/libtox/src/toxcore/tox.h
@@ -183,7 +183,7 @@ uint32_t tox_version_minor(void);
* The patch or revision number. Incremented when bugfixes are applied without
* changing any functionality or API or ABI.
*/
-#define TOX_VERSION_PATCH 4
+#define TOX_VERSION_PATCH 5
uint32_t tox_version_patch(void);
@@ -250,12 +250,21 @@ uint32_t tox_secret_key_size(void);
/**
* The size of a Tox Conference unique id in bytes.
+ *
+ * @deprecated Use TOX_CONFERENCE_ID_SIZE instead.
*/
#define TOX_CONFERENCE_UID_SIZE 32
uint32_t tox_conference_uid_size(void);
/**
+ * The size of a Tox Conference unique id in bytes.
+ */
+#define TOX_CONFERENCE_ID_SIZE 32
+
+uint32_t tox_conference_id_size(void);
+
+/**
* The size of the nospam in bytes when written in a Tox address.
*/
#define TOX_NOSPAM_SIZE (sizeof(uint32_t))
@@ -2604,6 +2613,11 @@ typedef enum TOX_ERR_CONFERENCE_INVITE {
*/
TOX_ERR_CONFERENCE_INVITE_FAIL_SEND,
+ /**
+ * The client is not connected to the conference.
+ */
+ TOX_ERR_CONFERENCE_INVITE_NO_CONNECTION,
+
} TOX_ERR_CONFERENCE_INVITE;
@@ -2817,11 +2831,52 @@ TOX_CONFERENCE_TYPE tox_conference_get_type(const Tox *tox, uint32_t conference_
/**
* Get the conference unique ID.
*
+ * If id is NULL, this function has no effect.
+ *
+ * @param id A memory region large enough to store TOX_CONFERENCE_ID_SIZE bytes.
+ *
+ * @return true on success.
+ */
+bool tox_conference_get_id(const Tox *tox, uint32_t conference_number, uint8_t *id);
+
+typedef enum TOX_ERR_CONFERENCE_BY_ID {
+
+ /**
+ * The function returned successfully.
+ */
+ TOX_ERR_CONFERENCE_BY_ID_OK,
+
+ /**
+ * One of the arguments to the function was NULL when it was not expected.
+ */
+ TOX_ERR_CONFERENCE_BY_ID_NULL,
+
+ /**
+ * No conference with the given id exists on the conference list.
+ */
+ TOX_ERR_CONFERENCE_BY_ID_NOT_FOUND,
+
+} TOX_ERR_CONFERENCE_BY_ID;
+
+
+/**
+ * Return the conference number associated with the specified id.
+ *
+ * @param id A byte array containing the conference id (TOX_CONFERENCE_ID_SIZE).
+ *
+ * @return the conference number on success, an unspecified value on failure.
+ */
+uint32_t tox_conference_by_id(const Tox *tox, const uint8_t *id, TOX_ERR_CONFERENCE_BY_ID *error);
+
+/**
+ * Get the conference unique ID.
+ *
* If uid is NULL, this function has no effect.
*
* @param uid A memory region large enough to store TOX_CONFERENCE_UID_SIZE bytes.
*
* @return true on success.
+ * @deprecated use tox_conference_get_id instead (exactly the same function, just renamed).
*/
bool tox_conference_get_uid(const Tox *tox, uint32_t conference_number, uint8_t *uid);
@@ -2851,6 +2906,7 @@ typedef enum TOX_ERR_CONFERENCE_BY_UID {
* @param uid A byte array containing the conference id (TOX_CONFERENCE_UID_SIZE).
*
* @return the conference number on success, an unspecified value on failure.
+ * @deprecated use tox_conference_by_id instead (exactly the same function, just renamed).
*/
uint32_t tox_conference_by_uid(const Tox *tox, const uint8_t *uid, TOX_ERR_CONFERENCE_BY_UID *error);
@@ -3054,6 +3110,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;