From 223306302f39455970b67a97ba62e4a542224f7a Mon Sep 17 00:00:00 2001 From: dartraiden Date: Mon, 7 Feb 2022 00:34:21 +0300 Subject: Update libtox to 0.2.15 --- protocols/Tox/libtox/src/toxcore/ping_array.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'protocols/Tox/libtox/src/toxcore/ping_array.h') 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 #include +#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, * -- cgit v1.2.3