26 #ifndef GNUNET_SERVICE_MESSENGER_ROOM_H
27 #define GNUNET_SERVICE_MESSENGER_ROOM_H
47 #define GNUNET_MESSENGER_IDLE_DELAY GNUNET_TIME_relative_multiply \
48 (GNUNET_TIME_relative_get_second_ (), 5)
50 #define GNUNET_MESSENGER_REQUEST_DELAY GNUNET_TIME_relative_multiply \
51 (GNUNET_TIME_relative_get_minute_ (), 5)
53 #define GNUNET_MESSENGER_MERGE_DELAY GNUNET_TIME_relative_multiply \
54 (GNUNET_TIME_relative_get_second_ (), 30)
struct GNUNET_HashCode key
The key used in the DHT.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
GNUnet MESSENGER service.
GNUnet MESSENGER service.
GNUnet MESSENGER service.
GNUnet MESSENGER service.
GNUnet MESSENGER service.
GNUnet MESSENGER service.
GNUnet MESSENGER service.
int send_srv_room_message(struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, struct GNUNET_MESSENGER_Message *message)
Sends a message from a given handle into a room.
int open_srv_room(struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle)
Tries to open a room for a given handle.
struct GNUNET_MESSENGER_OperationStore * get_srv_room_operation_store(struct GNUNET_MESSENGER_SrvRoom *room)
Returns the used operation store of a given room.
void save_srv_room(struct GNUNET_MESSENGER_SrvRoom *room)
Saves the configuration for a given room of a service which contains the last messages hash and the r...
void rebuild_srv_room_basement_structure(struct GNUNET_MESSENGER_SrvRoom *room)
Rebuilds the decentralized structure for a room by ensuring all required connections are made dependi...
const struct GNUNET_MESSENGER_SrvTunnel * get_srv_room_tunnel(const struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_PeerIdentity *peer)
Returns a tunnel inside of a room leading towards a given peer if such a tunnel exists,...
void solve_srv_room_member_collisions(struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_IDENTITY_PublicKey *public_key, const struct GNUNET_ShortHashCode *member_id, struct GNUNET_TIME_Absolute timestamp)
Checks for potential collisions with member ids and solves them changing active handles ids if they u...
int enter_srv_room_at(struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_PeerIdentity *door)
Connects a tunnel to a hosting peer of a room through a so called door which is represented by a peer...
void merge_srv_room_last_messages(struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle)
Reduces all current forks inside of the message history of a room to one remaining last message by me...
void check_srv_room_peer_status(struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvTunnel *tunnel)
Checks the current state of opening a given room from this peer and re-publishes it if necessary to a...
void remove_srv_room(struct GNUNET_MESSENGER_SrvRoom *room)
Removes the configuration for a given room of a service.
struct GNUNET_MQ_Envelope * pack_srv_room_message(const struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_MESSENGER_SrvHandle *handle, struct GNUNET_MESSENGER_Message *message, struct GNUNET_HashCode *hash, int mode)
Packs a message depending on the selected mode into a newly allocated envelope.
void forward_srv_room_message(struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Forwards a message with a given hash to a specific tunnel inside of a room.
int delete_srv_room_message(struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay)
Deletes a message from the room with a given hash in a specific delay if the provided member by its s...
struct GNUNET_CADET_Handle * get_srv_room_cadet(struct GNUNET_MESSENGER_SrvRoom *room)
Returns the CADET handle from a rooms service.
void() GNUNET_MESSENGER_MessageRequestCallback(void *cls, struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Method called whenever a message is found during a request in a room.
struct GNUNET_MESSENGER_SrvRoom * create_srv_room(struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key)
Creates and allocates a new room for a handle with a given key.
void destroy_srv_room(struct GNUNET_MESSENGER_SrvRoom *room, int deletion)
Destroys a room and frees its memory fully.
const struct GNUNET_HashCode * get_srv_room_key(const struct GNUNET_MESSENGER_SrvRoom *room)
Returns the shared secret you need to access a room.
struct GNUNET_MESSENGER_MemberStore * get_srv_room_member_store(struct GNUNET_MESSENGER_SrvRoom *room)
Returns the used member store of a given room.
struct GNUNET_MESSENGER_MessageStore * get_srv_room_message_store(struct GNUNET_MESSENGER_SrvRoom *room)
Returns the used message store of a given room.
int request_srv_room_message(struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_HashCode *hash, const struct GNUNET_MESSENGER_MemberSession *session, GNUNET_MESSENGER_MessageRequestCallback callback, void *cls)
Requests a message from a room identified by a given hash.
void load_srv_room(struct GNUNET_MESSENGER_SrvRoom *room)
Loads the local configuration for a given room of a service which contains the last messages hash and...
CADET service; establish channels to distant peers.
static enum @8 mode
Should we do a PUT (mode = 0) or GET (mode = 1);.
Identity service; implements identity management for GNUnet.
GNUnet MESSENGER service.
messenger api: client and service implementation of GNUnet MESSENGER service
Opaque handle to the service.
Internal representation of the hash map.
An identity key as per LSD0001.
struct GNUNET_MESSENGER_SrvRoom * room
struct GNUNET_MESSENGER_SrvRoom * room
struct GNUNET_HashCode * peer_message
struct GNUNET_CONTAINER_MultiPeerMap * tunnels
struct GNUNET_MESSENGER_MemberStore member_store
struct GNUNET_MESSENGER_Service * service
struct GNUNET_CADET_Port * port
struct GNUNET_MESSENGER_ListTunnels basement
struct GNUNET_SCHEDULER_Task * idle
struct GNUNET_MESSENGER_MessageStore message_store
struct GNUNET_MESSENGER_MessageState state
struct GNUNET_MESSENGER_ListMessages handling
struct GNUNET_MESSENGER_OperationStore operation_store
struct GNUNET_MESSENGER_SrvHandle * host
struct GNUNET_HashCode key
struct GNUNET_MESSENGER_SrvRoom * room
The identity of the host (wraps the signing key of the peer).
Entry in list of pending tasks.
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.