summaryrefslogtreecommitdiff
path: root/toxcore/tox.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-19 15:03:37 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-23 00:26:56 +0000
commit223745e0782602c780c0d66b0c342750fdbd58db (patch)
tree80911175d24ebe21aceb72abae8c99ed6efe0c86 /toxcore/tox.h
parentc8359c843b3f2a693e5c9ff47e1a9a0f288fa26d (diff)
Add deprecation notices to functions that will go away in v0.3.0.
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r--toxcore/tox.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h
index 3dac6770..f2e746c8 100644
--- a/toxcore/tox.h
+++ b/toxcore/tox.h
@@ -266,6 +266,8 @@ uint32_t tox_address_size(void);
266 266
267/** 267/**
268 * Maximum length of a nickname in bytes. 268 * Maximum length of a nickname in bytes.
269 *
270 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
269 */ 271 */
270#define TOX_MAX_NAME_LENGTH 128 272#define TOX_MAX_NAME_LENGTH 128
271 273
@@ -273,6 +275,8 @@ uint32_t tox_max_name_length(void);
273 275
274/** 276/**
275 * Maximum length of a status message in bytes. 277 * Maximum length of a status message in bytes.
278 *
279 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
276 */ 280 */
277#define TOX_MAX_STATUS_MESSAGE_LENGTH 1007 281#define TOX_MAX_STATUS_MESSAGE_LENGTH 1007
278 282
@@ -280,6 +284,8 @@ uint32_t tox_max_status_message_length(void);
280 284
281/** 285/**
282 * Maximum length of a friend request message in bytes. 286 * Maximum length of a friend request message in bytes.
287 *
288 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
283 */ 289 */
284#define TOX_MAX_FRIEND_REQUEST_LENGTH 1016 290#define TOX_MAX_FRIEND_REQUEST_LENGTH 1016
285 291
@@ -287,6 +293,8 @@ uint32_t tox_max_friend_request_length(void);
287 293
288/** 294/**
289 * Maximum length of a single message after which it should be split. 295 * Maximum length of a single message after which it should be split.
296 *
297 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
290 */ 298 */
291#define TOX_MAX_MESSAGE_LENGTH 1372 299#define TOX_MAX_MESSAGE_LENGTH 1372
292 300
@@ -294,6 +302,8 @@ uint32_t tox_max_message_length(void);
294 302
295/** 303/**
296 * Maximum size of custom packets. TODO(iphydf): should be LENGTH? 304 * Maximum size of custom packets. TODO(iphydf): should be LENGTH?
305 *
306 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
297 */ 307 */
298#define TOX_MAX_CUSTOM_PACKET_SIZE 1373 308#define TOX_MAX_CUSTOM_PACKET_SIZE 1373
299 309
@@ -315,6 +325,8 @@ uint32_t tox_file_id_length(void);
315 325
316/** 326/**
317 * Maximum file name length for file transfers. 327 * Maximum file name length for file transfers.
328 *
329 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
318 */ 330 */
319#define TOX_MAX_FILENAME_LENGTH 255 331#define TOX_MAX_FILENAME_LENGTH 255
320 332
@@ -494,7 +506,7 @@ typedef void tox_log_cb(Tox *tox, TOX_LOG_LEVEL level, const char *file, uint32_
494 * @deprecated The memory layout of this struct (size, alignment, and field 506 * @deprecated The memory layout of this struct (size, alignment, and field
495 * order) is not part of the ABI. To remain compatible, prefer to use tox_options_new to 507 * order) is not part of the ABI. To remain compatible, prefer to use tox_options_new to
496 * allocate the object and accessor functions to set the members. The struct 508 * allocate the object and accessor functions to set the members. The struct
497 * will become opaque (i.e. the definition will become private) in v0.2.0. 509 * will become opaque (i.e. the definition will become private) in v0.3.0.
498 */ 510 */
499struct Tox_Options { 511struct Tox_Options {
500 512
@@ -956,6 +968,9 @@ typedef enum TOX_CONNECTION {
956/** 968/**
957 * Return whether we are connected to the DHT. The return value is equal to the 969 * Return whether we are connected to the DHT. The return value is equal to the
958 * last value received through the `self_connection_status` callback. 970 * last value received through the `self_connection_status` callback.
971 *
972 * @deprecated This getter is deprecated. Use the event and store the status
973 * in the client state.
959 */ 974 */
960TOX_CONNECTION tox_self_get_connection_status(const Tox *tox); 975TOX_CONNECTION tox_self_get_connection_status(const Tox *tox);
961 976
@@ -1525,6 +1540,9 @@ void tox_callback_friend_status_message(Tox *tox, tox_friend_status_message_cb *
1525 * 1540 *
1526 * The status returned is equal to the last status received through the 1541 * The status returned is equal to the last status received through the
1527 * `friend_status` callback. 1542 * `friend_status` callback.
1543 *
1544 * @deprecated This getter is deprecated. Use the event and store the status
1545 * in the client state.
1528 */ 1546 */
1529TOX_USER_STATUS tox_friend_get_status(const Tox *tox, uint32_t friend_number, TOX_ERR_FRIEND_QUERY *error); 1547TOX_USER_STATUS tox_friend_get_status(const Tox *tox, uint32_t friend_number, TOX_ERR_FRIEND_QUERY *error);
1530 1548
@@ -1554,6 +1572,9 @@ void tox_callback_friend_status(Tox *tox, tox_friend_status_cb *callback);
1554 * 1572 *
1555 * @return the friend's connection status as it was received through the 1573 * @return the friend's connection status as it was received through the
1556 * `friend_connection_status` event. 1574 * `friend_connection_status` event.
1575 *
1576 * @deprecated This getter is deprecated. Use the event and store the status
1577 * in the client state.
1557 */ 1578 */
1558TOX_CONNECTION tox_friend_get_connection_status(const Tox *tox, uint32_t friend_number, TOX_ERR_FRIEND_QUERY *error); 1579TOX_CONNECTION tox_friend_get_connection_status(const Tox *tox, uint32_t friend_number, TOX_ERR_FRIEND_QUERY *error);
1559 1580
@@ -1586,6 +1607,9 @@ void tox_callback_friend_connection_status(Tox *tox, tox_friend_connection_statu
1586 * @return true if the friend is typing. 1607 * @return true if the friend is typing.
1587 * @return false if the friend is not typing, or the friend number was 1608 * @return false if the friend is not typing, or the friend number was
1588 * invalid. Inspect the error code to determine which case it is. 1609 * invalid. Inspect the error code to determine which case it is.
1610 *
1611 * @deprecated This getter is deprecated. Use the event and store the status
1612 * in the client state.
1589 */ 1613 */
1590bool tox_friend_get_typing(const Tox *tox, uint32_t friend_number, TOX_ERR_FRIEND_QUERY *error); 1614bool tox_friend_get_typing(const Tox *tox, uint32_t friend_number, TOX_ERR_FRIEND_QUERY *error);
1591 1615