aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_pr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.h')
-rw-r--r--src/fs/gnunet-service-fs_pr.h93
1 files changed, 44 insertions, 49 deletions
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h
index abdb0c9f6..39e471c4d 100644
--- a/src/fs/gnunet-service-fs_pr.h
+++ b/src/fs/gnunet-service-fs_pr.h
@@ -11,12 +11,12 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20 20
21/** 21/**
22 * @file fs/gnunet-service-fs_pr.h 22 * @file fs/gnunet-service-fs_pr.h
@@ -32,9 +32,7 @@
32/** 32/**
33 * Options for pending requests (bits to be ORed). 33 * Options for pending requests (bits to be ORed).
34 */ 34 */
35enum GSF_PendingRequestOptions 35enum GSF_PendingRequestOptions {
36{
37
38 /** 36 /**
39 * No special options (P2P-default). 37 * No special options (P2P-default).
40 */ 38 */
@@ -69,7 +67,7 @@ enum GSF_PendingRequestOptions
69 * Option mask for typical local requests. 67 * Option mask for typical local requests.
70 */ 68 */
71 GSF_PRO_LOCAL_REQUEST = 69 GSF_PRO_LOCAL_REQUEST =
72 (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED | GSF_PRO_REQUEST_NEVER_EXPIRES) 70 (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED | GSF_PRO_REQUEST_NEVER_EXPIRES)
73}; 71};
74 72
75 73
@@ -78,9 +76,7 @@ enum GSF_PendingRequestOptions
78 * 'gnunet-service-fs_pr', not in the sense of network-wide 76 * 'gnunet-service-fs_pr', not in the sense of network-wide
79 * known) associated with each pending request. 77 * known) associated with each pending request.
80 */ 78 */
81struct GSF_PendingRequestData 79struct GSF_PendingRequestData {
82{
83
84 /** 80 /**
85 * Primary query hash for this request. 81 * Primary query hash for this request.
86 */ 82 */
@@ -163,7 +159,6 @@ struct GSF_PendingRequestData
163 * we still constructing it? 159 * we still constructing it?
164 */ 160 */
165 int has_started; 161 int has_started;
166
167}; 162};
168 163
169 164
@@ -220,22 +215,22 @@ typedef void
220 * @return handle for the new pending request 215 * @return handle for the new pending request
221 */ 216 */
222struct GSF_PendingRequest * 217struct GSF_PendingRequest *
223GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, 218GSF_pending_request_create_(enum GSF_PendingRequestOptions options,
224 enum GNUNET_BLOCK_Type type, 219 enum GNUNET_BLOCK_Type type,
225 const struct GNUNET_HashCode *query, 220 const struct GNUNET_HashCode *query,
226 const struct GNUNET_PeerIdentity *target, 221 const struct GNUNET_PeerIdentity *target,
227 const char *bf_data, 222 const char *bf_data,
228 size_t bf_size, 223 size_t bf_size,
229 uint32_t mingle, 224 uint32_t mingle,
230 uint32_t anonymity_level, 225 uint32_t anonymity_level,
231 uint32_t priority, 226 uint32_t priority,
232 int32_t ttl, 227 int32_t ttl,
233 GNUNET_PEER_Id sender_pid, 228 GNUNET_PEER_Id sender_pid,
234 GNUNET_PEER_Id origin_pid, 229 GNUNET_PEER_Id origin_pid,
235 const struct GNUNET_HashCode *replies_seen, 230 const struct GNUNET_HashCode *replies_seen,
236 unsigned int replies_seen_count, 231 unsigned int replies_seen_count,
237 GSF_PendingRequestReplyHandler rh, 232 GSF_PendingRequestReplyHandler rh,
238 void *rh_cls); 233 void *rh_cls);
239 234
240 235
241/** 236/**
@@ -247,9 +242,9 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
247 * @param replies_seen_count size of the @a replies_seen array 242 * @param replies_seen_count size of the @a replies_seen array
248 */ 243 */
249void 244void
250GSF_pending_request_update_ (struct GSF_PendingRequest *pr, 245GSF_pending_request_update_(struct GSF_PendingRequest *pr,
251 const struct GNUNET_HashCode *replies_seen, 246 const struct GNUNET_HashCode *replies_seen,
252 unsigned int replies_seen_count); 247 unsigned int replies_seen_count);
253 248
254 249
255/** 250/**
@@ -259,7 +254,7 @@ GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
259 * @return associated public data 254 * @return associated public data
260 */ 255 */
261struct GSF_PendingRequestData * 256struct GSF_PendingRequestData *
262GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr); 257GSF_pending_request_get_data_(struct GSF_PendingRequest *pr);
263 258
264 259
265/** 260/**
@@ -269,7 +264,7 @@ GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr);
269 * @return #GNUNET_YES if the request is still active 264 * @return #GNUNET_YES if the request is still active
270 */ 265 */
271int 266int
272GSF_pending_request_test_active_ (struct GSF_PendingRequest *pr); 267GSF_pending_request_test_active_(struct GSF_PendingRequest *pr);
273 268
274 269
275/** 270/**
@@ -282,8 +277,8 @@ GSF_pending_request_test_active_ (struct GSF_PendingRequest *pr);
282 * @return #GNUNET_OK if the requests are compatible 277 * @return #GNUNET_OK if the requests are compatible
283 */ 278 */
284int 279int
285GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra, 280GSF_pending_request_is_compatible_(struct GSF_PendingRequest *pra,
286 struct GSF_PendingRequest *prb); 281 struct GSF_PendingRequest *prb);
287 282
288 283
289/** 284/**
@@ -294,7 +289,7 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
294 * @return envelope with the request message 289 * @return envelope with the request message
295 */ 290 */
296struct GNUNET_MQ_Envelope * 291struct GNUNET_MQ_Envelope *
297GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr); 292GSF_pending_request_get_message_(struct GSF_PendingRequest *pr);
298 293
299 294
300/** 295/**
@@ -304,8 +299,8 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr);
304 * @param full_cleanup fully purge the request 299 * @param full_cleanup fully purge the request
305 */ 300 */
306void 301void
307GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, 302GSF_pending_request_cancel_(struct GSF_PendingRequest *pr,
308 int full_cleanup); 303 int full_cleanup);
309 304
310 305
311/** 306/**
@@ -330,8 +325,8 @@ typedef int
330 * @param cls closure for it 325 * @param cls closure for it
331 */ 326 */
332void 327void
333GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, 328GSF_iterate_pending_requests_(GSF_PendingRequestIterator it,
334 void *cls); 329 void *cls);
335 330
336 331
337/** 332/**
@@ -344,8 +339,8 @@ GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it,
344 * @param put the actual message 339 * @param put the actual message
345 */ 340 */
346void 341void
347handle_p2p_put (void *cls, 342handle_p2p_put(void *cls,
348 const struct PutMessage *put); 343 const struct PutMessage *put);
349 344
350 345
351/** 346/**
@@ -354,7 +349,7 @@ handle_p2p_put (void *cls,
354 * @param pr the pending request to process 349 * @param pr the pending request to process
355 */ 350 */
356void 351void
357GSF_dht_lookup_ (struct GSF_PendingRequest *pr); 352GSF_dht_lookup_(struct GSF_PendingRequest *pr);
358 353
359 354
360/** 355/**
@@ -363,7 +358,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
363 * @param pr the pending request to process 358 * @param pr the pending request to process
364 */ 359 */
365void 360void
366GSF_cadet_lookup_ (struct GSF_PendingRequest *pr); 361GSF_cadet_lookup_(struct GSF_PendingRequest *pr);
367 362
368 363
369/** 364/**
@@ -388,9 +383,9 @@ typedef void
388 * @param cont_cls closure for @a cont 383 * @param cont_cls closure for @a cont
389 */ 384 */
390void 385void
391GSF_local_lookup_ (struct GSF_PendingRequest *pr, 386GSF_local_lookup_(struct GSF_PendingRequest *pr,
392 GSF_LocalLookupContinuation cont, 387 GSF_LocalLookupContinuation cont,
393 void *cont_cls); 388 void *cont_cls);
394 389
395 390
396/** 391/**
@@ -401,8 +396,8 @@ GSF_local_lookup_ (struct GSF_PendingRequest *pr,
401 * @return #GNUNET_YES if this request could be forwarded to the given peer 396 * @return #GNUNET_YES if this request could be forwarded to the given peer
402 */ 397 */
403int 398int
404GSF_pending_request_test_target_ (struct GSF_PendingRequest *pr, 399GSF_pending_request_test_target_(struct GSF_PendingRequest *pr,
405 const struct GNUNET_PeerIdentity *target); 400 const struct GNUNET_PeerIdentity *target);
406 401
407 402
408 403
@@ -410,14 +405,14 @@ GSF_pending_request_test_target_ (struct GSF_PendingRequest *pr,
410 * Setup the subsystem. 405 * Setup the subsystem.
411 */ 406 */
412void 407void
413GSF_pending_request_init_ (void); 408GSF_pending_request_init_(void);
414 409
415 410
416/** 411/**
417 * Shutdown the subsystem. 412 * Shutdown the subsystem.
418 */ 413 */
419void 414void
420GSF_pending_request_done_ (void); 415GSF_pending_request_done_(void);
421 416
422 417
423#endif 418#endif