More documentation.
This commit is contained in:
parent
68a5cfd24b
commit
a789ff4e0c
@ -16,6 +16,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user