Go to the source code of this file.
Data Structures | |
struct | GNUNET_MESSENGER_MessageControlQueue |
struct | GNUNET_MESSENGER_MessageControl |
Functions | |
struct GNUNET_MESSENGER_MessageControl * | create_message_control (struct GNUNET_MESSENGER_Room *room) |
Creates and allocates a new message control for a room of the client API. More... | |
void | destroy_message_control (struct GNUNET_MESSENGER_MessageControl *control) |
Destroys a message control and frees its memory fully from the client API. More... | |
void | process_message_control (struct GNUNET_MESSENGER_MessageControl *control, const struct GNUNET_HashCode *sender, const struct GNUNET_HashCode *context, const struct GNUNET_HashCode *hash, const struct GNUNET_MESSENGER_Message *message, enum GNUNET_MESSENGER_MessageFlags flags) |
Processes a new message with its hash and regarding information about sender, context and message flags using a selected message control. More... | |
struct GNUNET_MESSENGER_MessageControl * create_message_control | ( | struct GNUNET_MESSENGER_Room * | room | ) |
Creates and allocates a new message control for a room of the client API.
[in,out] | room | Room |
Definition at line 38 of file messenger_api_message_control.c.
References GNUNET_assert, GNUNET_CONTAINER_multishortmap_create(), GNUNET_new, GNUNET_NO, GNUNET_MESSENGER_MessageControl::head, GNUNET_MESSENGER_MessageControl::member_messages, GNUNET_MESSENGER_MessageControl::peer_messages, GNUNET_MESSENGER_MessageControl::room, and GNUNET_MESSENGER_MessageControl::tail.
Referenced by create_room().
void destroy_message_control | ( | struct GNUNET_MESSENGER_MessageControl * | control | ) |
Destroys a message control and frees its memory fully from the client API.
[in,out] | control | Message control |
Definition at line 59 of file messenger_api_message_control.c.
References GNUNET_MESSENGER_MessageControlQueue::control, destroy_message(), GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_CONTAINER_multishortmap_destroy(), GNUNET_free, GNUNET_SCHEDULER_cancel(), GNUNET_MESSENGER_MessageControl::head, GNUNET_MESSENGER_MessageControl::member_messages, GNUNET_MESSENGER_MessageControl::peer_messages, queue(), and GNUNET_MESSENGER_MessageControl::tail.
Referenced by destroy_room().
void process_message_control | ( | struct GNUNET_MESSENGER_MessageControl * | control, |
const struct GNUNET_HashCode * | sender, | ||
const struct GNUNET_HashCode * | context, | ||
const struct GNUNET_HashCode * | hash, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
enum GNUNET_MESSENGER_MessageFlags | flags | ||
) |
Processes a new message with its hash and regarding information about sender, context and message flags using a selected message control.
The message control will ensure order of messages so that senders of messages can be identified via previously processed messages.
[in,out] | control | Message control |
[in] | sender | Sender hash |
[in] | context | Context hash |
[in] | hash | Message hash |
[in] | message | Message |
[in] | flags | Message flags |
Definition at line 210 of file messenger_api_message_control.c.
References GNUNET_MESSENGER_Message::body, context, enqueue_message_control(), get_handle_contact_store(), get_room_handle(), get_store_contact_raw(), GNUNET_assert, GNUNET_CONTAINER_multishortmap_get_multiple(), GNUNET_MESSENGER_KIND_ID, GNUNET_MESSENGER_KIND_JOIN, GNUNET_MESSENGER_KIND_PEER, GNUNET_YES, handle, handle_message_control(), GNUNET_MESSENGER_Message::header, id, GNUNET_MESSENGER_MessageId::id, GNUNET_MESSENGER_MessageBody::id, is_peer_message(), iterate_message_control(), GNUNET_MESSENGER_MessageHeader::kind, map, GNUNET_MESSENGER_MessageControl::member_messages, GNUNET_MESSENGER_MessageControl::peer_messages, GNUNET_MESSENGER_MessageControl::room, and GNUNET_MESSENGER_MessageHeader::sender_id.
Referenced by handle_recv_message().