diff options
author | dartraiden <wowemuh@gmail.com> | 2022-02-07 00:34:21 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2022-02-07 00:35:37 +0300 |
commit | 223306302f39455970b67a97ba62e4a542224f7a (patch) | |
tree | 21da0622af231bea688b413d1238d15315d658ce /protocols/Tox/libtox/src/toxcore/ping_array.h | |
parent | 41317031f257ad6a06fa743860aff212074dc416 (diff) |
Update libtox to 0.2.15
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/ping_array.h')
-rw-r--r-- | protocols/Tox/libtox/src/toxcore/ping_array.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/ping_array.h b/protocols/Tox/libtox/src/toxcore/ping_array.h index 70c517de9e..98dceaba0c 100644 --- a/protocols/Tox/libtox/src/toxcore/ping_array.h +++ b/protocols/Tox/libtox/src/toxcore/ping_array.h @@ -3,8 +3,8 @@ * Copyright © 2013 Tox project. */ -/* - * Implementation of an efficient array to store that we pinged something. +/** @file + * @brief Implementation of an efficient array to store that we pinged something. */ #ifndef C_TOXCORE_TOXCORE_PING_ARRAY_H #define C_TOXCORE_TOXCORE_PING_ARRAY_H @@ -12,22 +12,16 @@ #include <stddef.h> #include <stdint.h> +#include "mono_time.h" + #ifdef __cplusplus extern "C" { #endif -#ifndef MONO_TIME_DEFINED -#define MONO_TIME_DEFINED -typedef struct Mono_Time Mono_Time; -#endif /* MONO_TIME_DEFINED */ - -#ifndef PING_ARRAY_DEFINED -#define PING_ARRAY_DEFINED typedef struct Ping_Array Ping_Array; -#endif /* PING_ARRAY_DEFINED */ /** - * Initialize a Ping_Array. + * @brief Initialize a Ping_Array. * * @param size represents the total size of the array and should be a power of 2. * @param timeout represents the maximum timeout in seconds for the entry. @@ -37,12 +31,12 @@ typedef struct Ping_Array Ping_Array; struct Ping_Array *ping_array_new(uint32_t size, uint32_t timeout); /** - * Free all the allocated memory in a Ping_Array. + * @brief Free all the allocated memory in a @ref Ping_Array. */ void ping_array_kill(struct Ping_Array *array); /** - * Add a data with length to the Ping_Array list and return a ping_id. + * @brief Add a data with length to the @ref Ping_Array list and return a ping_id. * * @return ping_id on success, 0 on failure. */ @@ -50,7 +44,7 @@ uint64_t ping_array_add(struct Ping_Array *array, const struct Mono_Time *mono_t uint32_t length); /** - * Check if ping_id is valid and not timed out. + * @brief Check if @p ping_id is valid and not timed out. * * On success, copies the data into data of length, * |