Message system now uses queues instead of vectors.
This commit is contained in:
@ -36,15 +36,15 @@ extern "C" {
|
||||
* @brief A structure with necessary variables for other users.
|
||||
*/
|
||||
struct NeoComm_user {
|
||||
const char *nick; ///< The alias used by the user.
|
||||
const char *hash; ///< The unique hash of the user.
|
||||
char *nick; ///< The alias used by the user.
|
||||
char *hash; ///< The unique hash of the user.
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Structure with relevant message information.
|
||||
*/
|
||||
struct NeoComm_message {
|
||||
const char *msg; ///< The text message.
|
||||
char *msg; ///< The text message.
|
||||
time_t sent; ///< The time it was sent.
|
||||
struct NeoComm_user from; ///< Info on the peer who sent the message.
|
||||
};
|
||||
@ -176,9 +176,7 @@ struct NeoComm_message *NeoComm_get_next_message(const char *channel_name);
|
||||
*
|
||||
* @param msg The message to free from memory.
|
||||
*/
|
||||
static inline void NeoComm_free_message(struct NeoComm_message *msg) {
|
||||
free(msg);
|
||||
}
|
||||
void NeoComm_free_message(struct NeoComm_message *msg);
|
||||
|
||||
/**
|
||||
* @brief Send a message to a channel.
|
||||
|
Reference in New Issue
Block a user