diff options
Diffstat (limited to 'src/messenger/gnunet-service-messenger_room.h')
-rw-r--r-- | src/messenger/gnunet-service-messenger_room.h | 96 |
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 | */ |
91 | struct GNUNET_MESSENGER_SrvRoom* | 91 | struct GNUNET_MESSENGER_SrvRoom* |
92 | create_room (struct GNUNET_MESSENGER_SrvHandle *handle, | 92 | create_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 | */ |
104 | void | 104 | void |
105 | destroy_room (struct GNUNET_MESSENGER_SrvRoom *room, | 105 | destroy_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 | */ |
114 | struct GNUNET_MESSENGER_MemberStore* | 114 | struct GNUNET_MESSENGER_MemberStore* |
115 | get_room_member_store (struct GNUNET_MESSENGER_SrvRoom *room); | 115 | get_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 | */ |
123 | struct GNUNET_MESSENGER_MessageStore* | 123 | struct GNUNET_MESSENGER_MessageStore* |
124 | get_room_message_store (struct GNUNET_MESSENGER_SrvRoom *room); | 124 | get_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 | */ |
132 | struct GNUNET_MESSENGER_OperationStore* | 132 | struct GNUNET_MESSENGER_OperationStore* |
133 | get_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room); | 133 | get_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 | */ |
147 | int | 147 | int |
148 | open_room (struct GNUNET_MESSENGER_SrvRoom *room, | 148 | open_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 | */ |
161 | int | 161 | int |
162 | enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room, | 162 | enter_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 | */ |
183 | struct GNUNET_MQ_Envelope* | 183 | struct GNUNET_MQ_Envelope* |
184 | pack_room_message (const struct GNUNET_MESSENGER_SrvRoom *room, | 184 | pack_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 | */ |
205 | int | 205 | int |
206 | send_room_message (struct GNUNET_MESSENGER_SrvRoom *room, | 206 | send_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 | */ |
218 | void | 218 | void |
219 | forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room, | 219 | forward_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 | */ |
232 | void | 232 | void |
233 | check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room, | 233 | check_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 | */ |
243 | void | 243 | void |
244 | merge_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room, | 244 | merge_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 | */ |
257 | int | 257 | int |
258 | delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room, | 258 | delete_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 | */ |
269 | struct GNUNET_CADET_Handle* | 269 | struct GNUNET_CADET_Handle* |
270 | get_room_cadet (struct GNUNET_MESSENGER_SrvRoom *room); | 270 | get_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 | */ |
278 | const struct GNUNET_HashCode* | 278 | const struct GNUNET_HashCode* |
279 | get_room_key (const struct GNUNET_MESSENGER_SrvRoom *room); | 279 | get_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 | */ |
289 | const struct GNUNET_MESSENGER_SrvTunnel* | 289 | const struct GNUNET_MESSENGER_SrvTunnel* |
290 | get_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room, | 290 | get_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 | */ |
323 | int | 323 | int |
324 | request_room_message (struct GNUNET_MESSENGER_SrvRoom *room, | 324 | request_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 | */ |
339 | void | 339 | void |
340 | solve_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room, | 340 | solve_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 | */ |
351 | void | 351 | void |
352 | rebuild_room_basement_structure (struct GNUNET_MESSENGER_SrvRoom *room); | 352 | rebuild_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 | */ |
360 | void | 360 | void |
361 | load_room (struct GNUNET_MESSENGER_SrvRoom *room); | 361 | load_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 | */ |
369 | void | 369 | void |
370 | save_room (struct GNUNET_MESSENGER_SrvRoom *room); | 370 | save_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 | */ |
377 | void | 377 | void |
378 | remove_room (struct GNUNET_MESSENGER_SrvRoom *room); | 378 | remove_srv_room (struct GNUNET_MESSENGER_SrvRoom *room); |
379 | 379 | ||
380 | #endif //GNUNET_SERVICE_MESSENGER_ROOM_H | 380 | #endif //GNUNET_SERVICE_MESSENGER_ROOM_H |