summaryrefslogtreecommitdiff
path: root/toxcore/tox.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-28 17:30:03 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-08-11 16:28:24 +0000
commit503d9f7e229dcb777d347d690086c7827039cd39 (patch)
tree6ce712e14e04b09ddb7ab2bca4c8f5ff50f9bf53 /toxcore/tox.h
parent678720d2fe1d2d7c96188e09c8f01e1335236013 (diff)
Add deprecation notice to some UPPER_CASE enums.
The enumerators won't change, but the type name will change in 0.3.0. Reasoning: - Type names in toxcore start with an uppercase letter and either have at least one lowercase letter in them, or are less than 4 characters long. - Constants consist of 4 or more uppercase letters or underscores. By these rules, "DHT" is a type name, but "TOX_USER_STATUS" is a constant. We provide Tox_User_Status as an alternative for now, and will switch to that in 0.3.0, removing the UPPER_CASE versions.
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r--toxcore/tox.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h
index 2c40389b..badae42b 100644
--- a/toxcore/tox.h
+++ b/toxcore/tox.h
@@ -374,6 +374,9 @@ uint32_t tox_max_hostname_length(void);
374 374
375/** 375/**
376 * Represents the possible statuses a client can have. 376 * Represents the possible statuses a client can have.
377 *
378 * @deprecated All UPPER_CASE enum type names are deprecated. Use the
379 * Camel_Snake_Case versions, instead.
377 */ 380 */
378typedef enum TOX_USER_STATUS { 381typedef enum TOX_USER_STATUS {
379 382
@@ -400,6 +403,9 @@ typedef enum TOX_USER_STATUS {
400/** 403/**
401 * Represents message types for tox_friend_send_message and conference 404 * Represents message types for tox_friend_send_message and conference
402 * messages. 405 * messages.
406 *
407 * @deprecated All UPPER_CASE enum type names are deprecated. Use the
408 * Camel_Snake_Case versions, instead.
403 */ 409 */
404typedef enum TOX_MESSAGE_TYPE { 410typedef enum TOX_MESSAGE_TYPE {
405 411
@@ -428,6 +434,9 @@ typedef enum TOX_MESSAGE_TYPE {
428 434
429/** 435/**
430 * Type of proxy used to connect to TCP relays. 436 * Type of proxy used to connect to TCP relays.
437 *
438 * @deprecated All UPPER_CASE enum type names are deprecated. Use the
439 * Camel_Snake_Case versions, instead.
431 */ 440 */
432typedef enum TOX_PROXY_TYPE { 441typedef enum TOX_PROXY_TYPE {
433 442
@@ -451,6 +460,9 @@ typedef enum TOX_PROXY_TYPE {
451 460
452/** 461/**
453 * Type of savedata to create the Tox instance from. 462 * Type of savedata to create the Tox instance from.
463 *
464 * @deprecated All UPPER_CASE enum type names are deprecated. Use the
465 * Camel_Snake_Case versions, instead.
454 */ 466 */
455typedef enum TOX_SAVEDATA_TYPE { 467typedef enum TOX_SAVEDATA_TYPE {
456 468
@@ -474,6 +486,9 @@ typedef enum TOX_SAVEDATA_TYPE {
474 486
475/** 487/**
476 * Severity level of log messages. 488 * Severity level of log messages.
489 *
490 * @deprecated All UPPER_CASE enum type names are deprecated. Use the
491 * Camel_Snake_Case versions, instead.
477 */ 492 */
478typedef enum TOX_LOG_LEVEL { 493typedef enum TOX_LOG_LEVEL {
479 494
@@ -972,6 +987,9 @@ bool tox_add_tcp_relay(Tox *tox, const char *host, uint16_t port, const uint8_t
972 987
973/** 988/**
974 * Protocols that can be used to connect to the network or friends. 989 * Protocols that can be used to connect to the network or friends.
990 *
991 * @deprecated All UPPER_CASE enum type names are deprecated. Use the
992 * Camel_Snake_Case versions, instead.
975 */ 993 */
976typedef enum TOX_CONNECTION { 994typedef enum TOX_CONNECTION {
977 995
@@ -2379,6 +2397,9 @@ void tox_callback_file_recv_chunk(Tox *tox, tox_file_recv_chunk_cb *callback);
2379 2397
2380/** 2398/**
2381 * Conference types for the conference_invite event. 2399 * Conference types for the conference_invite event.
2400 *
2401 * @deprecated All UPPER_CASE enum type names are deprecated. Use the
2402 * Camel_Snake_Case versions, instead.
2382 */ 2403 */
2383typedef enum TOX_CONFERENCE_TYPE { 2404typedef enum TOX_CONFERENCE_TYPE {
2384 2405