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.h90
1 files changed, 47 insertions, 43 deletions
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h
index 39e471c4d..f22f85ee0 100644
--- a/src/fs/gnunet-service-fs_pr.h
+++ b/src/fs/gnunet-service-fs_pr.h
@@ -32,7 +32,8 @@
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{
36 /** 37 /**
37 * No special options (P2P-default). 38 * No special options (P2P-default).
38 */ 39 */
@@ -67,7 +68,8 @@ enum GSF_PendingRequestOptions {
67 * Option mask for typical local requests. 68 * Option mask for typical local requests.
68 */ 69 */
69 GSF_PRO_LOCAL_REQUEST = 70 GSF_PRO_LOCAL_REQUEST =
70 (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED | GSF_PRO_REQUEST_NEVER_EXPIRES) 71 (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED
72 | GSF_PRO_REQUEST_NEVER_EXPIRES)
71}; 73};
72 74
73 75
@@ -76,7 +78,8 @@ enum GSF_PendingRequestOptions {
76 * 'gnunet-service-fs_pr', not in the sense of network-wide 78 * 'gnunet-service-fs_pr', not in the sense of network-wide
77 * known) associated with each pending request. 79 * known) associated with each pending request.
78 */ 80 */
79struct GSF_PendingRequestData { 81struct GSF_PendingRequestData
82{
80 /** 83 /**
81 * Primary query hash for this request. 84 * Primary query hash for this request.
82 */ 85 */
@@ -186,7 +189,8 @@ typedef void
186 struct GSF_PendingRequest *pr, 189 struct GSF_PendingRequest *pr,
187 uint32_t reply_anonymity_level, 190 uint32_t reply_anonymity_level,
188 struct GNUNET_TIME_Absolute expiration, 191 struct GNUNET_TIME_Absolute expiration,
189 struct GNUNET_TIME_Absolute last_transmission, 192 struct GNUNET_TIME_Absolute
193 last_transmission,
190 enum GNUNET_BLOCK_Type type, 194 enum GNUNET_BLOCK_Type type,
191 const void *data, 195 const void *data,
192 size_t data_len); 196 size_t data_len);
@@ -215,22 +219,22 @@ typedef void
215 * @return handle for the new pending request 219 * @return handle for the new pending request
216 */ 220 */
217struct GSF_PendingRequest * 221struct GSF_PendingRequest *
218GSF_pending_request_create_(enum GSF_PendingRequestOptions options, 222GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
219 enum GNUNET_BLOCK_Type type, 223 enum GNUNET_BLOCK_Type type,
220 const struct GNUNET_HashCode *query, 224 const struct GNUNET_HashCode *query,
221 const struct GNUNET_PeerIdentity *target, 225 const struct GNUNET_PeerIdentity *target,
222 const char *bf_data, 226 const char *bf_data,
223 size_t bf_size, 227 size_t bf_size,
224 uint32_t mingle, 228 uint32_t mingle,
225 uint32_t anonymity_level, 229 uint32_t anonymity_level,
226 uint32_t priority, 230 uint32_t priority,
227 int32_t ttl, 231 int32_t ttl,
228 GNUNET_PEER_Id sender_pid, 232 GNUNET_PEER_Id sender_pid,
229 GNUNET_PEER_Id origin_pid, 233 GNUNET_PEER_Id origin_pid,
230 const struct GNUNET_HashCode *replies_seen, 234 const struct GNUNET_HashCode *replies_seen,
231 unsigned int replies_seen_count, 235 unsigned int replies_seen_count,
232 GSF_PendingRequestReplyHandler rh, 236 GSF_PendingRequestReplyHandler rh,
233 void *rh_cls); 237 void *rh_cls);
234 238
235 239
236/** 240/**
@@ -242,9 +246,9 @@ GSF_pending_request_create_(enum GSF_PendingRequestOptions options,
242 * @param replies_seen_count size of the @a replies_seen array 246 * @param replies_seen_count size of the @a replies_seen array
243 */ 247 */
244void 248void
245GSF_pending_request_update_(struct GSF_PendingRequest *pr, 249GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
246 const struct GNUNET_HashCode *replies_seen, 250 const struct GNUNET_HashCode *replies_seen,
247 unsigned int replies_seen_count); 251 unsigned int replies_seen_count);
248 252
249 253
250/** 254/**
@@ -254,7 +258,7 @@ GSF_pending_request_update_(struct GSF_PendingRequest *pr,
254 * @return associated public data 258 * @return associated public data
255 */ 259 */
256struct GSF_PendingRequestData * 260struct GSF_PendingRequestData *
257GSF_pending_request_get_data_(struct GSF_PendingRequest *pr); 261GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr);
258 262
259 263
260/** 264/**
@@ -264,7 +268,7 @@ GSF_pending_request_get_data_(struct GSF_PendingRequest *pr);
264 * @return #GNUNET_YES if the request is still active 268 * @return #GNUNET_YES if the request is still active
265 */ 269 */
266int 270int
267GSF_pending_request_test_active_(struct GSF_PendingRequest *pr); 271GSF_pending_request_test_active_ (struct GSF_PendingRequest *pr);
268 272
269 273
270/** 274/**
@@ -277,8 +281,8 @@ GSF_pending_request_test_active_(struct GSF_PendingRequest *pr);
277 * @return #GNUNET_OK if the requests are compatible 281 * @return #GNUNET_OK if the requests are compatible
278 */ 282 */
279int 283int
280GSF_pending_request_is_compatible_(struct GSF_PendingRequest *pra, 284GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
281 struct GSF_PendingRequest *prb); 285 struct GSF_PendingRequest *prb);
282 286
283 287
284/** 288/**
@@ -289,7 +293,7 @@ GSF_pending_request_is_compatible_(struct GSF_PendingRequest *pra,
289 * @return envelope with the request message 293 * @return envelope with the request message
290 */ 294 */
291struct GNUNET_MQ_Envelope * 295struct GNUNET_MQ_Envelope *
292GSF_pending_request_get_message_(struct GSF_PendingRequest *pr); 296GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr);
293 297
294 298
295/** 299/**
@@ -299,8 +303,8 @@ GSF_pending_request_get_message_(struct GSF_PendingRequest *pr);
299 * @param full_cleanup fully purge the request 303 * @param full_cleanup fully purge the request
300 */ 304 */
301void 305void
302GSF_pending_request_cancel_(struct GSF_PendingRequest *pr, 306GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr,
303 int full_cleanup); 307 int full_cleanup);
304 308
305 309
306/** 310/**
@@ -325,8 +329,8 @@ typedef int
325 * @param cls closure for it 329 * @param cls closure for it
326 */ 330 */
327void 331void
328GSF_iterate_pending_requests_(GSF_PendingRequestIterator it, 332GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it,
329 void *cls); 333 void *cls);
330 334
331 335
332/** 336/**
@@ -339,8 +343,8 @@ GSF_iterate_pending_requests_(GSF_PendingRequestIterator it,
339 * @param put the actual message 343 * @param put the actual message
340 */ 344 */
341void 345void
342handle_p2p_put(void *cls, 346handle_p2p_put (void *cls,
343 const struct PutMessage *put); 347 const struct PutMessage *put);
344 348
345 349
346/** 350/**
@@ -349,7 +353,7 @@ handle_p2p_put(void *cls,
349 * @param pr the pending request to process 353 * @param pr the pending request to process
350 */ 354 */
351void 355void
352GSF_dht_lookup_(struct GSF_PendingRequest *pr); 356GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
353 357
354 358
355/** 359/**
@@ -358,7 +362,7 @@ GSF_dht_lookup_(struct GSF_PendingRequest *pr);
358 * @param pr the pending request to process 362 * @param pr the pending request to process
359 */ 363 */
360void 364void
361GSF_cadet_lookup_(struct GSF_PendingRequest *pr); 365GSF_cadet_lookup_ (struct GSF_PendingRequest *pr);
362 366
363 367
364/** 368/**
@@ -383,9 +387,9 @@ typedef void
383 * @param cont_cls closure for @a cont 387 * @param cont_cls closure for @a cont
384 */ 388 */
385void 389void
386GSF_local_lookup_(struct GSF_PendingRequest *pr, 390GSF_local_lookup_ (struct GSF_PendingRequest *pr,
387 GSF_LocalLookupContinuation cont, 391 GSF_LocalLookupContinuation cont,
388 void *cont_cls); 392 void *cont_cls);
389 393
390 394
391/** 395/**
@@ -396,8 +400,8 @@ GSF_local_lookup_(struct GSF_PendingRequest *pr,
396 * @return #GNUNET_YES if this request could be forwarded to the given peer 400 * @return #GNUNET_YES if this request could be forwarded to the given peer
397 */ 401 */
398int 402int
399GSF_pending_request_test_target_(struct GSF_PendingRequest *pr, 403GSF_pending_request_test_target_ (struct GSF_PendingRequest *pr,
400 const struct GNUNET_PeerIdentity *target); 404 const struct GNUNET_PeerIdentity *target);
401 405
402 406
403 407
@@ -405,14 +409,14 @@ GSF_pending_request_test_target_(struct GSF_PendingRequest *pr,
405 * Setup the subsystem. 409 * Setup the subsystem.
406 */ 410 */
407void 411void
408GSF_pending_request_init_(void); 412GSF_pending_request_init_ (void);
409 413
410 414
411/** 415/**
412 * Shutdown the subsystem. 416 * Shutdown the subsystem.
413 */ 417 */
414void 418void
415GSF_pending_request_done_(void); 419GSF_pending_request_done_ (void);
416 420
417 421
418#endif 422#endif