aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_room.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/gnunet-service-messenger_room.h')
-rw-r--r--src/messenger/gnunet-service-messenger_room.h96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/messenger/gnunet-service-messenger_room.h b/src/messenger/gnunet-service-messenger_room.h
index 58edc4121..a6ae45275 100644
--- a/src/messenger/gnunet-service-messenger_room.h
+++ b/src/messenger/gnunet-service-messenger_room.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2020--2021 GNUnet e.V. 3 Copyright (C) 2020--2022 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
@@ -89,7 +89,7 @@ struct GNUNET_MESSENGER_SrvRoom
89 * @return New room 89 * @return New room
90 */ 90 */
91struct GNUNET_MESSENGER_SrvRoom* 91struct GNUNET_MESSENGER_SrvRoom*
92create_room (struct GNUNET_MESSENGER_SrvHandle *handle, 92create_srv_room (struct GNUNET_MESSENGER_SrvHandle *handle,
93 const struct GNUNET_HashCode *key); 93 const struct GNUNET_HashCode *key);
94 94
95/** 95/**
@@ -102,7 +102,7 @@ create_room (struct GNUNET_MESSENGER_SrvHandle *handle,
102 * @param[in] deletion Flag to indicate context of destruction 102 * @param[in] deletion Flag to indicate context of destruction
103 */ 103 */
104void 104void
105destroy_room (struct GNUNET_MESSENGER_SrvRoom *room, 105destroy_srv_room (struct GNUNET_MESSENGER_SrvRoom *room,
106 int deletion); 106 int deletion);
107 107
108/** 108/**
@@ -112,7 +112,7 @@ destroy_room (struct GNUNET_MESSENGER_SrvRoom *room,
112 * @return Member store 112 * @return Member store
113 */ 113 */
114struct GNUNET_MESSENGER_MemberStore* 114struct GNUNET_MESSENGER_MemberStore*
115get_room_member_store (struct GNUNET_MESSENGER_SrvRoom *room); 115get_srv_room_member_store (struct GNUNET_MESSENGER_SrvRoom *room);
116 116
117/** 117/**
118 * Returns the used message store of a given <i>room</i>. 118 * Returns the used message store of a given <i>room</i>.
@@ -121,7 +121,7 @@ get_room_member_store (struct GNUNET_MESSENGER_SrvRoom *room);
121 * @return Message store 121 * @return Message store
122 */ 122 */
123struct GNUNET_MESSENGER_MessageStore* 123struct GNUNET_MESSENGER_MessageStore*
124get_room_message_store (struct GNUNET_MESSENGER_SrvRoom *room); 124get_srv_room_message_store (struct GNUNET_MESSENGER_SrvRoom *room);
125 125
126/** 126/**
127 * Returns the used operation store of a given <i>room</i>. 127 * Returns the used operation store of a given <i>room</i>.
@@ -130,7 +130,7 @@ get_room_message_store (struct GNUNET_MESSENGER_SrvRoom *room);
130 * @return Operation store 130 * @return Operation store
131 */ 131 */
132struct GNUNET_MESSENGER_OperationStore* 132struct GNUNET_MESSENGER_OperationStore*
133get_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room); 133get_srv_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room);
134 134
135/** 135/**
136 * Tries to open a <i>room</i> for a given <i>handle</i>. If the room has already been opened, the handle 136 * Tries to open a <i>room</i> for a given <i>handle</i>. If the room has already been opened, the handle
@@ -145,8 +145,8 @@ get_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room);
145 * @return #GNUNET_YES on success, #GNUNET_NO on failure. 145 * @return #GNUNET_YES on success, #GNUNET_NO on failure.
146 */ 146 */
147int 147int
148open_room (struct GNUNET_MESSENGER_SrvRoom *room, 148open_srv_room (struct GNUNET_MESSENGER_SrvRoom *room,
149 struct GNUNET_MESSENGER_SrvHandle *handle); 149 struct GNUNET_MESSENGER_SrvHandle *handle);
150 150
151/** 151/**
152 * Connects a tunnel to a hosting peer of a <i>room</i> through a so called <i>door</i> which is represented by 152 * Connects a tunnel to a hosting peer of a <i>room</i> through a so called <i>door</i> which is represented by
@@ -159,9 +159,9 @@ open_room (struct GNUNET_MESSENGER_SrvRoom *room,
159 * @return #GNUNET_YES on success, #GNUNET_NO on failure. 159 * @return #GNUNET_YES on success, #GNUNET_NO on failure.
160 */ 160 */
161int 161int
162enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room, 162enter_srv_room_at (struct GNUNET_MESSENGER_SrvRoom *room,
163 struct GNUNET_MESSENGER_SrvHandle *handle, 163 struct GNUNET_MESSENGER_SrvHandle *handle,
164 const struct GNUNET_PeerIdentity *door); 164 const struct GNUNET_PeerIdentity *door);
165 165
166/** 166/**
167 * Packs a <i>message</i> depending on the selected <i>mode</i> into a newly allocated envelope. It will set the 167 * Packs a <i>message</i> depending on the selected <i>mode</i> into a newly allocated envelope. It will set the
@@ -181,11 +181,11 @@ enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room,
181 * @return New envelope or NULL 181 * @return New envelope or NULL
182 */ 182 */
183struct GNUNET_MQ_Envelope* 183struct GNUNET_MQ_Envelope*
184pack_room_message (const struct GNUNET_MESSENGER_SrvRoom *room, 184pack_srv_room_message (const struct GNUNET_MESSENGER_SrvRoom *room,
185 const struct GNUNET_MESSENGER_SrvHandle *handle, 185 const struct GNUNET_MESSENGER_SrvHandle *handle,
186 struct GNUNET_MESSENGER_Message *message, 186 struct GNUNET_MESSENGER_Message *message,
187 struct GNUNET_HashCode *hash, 187 struct GNUNET_HashCode *hash,
188 int mode); 188 int mode);
189 189
190/** 190/**
191 * Sends a <i>message</i> from a given <i>handle</i> into a <i>room</i>. The <i>hash</i> parameter will be 191 * Sends a <i>message</i> from a given <i>handle</i> into a <i>room</i>. The <i>hash</i> parameter will be
@@ -203,9 +203,9 @@ pack_room_message (const struct GNUNET_MESSENGER_SrvRoom *room,
203 * @return #GNUNET_YES on success, #GNUNET_NO or #GNUNET_SYSERR otherwise. 203 * @return #GNUNET_YES on success, #GNUNET_NO or #GNUNET_SYSERR otherwise.
204 */ 204 */
205int 205int
206send_room_message (struct GNUNET_MESSENGER_SrvRoom *room, 206send_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
207 struct GNUNET_MESSENGER_SrvHandle *handle, 207 struct GNUNET_MESSENGER_SrvHandle *handle,
208 struct GNUNET_MESSENGER_Message *message); 208 struct GNUNET_MESSENGER_Message *message);
209 209
210/** 210/**
211 * Forwards a <i>message</i> with a given <i>hash</i> to a specific <i>tunnel</i> inside of a <i>room</i>. 211 * Forwards a <i>message</i> with a given <i>hash</i> to a specific <i>tunnel</i> inside of a <i>room</i>.
@@ -216,10 +216,10 @@ send_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
216 * @param[in] hash Hash of message 216 * @param[in] hash Hash of message
217 */ 217 */
218void 218void
219forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room, 219forward_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
220 struct GNUNET_MESSENGER_SrvTunnel *tunnel, 220 struct GNUNET_MESSENGER_SrvTunnel *tunnel,
221 struct GNUNET_MESSENGER_Message *message, 221 struct GNUNET_MESSENGER_Message *message,
222 const struct GNUNET_HashCode *hash); 222 const struct GNUNET_HashCode *hash);
223 223
224/** 224/**
225 * Checks the current state of opening a given <i>room</i> from this peer and re-publishes it 225 * Checks the current state of opening a given <i>room</i> from this peer and re-publishes it
@@ -230,8 +230,8 @@ forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
230 * @param[in/out] tunnel Tunnel 230 * @param[in/out] tunnel Tunnel
231 */ 231 */
232void 232void
233check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room, 233check_srv_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room,
234 struct GNUNET_MESSENGER_SrvTunnel *tunnel); 234 struct GNUNET_MESSENGER_SrvTunnel *tunnel);
235 235
236/** 236/**
237 * Reduces all current forks inside of the message history of a <i>room</i> to one remaining last message 237 * Reduces all current forks inside of the message history of a <i>room</i> to one remaining last message
@@ -241,8 +241,8 @@ check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room,
241 * @param[in/out] handle Handle 241 * @param[in/out] handle Handle
242 */ 242 */
243void 243void
244merge_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room, 244merge_srv_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room,
245 struct GNUNET_MESSENGER_SrvHandle *handle); 245 struct GNUNET_MESSENGER_SrvHandle *handle);
246 246
247/** 247/**
248 * Deletes a message from the <i>room</i> with a given <i>hash</i> in a specific <i>delay</i> if 248 * Deletes a message from the <i>room</i> with a given <i>hash</i> in a specific <i>delay</i> if
@@ -255,10 +255,10 @@ merge_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room,
255 * @return #GNUNET_YES on success, #GNUNET_NO if permission gets denied, #GNUNET_SYSERR on operation failure 255 * @return #GNUNET_YES on success, #GNUNET_NO if permission gets denied, #GNUNET_SYSERR on operation failure
256 */ 256 */
257int 257int
258delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room, 258delete_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
259 struct GNUNET_MESSENGER_MemberSession *session, 259 struct GNUNET_MESSENGER_MemberSession *session,
260 const struct GNUNET_HashCode *hash, 260 const struct GNUNET_HashCode *hash,
261 const struct GNUNET_TIME_Relative delay); 261 const struct GNUNET_TIME_Relative delay);
262 262
263/** 263/**
264 * Returns the CADET handle from a rooms service. 264 * Returns the CADET handle from a rooms service.
@@ -267,7 +267,7 @@ delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
267 * @return CADET handle 267 * @return CADET handle
268 */ 268 */
269struct GNUNET_CADET_Handle* 269struct GNUNET_CADET_Handle*
270get_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room); 270get_srv_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room);
271 271
272/** 272/**
273 * Returns the shared secret you need to access a <i>room</i>. 273 * Returns the shared secret you need to access a <i>room</i>.
@@ -276,7 +276,7 @@ get_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room);
276 * @return Shared secret 276 * @return Shared secret
277 */ 277 */
278const struct GNUNET_HashCode* 278const struct GNUNET_HashCode*
279get_room_key (const struct GNUNET_MESSENGER_SrvRoom *room); 279get_srv_room_key (const struct GNUNET_MESSENGER_SrvRoom *room);
280 280
281/** 281/**
282 * Returns a tunnel inside of a <i>room</i> leading towards a given <i>peer</i> if such a tunnel exists, 282 * Returns a tunnel inside of a <i>room</i> leading towards a given <i>peer</i> if such a tunnel exists,
@@ -287,8 +287,8 @@ get_room_key (const struct GNUNET_MESSENGER_SrvRoom *room);
287 * @return Tunnel or NULL 287 * @return Tunnel or NULL
288 */ 288 */
289const struct GNUNET_MESSENGER_SrvTunnel* 289const struct GNUNET_MESSENGER_SrvTunnel*
290get_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room, 290get_srv_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room,
291 const struct GNUNET_PeerIdentity *peer); 291 const struct GNUNET_PeerIdentity *peer);
292 292
293/** 293/**
294 * Method called whenever a <i>message</i> is found during a request in a <i>room</i>. 294 * Method called whenever a <i>message</i> is found during a request in a <i>room</i>.
@@ -321,11 +321,11 @@ typedef void (GNUNET_MESSENGER_MessageRequestCallback) (
321 * @return #GNUNET_YES if the request could be processed, otherwise #GNUNET_NO 321 * @return #GNUNET_YES if the request could be processed, otherwise #GNUNET_NO
322 */ 322 */
323int 323int
324request_room_message (struct GNUNET_MESSENGER_SrvRoom *room, 324request_srv_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
325 const struct GNUNET_HashCode *hash, 325 const struct GNUNET_HashCode *hash,
326 const struct GNUNET_MESSENGER_MemberSession *session, 326 const struct GNUNET_MESSENGER_MemberSession *session,
327 GNUNET_MESSENGER_MessageRequestCallback callback, 327 GNUNET_MESSENGER_MessageRequestCallback callback,
328 void* cls); 328 void* cls);
329 329
330/** 330/**
331 * Checks for potential collisions with member ids and solves them changing active handles ids if they 331 * Checks for potential collisions with member ids and solves them changing active handles ids if they
@@ -337,10 +337,10 @@ request_room_message (struct GNUNET_MESSENGER_SrvRoom *room,
337 * @param[in] timestamp Timestamp 337 * @param[in] timestamp Timestamp
338 */ 338 */
339void 339void
340solve_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room, 340solve_srv_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room,
341 const struct GNUNET_IDENTITY_PublicKey *public_key, 341 const struct GNUNET_IDENTITY_PublicKey *public_key,
342 const struct GNUNET_ShortHashCode *member_id, 342 const struct GNUNET_ShortHashCode *member_id,
343 struct GNUNET_TIME_Absolute timestamp); 343 struct GNUNET_TIME_Absolute timestamp);
344 344
345/** 345/**
346 * Rebuilds the decentralized structure for a <i>room</i> by ensuring all required connections are made 346 * Rebuilds the decentralized structure for a <i>room</i> by ensuring all required connections are made
@@ -349,7 +349,7 @@ solve_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room,
349 * @param[in/out] room Room 349 * @param[in/out] room Room
350 */ 350 */
351void 351void
352rebuild_room_basement_structure (struct GNUNET_MESSENGER_SrvRoom *room); 352rebuild_srv_room_basement_structure (struct GNUNET_MESSENGER_SrvRoom *room);
353 353
354/** 354/**
355 * Loads the local configuration for a given <i>room</i> of a service which contains the last messages hash 355 * Loads the local configuration for a given <i>room</i> of a service which contains the last messages hash
@@ -358,7 +358,7 @@ rebuild_room_basement_structure (struct GNUNET_MESSENGER_SrvRoom *room);
358 * @param[out] room Room 358 * @param[out] room Room
359 */ 359 */
360void 360void
361load_room (struct GNUNET_MESSENGER_SrvRoom *room); 361load_srv_room (struct GNUNET_MESSENGER_SrvRoom *room);
362 362
363/** 363/**
364 * Saves the configuration for a given <i>room</i> of a service which contains the last messages hash 364 * Saves the configuration for a given <i>room</i> of a service which contains the last messages hash
@@ -367,7 +367,7 @@ load_room (struct GNUNET_MESSENGER_SrvRoom *room);
367 * @param[in] room Room 367 * @param[in] room Room
368 */ 368 */
369void 369void
370save_room (struct GNUNET_MESSENGER_SrvRoom *room); 370save_srv_room (struct GNUNET_MESSENGER_SrvRoom *room);
371 371
372/** 372/**
373 * Removes the configuration for a given <i>room</i> of a service. 373 * Removes the configuration for a given <i>room</i> of a service.
@@ -375,6 +375,6 @@ save_room (struct GNUNET_MESSENGER_SrvRoom *room);
375 * @param[in] room Room 375 * @param[in] room Room
376 */ 376 */
377void 377void
378remove_room (struct GNUNET_MESSENGER_SrvRoom *room); 378remove_srv_room (struct GNUNET_MESSENGER_SrvRoom *room);
379 379
380#endif //GNUNET_SERVICE_MESSENGER_ROOM_H 380#endif //GNUNET_SERVICE_MESSENGER_ROOM_H