From a789ff4e0c72bfa65ed907b10974aa641a743c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Sat, 23 Sep 2017 11:29:25 +0200 Subject: [PATCH] More documentation. --- include/neocomm.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/include/neocomm.h b/include/neocomm.h index e1f622e..f95d389 100644 --- a/include/neocomm.h +++ b/include/neocomm.h @@ -16,6 +16,11 @@ * along with this program. If not, see . */ +/** + * @file neocomm.h + * @brief Include file for NeoComm + */ + #pragma once #ifdef __cplusplus @@ -33,6 +38,9 @@ struct user { const char *hash; ///< The unique hash of the user. }; +/** + * @brief Structure with relevant message information. + */ struct message { const char *msg; ///< The text message. time_t sent; ///< The time it was sent. @@ -46,7 +54,7 @@ struct message { * * @param port The port for the node to listen on. */ -void NeoComm_init(unsigned short port); +void NeoComm_init(const unsigned short port); /** * @brief Deinitialize the local node. @@ -109,11 +117,16 @@ void NeoComm_leave_channel(const char *channel_name); * * @return A structure of the message. If NULL then there are no new messages. * - * @warn This command will remove the message from the internal list. - * @warn The message must be freed from memory using NeoComm_free_message. + * @notice This command will remove the message from the internal list. + * @notice The message must be freed from memory using NeoComm_free_message. */ struct message *NeoComm_get_next_message(const char *channel_name); +/** + * @brief Free the memory for a message. + * + * @param msg The message to free from memory. + */ void NeoComm_free_message(struct message *msg); /**