diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-05 15:09:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-05 15:09:28 +0200 |
commit | c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 (patch) | |
tree | cac3ce030d77b4cbe7c7dc62ed58cfe6d24f73e1 /src/fs/gnunet-service-fs_pr.h | |
parent | fbb71d527c7d6babf269a8fefce1db291b9f7068 (diff) | |
download | gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.tar.gz gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.zip |
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.h')
-rw-r--r-- | src/fs/gnunet-service-fs_pr.h | 90 |
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 | */ |
35 | enum GSF_PendingRequestOptions { | 35 | enum 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 | */ |
79 | struct GSF_PendingRequestData { | 81 | struct 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 | */ |
217 | struct GSF_PendingRequest * | 221 | struct GSF_PendingRequest * |
218 | GSF_pending_request_create_(enum GSF_PendingRequestOptions options, | 222 | GSF_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 | */ |
244 | void | 248 | void |
245 | GSF_pending_request_update_(struct GSF_PendingRequest *pr, | 249 | GSF_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 | */ |
256 | struct GSF_PendingRequestData * | 260 | struct GSF_PendingRequestData * |
257 | GSF_pending_request_get_data_(struct GSF_PendingRequest *pr); | 261 | GSF_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 | */ |
266 | int | 270 | int |
267 | GSF_pending_request_test_active_(struct GSF_PendingRequest *pr); | 271 | GSF_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 | */ |
279 | int | 283 | int |
280 | GSF_pending_request_is_compatible_(struct GSF_PendingRequest *pra, | 284 | GSF_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 | */ |
291 | struct GNUNET_MQ_Envelope * | 295 | struct GNUNET_MQ_Envelope * |
292 | GSF_pending_request_get_message_(struct GSF_PendingRequest *pr); | 296 | GSF_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 | */ |
301 | void | 305 | void |
302 | GSF_pending_request_cancel_(struct GSF_PendingRequest *pr, | 306 | GSF_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 | */ |
327 | void | 331 | void |
328 | GSF_iterate_pending_requests_(GSF_PendingRequestIterator it, | 332 | GSF_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 | */ |
341 | void | 345 | void |
342 | handle_p2p_put(void *cls, | 346 | handle_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 | */ |
351 | void | 355 | void |
352 | GSF_dht_lookup_(struct GSF_PendingRequest *pr); | 356 | GSF_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 | */ |
360 | void | 364 | void |
361 | GSF_cadet_lookup_(struct GSF_PendingRequest *pr); | 365 | GSF_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 | */ |
385 | void | 389 | void |
386 | GSF_local_lookup_(struct GSF_PendingRequest *pr, | 390 | GSF_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 | */ |
398 | int | 402 | int |
399 | GSF_pending_request_test_target_(struct GSF_PendingRequest *pr, | 403 | GSF_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 | */ |
407 | void | 411 | void |
408 | GSF_pending_request_init_(void); | 412 | GSF_pending_request_init_ (void); |
409 | 413 | ||
410 | 414 | ||
411 | /** | 415 | /** |
412 | * Shutdown the subsystem. | 416 | * Shutdown the subsystem. |
413 | */ | 417 | */ |
414 | void | 418 | void |
415 | GSF_pending_request_done_(void); | 419 | GSF_pending_request_done_ (void); |
416 | 420 | ||
417 | 421 | ||
418 | #endif | 422 | #endif |