summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-09-13 22:01:45 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-09-13 22:01:45 +0100
commit45d28904b92c825d1ac88be9edae8baabcd4bba1 (patch)
tree7b1b259ba09d35867c141cf072707e6a0891f97a /toxcore/net_crypto.h
parenta8823830d39bdbde8d4f4f34bfcb26dc4bf79741 (diff)
Use <stdbool.h> and replace _Bool with bool.
This header is a requirement for the public API, therefore is assumed to exist. It is a C99 standard library header, and _Bool is not intended to be used directly, except in legacy code that defines bool (and true/false) itself. We don't use or depend on such code. None of our client code uses or depends on such code. There is no reason to not use bool.
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r--toxcore/net_crypto.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h
index 7d2644f4..b27a05e7 100644
--- a/toxcore/net_crypto.h
+++ b/toxcore/net_crypto.h
@@ -252,7 +252,7 @@ int new_crypto_connection(Net_Crypto *c, const uint8_t *real_public_key, const u
252 * return -1 on failure. 252 * return -1 on failure.
253 * return 0 on success. 253 * return 0 on success.
254 */ 254 */
255int set_direct_ip_port(Net_Crypto *c, int crypt_connection_id, IP_Port ip_port, _Bool connected); 255int set_direct_ip_port(Net_Crypto *c, int crypt_connection_id, IP_Port ip_port, bool connected);
256 256
257/* Set function to be called when connection with crypt_connection_id goes connects/disconnects. 257/* Set function to be called when connection with crypt_connection_id goes connects/disconnects.
258 * 258 *
@@ -313,7 +313,7 @@ uint32_t crypto_num_free_sendqueue_slots(const Net_Crypto *c, int crypt_connecti
313/* Return 1 if max speed was reached for this connection (no more data can be physically through the pipe). 313/* Return 1 if max speed was reached for this connection (no more data can be physically through the pipe).
314 * Return 0 if it wasn't reached. 314 * Return 0 if it wasn't reached.
315 */ 315 */
316_Bool max_speed_reached(Net_Crypto *c, int crypt_connection_id); 316bool max_speed_reached(Net_Crypto *c, int crypt_connection_id);
317 317
318/* Sends a lossless cryptopacket. 318/* Sends a lossless cryptopacket.
319 * 319 *
@@ -391,7 +391,7 @@ int crypto_kill(Net_Crypto *c, int crypt_connection_id);
391 * sets direct_connected to 1 if connection connects directly to other, 0 if it isn't. 391 * sets direct_connected to 1 if connection connects directly to other, 0 if it isn't.
392 * sets online_tcp_relays to the number of connected tcp relays this connection has. 392 * sets online_tcp_relays to the number of connected tcp relays this connection has.
393 */ 393 */
394unsigned int crypto_connection_status(const Net_Crypto *c, int crypt_connection_id, _Bool *direct_connected, 394unsigned int crypto_connection_status(const Net_Crypto *c, int crypt_connection_id, bool *direct_connected,
395 unsigned int *online_tcp_relays); 395 unsigned int *online_tcp_relays);
396 396
397/* Generate our public and private keys. 397/* Generate our public and private keys.