From 9ecc2aa50e2183e2c4a11861ca6dede7d2151139 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 22 Jun 2015 20:30:38 +0000 Subject: Tox: updated tox core git-svn-id: http://svn.miranda-ng.org/main/trunk@14333 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/bin/x64/libtox.dll | Bin 4055663 -> 4067439 bytes protocols/Tox/bin/x64/libtox.pdb | Bin 642048 -> 642048 bytes protocols/Tox/bin/x86/libtox.dll | Bin 3396719 -> 3411567 bytes protocols/Tox/bin/x86/libtox.pdb | Bin 633856 -> 633856 bytes protocols/Tox/include/tox.h | 37 ++++++++++++++++++++++++++++--------- protocols/Tox/src/tox_options.cpp | 4 ++-- protocols/Tox/src/version.h | 2 +- 7 files changed, 31 insertions(+), 12 deletions(-) (limited to 'protocols') diff --git a/protocols/Tox/bin/x64/libtox.dll b/protocols/Tox/bin/x64/libtox.dll index 3abb8716e9..c634a7335e 100644 Binary files a/protocols/Tox/bin/x64/libtox.dll and b/protocols/Tox/bin/x64/libtox.dll differ diff --git a/protocols/Tox/bin/x64/libtox.pdb b/protocols/Tox/bin/x64/libtox.pdb index 4ca669c229..442b620dcf 100644 Binary files a/protocols/Tox/bin/x64/libtox.pdb and b/protocols/Tox/bin/x64/libtox.pdb differ diff --git a/protocols/Tox/bin/x86/libtox.dll b/protocols/Tox/bin/x86/libtox.dll index 8d982ecbc7..6674c8826c 100644 Binary files a/protocols/Tox/bin/x86/libtox.dll and b/protocols/Tox/bin/x86/libtox.dll differ diff --git a/protocols/Tox/bin/x86/libtox.pdb b/protocols/Tox/bin/x86/libtox.pdb index cb30712975..833326a051 100644 Binary files a/protocols/Tox/bin/x86/libtox.pdb and b/protocols/Tox/bin/x86/libtox.pdb differ diff --git a/protocols/Tox/include/tox.h b/protocols/Tox/include/tox.h index 9a6d3ecf79..f2a27006bc 100644 --- a/protocols/Tox/include/tox.h +++ b/protocols/Tox/include/tox.h @@ -31,6 +31,15 @@ extern "C" { #endif + +/******************************************************************************* + * `tox.h` SHOULD *NOT* BE EDITED MANUALLY – any changes should be made to * + * `tox.in.h`, located in `other/apidsl/`. For instructions on how to * + * generate `tox.h` from `tox.in.h` please refer to `other/apidsl/README.md` * + ******************************************************************************/ + + + /** \page core Public core API for Tox clients. * * Every function that can fail takes a function-specific error code pointer @@ -450,7 +459,15 @@ struct Tox_Options { /** - * The port to use for the TCP server. If 0, the tcp server is disabled. + * The port to use for the TCP server (relay). If 0, the TCP server is + * disabled. + * + * Enabling it is not required for Tox to function properly. + * + * When enabled, your Tox instance can act as a TCP relay for other Tox + * instance. This leads to increased traffic, thus when writing a client + * it is recommended to enable TCP server only if the user has an option + * to disable it. */ uint16_t tcp_port; @@ -608,6 +625,8 @@ typedef enum TOX_ERR_NEW { * NULL, the default options are used. * * @see tox_iterate for the event loop. + * + * @return A new Tox instance pointer on success or NULL on failure. */ Tox *tox_new(const struct Tox_Options *options, TOX_ERR_NEW *error); @@ -676,13 +695,8 @@ typedef enum TOX_ERR_BOOTSTRAP { * Sends a "get nodes" request to the given bootstrap node with IP, port, and * public key to setup connections. * - * This function will attempt to connect to the node using UDP and TCP at the - * same time. - * - * Tox will use the node as a TCP relay in case Tox_Options.udp_enabled was - * false, and also to connect to friends that are in TCP-only mode. Tox will - * also use the TCP connection when NAT hole punching is slow, and later switch - * to UDP if hole punching succeeds. + * This function will attempt to connect to the node using UDP. You must use + * this function even if Tox_Options.udp_enabled was set to false. * * @param address The hostname or IP address (IPv4 or IPv6) of the node. * @param port The port on the host on which the bootstrap Tox instance is @@ -1593,7 +1607,7 @@ enum TOX_FILE_KIND { TOX_FILE_KIND_DATA, /** - * Avatar filename. This consists of tox_hash(image). + * Avatar file_id. This consists of tox_hash(image). * Avatar data. This consists of the image data. * * Avatars can be sent at any time the client wishes. Generally, a client will @@ -1782,6 +1796,11 @@ typedef enum TOX_ERR_FILE_GET { */ TOX_ERR_FILE_GET_OK, + /** + * One of the arguments to the function was NULL when it was not expected. + */ + TOX_ERR_FILE_GET_NULL, + /** * The friend_number passed did not designate a valid friend. */ diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 2396638eca..7376bd02e0 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -81,7 +81,7 @@ void CToxOptionsMain::ProfileCreate_OnClick(CCtrlButton*) return; } } - + if (m_proto->InitToxCore()) { TCHAR *group = m_group.GetText(); @@ -217,7 +217,7 @@ bool CToxOptionsMultimedia::GetDeviceFullName(GUID guid, TCHAR *deviceName, DWOR void CToxOptionsMultimedia::OnInitDialog() { CToxDlgBase::OnInitDialog(); - + DWORD count = 0; TCHAR deviceName[MAX_PATH]; DWORD deviceNameLength = _countof(deviceName); diff --git a/protocols/Tox/src/version.h b/protocols/Tox/src/version.h index 59e0f560ca..89de1791a2 100644 --- a/protocols/Tox/src/version.h +++ b/protocols/Tox/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 11 #define __RELEASE_NUM 1 -#define __BUILD_NUM 8 +#define __BUILD_NUM 9 #include -- cgit v1.2.3