diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-28 17:30:03 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-08-11 16:28:24 +0000 |
commit | 503d9f7e229dcb777d347d690086c7827039cd39 (patch) | |
tree | 6ce712e14e04b09ddb7ab2bca4c8f5ff50f9bf53 /toxcore/tox.api.h | |
parent | 678720d2fe1d2d7c96188e09c8f01e1335236013 (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.api.h')
-rw-r--r-- | toxcore/tox.api.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/toxcore/tox.api.h b/toxcore/tox.api.h index 24360641..3254db05 100644 --- a/toxcore/tox.api.h +++ b/toxcore/tox.api.h | |||
@@ -342,6 +342,9 @@ const MAX_HOSTNAME_LENGTH = 255; | |||
342 | 342 | ||
343 | /** | 343 | /** |
344 | * Represents the possible statuses a client can have. | 344 | * Represents the possible statuses a client can have. |
345 | * | ||
346 | * @deprecated All UPPER_CASE enum type names are deprecated. Use the | ||
347 | * Camel_Snake_Case versions, instead. | ||
345 | */ | 348 | */ |
346 | enum class USER_STATUS { | 349 | enum class USER_STATUS { |
347 | /** | 350 | /** |
@@ -364,6 +367,9 @@ enum class USER_STATUS { | |||
364 | /** | 367 | /** |
365 | * Represents message types for ${tox.friend.send.message} and conference | 368 | * Represents message types for ${tox.friend.send.message} and conference |
366 | * messages. | 369 | * messages. |
370 | * | ||
371 | * @deprecated All UPPER_CASE enum type names are deprecated. Use the | ||
372 | * Camel_Snake_Case versions, instead. | ||
367 | */ | 373 | */ |
368 | enum class MESSAGE_TYPE { | 374 | enum class MESSAGE_TYPE { |
369 | /** | 375 | /** |
@@ -387,6 +393,9 @@ enum class MESSAGE_TYPE { | |||
387 | 393 | ||
388 | /** | 394 | /** |
389 | * Type of proxy used to connect to TCP relays. | 395 | * Type of proxy used to connect to TCP relays. |
396 | * | ||
397 | * @deprecated All UPPER_CASE enum type names are deprecated. Use the | ||
398 | * Camel_Snake_Case versions, instead. | ||
390 | */ | 399 | */ |
391 | enum class PROXY_TYPE { | 400 | enum class PROXY_TYPE { |
392 | /** | 401 | /** |
@@ -405,6 +414,9 @@ enum class PROXY_TYPE { | |||
405 | 414 | ||
406 | /** | 415 | /** |
407 | * Type of savedata to create the Tox instance from. | 416 | * Type of savedata to create the Tox instance from. |
417 | * | ||
418 | * @deprecated All UPPER_CASE enum type names are deprecated. Use the | ||
419 | * Camel_Snake_Case versions, instead. | ||
408 | */ | 420 | */ |
409 | enum class SAVEDATA_TYPE { | 421 | enum class SAVEDATA_TYPE { |
410 | /** | 422 | /** |
@@ -424,6 +436,9 @@ enum class SAVEDATA_TYPE { | |||
424 | 436 | ||
425 | /** | 437 | /** |
426 | * Severity level of log messages. | 438 | * Severity level of log messages. |
439 | * | ||
440 | * @deprecated All UPPER_CASE enum type names are deprecated. Use the | ||
441 | * Camel_Snake_Case versions, instead. | ||
427 | */ | 442 | */ |
428 | enum class LOG_LEVEL { | 443 | enum class LOG_LEVEL { |
429 | /** | 444 | /** |
@@ -813,6 +828,9 @@ bool add_tcp_relay(string host, uint16_t port, const uint8_t[PUBLIC_KEY_SIZE] pu | |||
813 | 828 | ||
814 | /** | 829 | /** |
815 | * Protocols that can be used to connect to the network or friends. | 830 | * Protocols that can be used to connect to the network or friends. |
831 | * | ||
832 | * @deprecated All UPPER_CASE enum type names are deprecated. Use the | ||
833 | * Camel_Snake_Case versions, instead. | ||
816 | */ | 834 | */ |
817 | enum class CONNECTION { | 835 | enum class CONNECTION { |
818 | /** | 836 | /** |
@@ -2104,6 +2122,9 @@ namespace conference { | |||
2104 | 2122 | ||
2105 | /** | 2123 | /** |
2106 | * Conference types for the ${event invite} event. | 2124 | * Conference types for the ${event invite} event. |
2125 | * | ||
2126 | * @deprecated All UPPER_CASE enum type names are deprecated. Use the | ||
2127 | * Camel_Snake_Case versions, instead. | ||
2107 | */ | 2128 | */ |
2108 | enum class TYPE { | 2129 | enum class TYPE { |
2109 | /** | 2130 | /** |