GNUnet 0.22.1
messenger_api.h File Reference
Include dependency graph for messenger_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void enqueue_message_to_room (struct GNUNET_MESSENGER_Room *room, struct GNUNET_MESSENGER_Message *message, struct GNUNET_MESSENGER_Message *transcript)
 

Function Documentation

◆ enqueue_message_to_room()

void enqueue_message_to_room ( struct GNUNET_MESSENGER_Room room,
struct GNUNET_MESSENGER_Message message,
struct GNUNET_MESSENGER_Message transcript 
)

Definition at line 937 of file messenger_api.c.

940{
941 const struct GNUNET_CRYPTO_PrivateKey *key;
942
943 GNUNET_assert ((room) && (message));
944
945 key = get_handle_key (room->handle);
946
947 enqueue_to_messages (&(room->queue), key, message, transcript);
948
949 if (GNUNET_YES != is_room_available (room))
950 return;
951
952 if (GNUNET_YES == is_message_session_bound (message))
953 send_sync_room (room->handle, room);
954 else if (GNUNET_YES != room->wait_for_sync)
956}
struct GNUNET_HashCode key
The key used in the DHT.
@ GNUNET_YES
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static void dequeue_messages_from_room(struct GNUNET_MESSENGER_Room *room)
static void send_sync_room(struct GNUNET_MESSENGER_Handle *handle, struct GNUNET_MESSENGER_Room *room)
const struct GNUNET_CRYPTO_PrivateKey * get_handle_key(const struct GNUNET_MESSENGER_Handle *handle)
Returns the private key of a given handle.
enum GNUNET_GenericReturnValue is_message_session_bound(const struct GNUNET_MESSENGER_Message *message)
Returns if the message should be bound to a member session.
void enqueue_to_messages(struct GNUNET_MESSENGER_QueueMessages *messages, const struct GNUNET_CRYPTO_PrivateKey *sender, struct GNUNET_MESSENGER_Message *message, struct GNUNET_MESSENGER_Message *transcript)
Adds a specific message to the end or the beginning of the queue depending on its priority.
enum GNUNET_GenericReturnValue is_room_available(const struct GNUNET_MESSENGER_Room *room)
Checks whether a room is available to send messages.
A private key for an identity as per LSD0001.
struct GNUNET_MESSENGER_Handle * handle
enum GNUNET_GenericReturnValue wait_for_sync
struct GNUNET_MESSENGER_QueueMessages queue

References dequeue_messages_from_room(), enqueue_to_messages(), get_handle_key(), GNUNET_assert, GNUNET_YES, GNUNET_MESSENGER_Room::handle, is_message_session_bound(), is_room_available(), key, GNUNET_MESSENGER_Room::queue, send_sync_room(), and GNUNET_MESSENGER_Room::wait_for_sync.

Referenced by delete_room_message(), GNUNET_MESSENGER_close_room(), handle_member_id(), handle_miss_message(), iterate_send_key_to_room(), iterate_send_name_to_room(), keep_subscription_alive(), and send_message_to_room_with_key().

Here is the call graph for this function:
Here is the caller graph for this function: