26#ifndef GNUNET_MESSENGER_API_ROOM_H
27#define GNUNET_MESSENGER_API_ROOM_H
struct GNUNET_HashCode key
The key used in the DHT.
static struct GNUNET_VPN_Handle * handle
Handle to vpn service.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
Functions related to time.
GNUNET_GenericReturnValue
Named constants for return values.
GNUNET_MESSENGER_MessageKind
Enum for the different supported kinds of messages.
GNUNET_MESSENGER_MessageFlags
Enum for the different supported flags used by message handling.
enum GNUNET_GenericReturnValue(* GNUNET_MESSENGER_MemberCallback)(void *cls, struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *contact)
Method called for each member in a room during iteration.
enum GNUNET_GenericReturnValue find_room_member(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *contact)
Checks through all members of a given room if a specific contact is found and returns a result depend...
struct GNUNET_MESSENGER_Epoch * get_room_message_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns the epoch of a local message with a given hash in a room.
void generate_room_epoch_announcement(struct GNUNET_MESSENGER_Room *room, struct GNUNET_MESSENGER_Epoch *epoch, struct GNUNET_MESSENGER_EpochAnnouncement **announcement)
Generate a new announcement for a given epoch in a room under a random and unique announcement identi...
struct GNUNET_MESSENGER_Room * create_room(struct GNUNET_MESSENGER_Handle *handle, const union GNUNET_MESSENGER_RoomKey *key)
Creates and allocates a new room for a handle with a given key for the client API.
void copy_room_last_message(const struct GNUNET_MESSENGER_Room *room, struct GNUNET_HashCode *hash)
Copies the last message hash of a room into a given hash variable.
void cancel_room_actions_by(struct GNUNET_MESSENGER_Room *room, enum GNUNET_MESSENGER_MessageKind kind, const struct GNUNET_HashCode *epoch_hash, const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_MESSENGER_Contact *contact)
Searches queued actions to handle messages of a specific message kind in a room with any delay and ca...
struct GNUNET_MESSENGER_Contact * get_room_sender(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns a messages sender locally stored from a map for a given hash in a room.
void set_room_sender_id(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_ShortHashCode *id)
Sets the member id of the room's sender to a specific id or NULL.
void handle_room_message(struct GNUNET_MESSENGER_Room *room, struct GNUNET_MESSENGER_Contact *sender, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, const struct GNUNET_HashCode *epoch, enum GNUNET_MESSENGER_MessageFlags flags)
Handles a message with a given hash in a room for the client API to update members and its informatio...
void link_room_deletion(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay, GNUNET_MESSENGER_RoomLinkDeletion deletion)
Delete all remaining links to a certain message identified by its hash inside a given room and cause ...
void cancel_room_action(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Cancels the delayed handling of a message in a room under a given hash in case it has been queued usi...
enum GNUNET_GenericReturnValue is_room_message_sent(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns whether a message is sent by the handle of the given room itself or another client that is us...
const struct GNUNET_MESSENGER_Message * get_room_message(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns a message locally stored from a map for a given hash in a room.
struct GNUNET_MESSENGER_Epoch * get_room_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue recent)
Returns the epoch in a given room from a specific epoch hash that represents the exact message the ep...
enum GNUNET_GenericReturnValue update_room_secret_message(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_CRYPTO_SymmetricSessionKey *key, enum GNUNET_GenericReturnValue update)
Updates a secret message with a given hash in a room for the client API trying to decrypt it with the...
enum GNUNET_GenericReturnValue update_room_message(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Updates any message with a given hash in a room for the client API to force handling the message agai...
enum GNUNET_GenericReturnValue is_room_public(const struct GNUNET_MESSENGER_Room *room)
Returns whether a given room is public or using epoch keys to encrypt private traffic and sync those ...
void delete_room_message(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay)
Deletes a message with a given hash inside a room under a specific delay.
void update_room_last_message(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_HashCode *epoch)
Updates the last message hash and its epoch of a room for the client API so that new messages can poi...
enum GNUNET_GenericReturnValue is_room_available(const struct GNUNET_MESSENGER_Room *room)
Checks whether a room is available to send messages.
void callback_room_message(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Executes the message callback for a given hash in a room.
const union GNUNET_MESSENGER_EpochIdentifier * get_room_message_epoch_identifier(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns the epoch identifier a local message with a given hash is targeting in a room with its specif...
const struct GNUNET_HashCode * get_room_key(const struct GNUNET_MESSENGER_Room *room)
Return a the hash representation of a given room.
struct GNUNET_MESSENGER_Handle * get_room_handle(struct GNUNET_MESSENGER_Room *room)
Returns the messenger handle of the room.
const struct GNUNET_ShortHashCode * get_room_sender_id(const struct GNUNET_MESSENGER_Room *room)
Returns the member id of the room's sender.
void link_room_message(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_HashCode *other)
Links a message identified by its hash inside a given room with another message identified by its oth...
const struct GNUNET_HashCode * get_room_epoch_hash(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns the messages epoch hash that is locally stored for a message of a given hash in a room.
void delay_room_action(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay)
Enqueues delayed handling of a message in a room under a given hash once a specific delay has timed o...
int iterate_room_members(struct GNUNET_MESSENGER_Room *room, GNUNET_MESSENGER_MemberCallback callback, void *cls)
Iterates through all members of a given room to forward each of them to a selected callback with a cu...
void destroy_room(struct GNUNET_MESSENGER_Room *room)
Destroys a room and frees its memory fully from the client API.
void(* GNUNET_MESSENGER_RoomLinkDeletion)(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay)
struct GNUNET_MESSENGER_Contact * get_room_recipient(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns a messages recipient locally stored from a map for a given hash in a room.
Internal representation of the hash map.
Internal representation of the hash map.
Handle used to access files (and pipes).
struct GNUNET_MESSENGER_Room * room
struct GNUNET_HashCode hash
struct GNUNET_MESSENGER_Room * room
struct GNUNET_HashCode hash
struct GNUNET_SCHEDULER_Task * task
struct GNUNET_MESSENGER_Room * room
struct GNUNET_MESSENGER_Contact * recipient
enum GNUNET_MESSENGER_MessageFlags flags
struct GNUNET_MESSENGER_Message * message
struct GNUNET_HashCode epoch
struct GNUNET_MESSENGER_Contact * sender
enum GNUNET_GenericReturnValue completed
struct GNUNET_SCHEDULER_Task * task
struct GNUNET_MESSENGER_Message * message
struct GNUNET_MESSENGER_Room * room
struct GNUNET_CONTAINER_MultiHashMap * links
struct GNUNET_CONTAINER_MultiShortmap * subscriptions
struct GNUNET_MESSENGER_Handle * handle
enum GNUNET_GenericReturnValue opened
union GNUNET_MESSENGER_RoomKey key
enum GNUNET_GenericReturnValue wait_for_sync
struct GNUNET_CONTAINER_MultiShortmap * members
struct GNUNET_MESSENGER_MessageControl * control
struct GNUNET_SCHEDULER_Task * request_task
struct GNUNET_CONTAINER_MultiHashMap * requests
struct GNUNET_DISK_FileHandle * keys_file
struct GNUNET_SCHEDULER_Task * queue_task
struct GNUNET_CONTAINER_MultiHashMap * epochs
struct GNUNET_HashCode last_epoch
struct GNUNET_CONTAINER_MultiHashMap * messages
struct GNUNET_CONTAINER_MultiHashMap * actions
enum GNUNET_GenericReturnValue use_handle_name
struct GNUNET_MESSENGER_QueueMessages queue
enum GNUNET_GenericReturnValue joined
struct GNUNET_MESSENGER_ListTunnels entries
struct GNUNET_ShortHashCode * sender_id
struct GNUNET_HashCode last_message
Entry in list of pending tasks.
Time for relative time used by GNUnet, in microseconds.
An epoch identifier unifies an epoch identifier code and its 256bit hash representation.
struct GNUNET_ShortHashCode hash
A room key unifies a room key code and its 512bit hash representation.