summaryrefslogtreecommitdiff
path: root/toxcore/tox.api.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.api.h
parentc8359c843b3f2a693e5c9ff47e1a9a0f288fa26d (diff)
Add deprecation notices to functions that will go away in v0.3.0.
Diffstat (limited to 'toxcore/tox.api.h')
-rw-r--r--toxcore/tox.api.h36
1 files changed, 30 insertions, 6 deletions
diff --git a/toxcore/tox.api.h b/toxcore/tox.api.h
index 90020a83..493307e9 100644
--- a/toxcore/tox.api.h
+++ b/toxcore/tox.api.h
@@ -257,26 +257,36 @@ const ADDRESS_SIZE = PUBLIC_KEY_SIZE + NOSPAM_SIZE + sizeof(uint1
257 257
258/** 258/**
259 * Maximum length of a nickname in bytes. 259 * Maximum length of a nickname in bytes.
260 *
261 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
260 */ 262 */
261const MAX_NAME_LENGTH = 128; 263const MAX_NAME_LENGTH = 128;
262 264
263/** 265/**
264 * Maximum length of a status message in bytes. 266 * Maximum length of a status message in bytes.
267 *
268 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
265 */ 269 */
266const MAX_STATUS_MESSAGE_LENGTH = 1007; 270const MAX_STATUS_MESSAGE_LENGTH = 1007;
267 271
268/** 272/**
269 * Maximum length of a friend request message in bytes. 273 * Maximum length of a friend request message in bytes.
274 *
275 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
270 */ 276 */
271const MAX_FRIEND_REQUEST_LENGTH = 1016; 277const MAX_FRIEND_REQUEST_LENGTH = 1016;
272 278
273/** 279/**
274 * Maximum length of a single message after which it should be split. 280 * Maximum length of a single message after which it should be split.
281 *
282 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
275 */ 283 */
276const MAX_MESSAGE_LENGTH = 1372; 284const MAX_MESSAGE_LENGTH = 1372;
277 285
278/** 286/**
279 * Maximum size of custom packets. TODO(iphydf): should be LENGTH? 287 * Maximum size of custom packets. TODO(iphydf): should be LENGTH?
288 *
289 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
280 */ 290 */
281const MAX_CUSTOM_PACKET_SIZE = 1373; 291const MAX_CUSTOM_PACKET_SIZE = 1373;
282 292
@@ -292,6 +302,8 @@ const FILE_ID_LENGTH = 32;
292 302
293/** 303/**
294 * Maximum file name length for file transfers. 304 * Maximum file name length for file transfers.
305 *
306 * @deprecated The macro will be removed in 0.3.0. Use the function instead.
295 */ 307 */
296const MAX_FILENAME_LENGTH = 255; 308const MAX_FILENAME_LENGTH = 255;
297 309
@@ -443,7 +455,7 @@ static class options {
443 * @deprecated The memory layout of this struct (size, alignment, and field 455 * @deprecated The memory layout of this struct (size, alignment, and field
444 * order) is not part of the ABI. To remain compatible, prefer to use $new to 456 * order) is not part of the ABI. To remain compatible, prefer to use $new to
445 * allocate the object and accessor functions to set the members. The struct 457 * allocate the object and accessor functions to set the members. The struct
446 * will become opaque (i.e. the definition will become private) in v0.2.0. 458 * will become opaque (i.e. the definition will become private) in v0.3.0.
447 */ 459 */
448 struct this [get, set] { 460 struct this [get, set] {
449 /** 461 /**
@@ -801,6 +813,9 @@ inline namespace self {
801 /** 813 /**
802 * Return whether we are connected to the DHT. The return value is equal to the 814 * Return whether we are connected to the DHT. The return value is equal to the
803 * last value received through the `${event connection_status}` callback. 815 * last value received through the `${event connection_status}` callback.
816 *
817 * @deprecated This getter is deprecated. Use the event and store the status
818 * in the client state.
804 */ 819 */
805 get(); 820 get();
806 } 821 }
@@ -1217,11 +1232,11 @@ namespace friend {
1217 1232
1218 uint64_t last_online { 1233 uint64_t last_online {
1219 /** 1234 /**
1220 * Return a unix-time timestamp of the last time the friend associated with a given 1235 * Return a unix-time timestamp of the last time the friend associated with a given
1221 * friend number was seen online. This function will return UINT64_MAX on error. 1236 * friend number was seen online. This function will return UINT64_MAX on error.
1222 * 1237 *
1223 * @param friend_number The friend number you want to query. 1238 * @param friend_number The friend number you want to query.
1224 */ 1239 */
1225 get(uint32_t friend_number) { 1240 get(uint32_t friend_number) {
1226 /** 1241 /**
1227 * No friend with the given number exists on the friend list. 1242 * No friend with the given number exists on the friend list.
@@ -1351,6 +1366,9 @@ namespace friend {
1351 * 1366 *
1352 * The status returned is equal to the last status received through the 1367 * The status returned is equal to the last status received through the
1353 * `${event status}` callback. 1368 * `${event status}` callback.
1369 *
1370 * @deprecated This getter is deprecated. Use the event and store the status
1371 * in the client state.
1354 */ 1372 */
1355 get(uint32_t friend_number) 1373 get(uint32_t friend_number)
1356 with error for query; 1374 with error for query;
@@ -1382,6 +1400,9 @@ namespace friend {
1382 * 1400 *
1383 * @return the friend's connection status as it was received through the 1401 * @return the friend's connection status as it was received through the
1384 * `${event connection_status}` event. 1402 * `${event connection_status}` event.
1403 *
1404 * @deprecated This getter is deprecated. Use the event and store the status
1405 * in the client state.
1385 */ 1406 */
1386 get(uint32_t friend_number) 1407 get(uint32_t friend_number)
1387 with error for query; 1408 with error for query;
@@ -1415,6 +1436,9 @@ namespace friend {
1415 * @return true if the friend is typing. 1436 * @return true if the friend is typing.
1416 * @return false if the friend is not typing, or the friend number was 1437 * @return false if the friend is not typing, or the friend number was
1417 * invalid. Inspect the error code to determine which case it is. 1438 * invalid. Inspect the error code to determine which case it is.
1439 *
1440 * @deprecated This getter is deprecated. Use the event and store the status
1441 * in the client state.
1418 */ 1442 */
1419 get(uint32_t friend_number) 1443 get(uint32_t friend_number)
1420 with error for query; 1444 with error for query;