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/include/gnunet_set_service.h | |
parent | fbb71d527c7d6babf269a8fefce1db291b9f7068 (diff) | |
download | gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.tar.gz gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.zip |
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/include/gnunet_set_service.h')
-rw-r--r-- | src/include/gnunet_set_service.h | 105 |
1 files changed, 56 insertions, 49 deletions
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h index 4016fc362..13f761d7d 100644 --- a/src/include/gnunet_set_service.h +++ b/src/include/gnunet_set_service.h | |||
@@ -79,7 +79,8 @@ struct GNUNET_SET_OperationHandle; | |||
79 | /** | 79 | /** |
80 | * The operation that a set set supports. | 80 | * The operation that a set set supports. |
81 | */ | 81 | */ |
82 | enum GNUNET_SET_OperationType { | 82 | enum GNUNET_SET_OperationType |
83 | { | ||
83 | /** | 84 | /** |
84 | * A purely local set that does not support any operation. | 85 | * A purely local set that does not support any operation. |
85 | */ | 86 | */ |
@@ -100,7 +101,8 @@ enum GNUNET_SET_OperationType { | |||
100 | /** | 101 | /** |
101 | * Status for the result callback | 102 | * Status for the result callback |
102 | */ | 103 | */ |
103 | enum GNUNET_SET_Status { | 104 | enum GNUNET_SET_Status |
105 | { | ||
104 | /** | 106 | /** |
105 | * Everything went ok, we are transmitting an element of the | 107 | * Everything went ok, we are transmitting an element of the |
106 | * result (in set, or to be removed from set, depending on | 108 | * result (in set, or to be removed from set, depending on |
@@ -155,7 +157,8 @@ enum GNUNET_SET_Status { | |||
155 | /** | 157 | /** |
156 | * The way results are given to the client. | 158 | * The way results are given to the client. |
157 | */ | 159 | */ |
158 | enum GNUNET_SET_ResultMode { | 160 | enum GNUNET_SET_ResultMode |
161 | { | ||
159 | /** | 162 | /** |
160 | * Client gets every element in the resulting set. | 163 | * Client gets every element in the resulting set. |
161 | * | 164 | * |
@@ -190,7 +193,8 @@ enum GNUNET_SET_ResultMode { | |||
190 | /** | 193 | /** |
191 | * Element stored in a set. | 194 | * Element stored in a set. |
192 | */ | 195 | */ |
193 | struct GNUNET_SET_Element { | 196 | struct GNUNET_SET_Element |
197 | { | ||
194 | /** | 198 | /** |
195 | * Number of bytes in the buffer pointed to by data. | 199 | * Number of bytes in the buffer pointed to by data. |
196 | */ | 200 | */ |
@@ -213,7 +217,8 @@ struct GNUNET_SET_Element { | |||
213 | * | 217 | * |
214 | * Used as tag for struct #GNUNET_SET_Option. | 218 | * Used as tag for struct #GNUNET_SET_Option. |
215 | */ | 219 | */ |
216 | enum GNUNET_SET_OptionType { | 220 | enum GNUNET_SET_OptionType |
221 | { | ||
217 | /** | 222 | /** |
218 | * List terminator. | 223 | * List terminator. |
219 | */ | 224 | */ |
@@ -243,7 +248,8 @@ enum GNUNET_SET_OptionType { | |||
243 | /** | 248 | /** |
244 | * Option for set operations. | 249 | * Option for set operations. |
245 | */ | 250 | */ |
246 | struct GNUNET_SET_Option { | 251 | struct GNUNET_SET_Option |
252 | { | ||
247 | /** | 253 | /** |
248 | * Type of the option. | 254 | * Type of the option. |
249 | */ | 255 | */ |
@@ -252,7 +258,8 @@ struct GNUNET_SET_Option { | |||
252 | /** | 258 | /** |
253 | * Value for the option, only used with some options. | 259 | * Value for the option, only used with some options. |
254 | */ | 260 | */ |
255 | union { | 261 | union |
262 | { | ||
256 | uint64_t num; | 263 | uint64_t num; |
257 | } v; | 264 | } v; |
258 | }; | 265 | }; |
@@ -335,8 +342,8 @@ typedef void | |||
335 | * @return a handle to the set | 342 | * @return a handle to the set |
336 | */ | 343 | */ |
337 | struct GNUNET_SET_Handle * | 344 | struct GNUNET_SET_Handle * |
338 | GNUNET_SET_create(const struct GNUNET_CONFIGURATION_Handle *cfg, | 345 | GNUNET_SET_create (const struct GNUNET_CONFIGURATION_Handle *cfg, |
339 | enum GNUNET_SET_OperationType op); | 346 | enum GNUNET_SET_OperationType op); |
340 | 347 | ||
341 | 348 | ||
342 | /** | 349 | /** |
@@ -353,10 +360,10 @@ GNUNET_SET_create(const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
353 | * set is invalid (e.g. the set service crashed) | 360 | * set is invalid (e.g. the set service crashed) |
354 | */ | 361 | */ |
355 | int | 362 | int |
356 | GNUNET_SET_add_element(struct GNUNET_SET_Handle *set, | 363 | GNUNET_SET_add_element (struct GNUNET_SET_Handle *set, |
357 | const struct GNUNET_SET_Element *element, | 364 | const struct GNUNET_SET_Element *element, |
358 | GNUNET_SET_Continuation cont, | 365 | GNUNET_SET_Continuation cont, |
359 | void *cont_cls); | 366 | void *cont_cls); |
360 | 367 | ||
361 | 368 | ||
362 | /** | 369 | /** |
@@ -373,16 +380,16 @@ GNUNET_SET_add_element(struct GNUNET_SET_Handle *set, | |||
373 | * set is invalid (e.g. the set service crashed) | 380 | * set is invalid (e.g. the set service crashed) |
374 | */ | 381 | */ |
375 | int | 382 | int |
376 | GNUNET_SET_remove_element(struct GNUNET_SET_Handle *set, | 383 | GNUNET_SET_remove_element (struct GNUNET_SET_Handle *set, |
377 | const struct GNUNET_SET_Element *element, | 384 | const struct GNUNET_SET_Element *element, |
378 | GNUNET_SET_Continuation cont, | 385 | GNUNET_SET_Continuation cont, |
379 | void *cont_cls); | 386 | void *cont_cls); |
380 | 387 | ||
381 | 388 | ||
382 | void | 389 | void |
383 | GNUNET_SET_copy_lazy(struct GNUNET_SET_Handle *set, | 390 | GNUNET_SET_copy_lazy (struct GNUNET_SET_Handle *set, |
384 | GNUNET_SET_CopyReadyCallback cb, | 391 | GNUNET_SET_CopyReadyCallback cb, |
385 | void *cls); | 392 | void *cls); |
386 | 393 | ||
387 | 394 | ||
388 | /** | 395 | /** |
@@ -394,7 +401,7 @@ GNUNET_SET_copy_lazy(struct GNUNET_SET_Handle *set, | |||
394 | * @param set set to destroy | 401 | * @param set set to destroy |
395 | */ | 402 | */ |
396 | void | 403 | void |
397 | GNUNET_SET_destroy(struct GNUNET_SET_Handle *set); | 404 | GNUNET_SET_destroy (struct GNUNET_SET_Handle *set); |
398 | 405 | ||
399 | 406 | ||
400 | /** | 407 | /** |
@@ -412,13 +419,13 @@ GNUNET_SET_destroy(struct GNUNET_SET_Handle *set); | |||
412 | * @return a handle to cancel the operation | 419 | * @return a handle to cancel the operation |
413 | */ | 420 | */ |
414 | struct GNUNET_SET_OperationHandle * | 421 | struct GNUNET_SET_OperationHandle * |
415 | GNUNET_SET_prepare(const struct GNUNET_PeerIdentity *other_peer, | 422 | GNUNET_SET_prepare (const struct GNUNET_PeerIdentity *other_peer, |
416 | const struct GNUNET_HashCode *app_id, | 423 | const struct GNUNET_HashCode *app_id, |
417 | const struct GNUNET_MessageHeader *context_msg, | 424 | const struct GNUNET_MessageHeader *context_msg, |
418 | enum GNUNET_SET_ResultMode result_mode, | 425 | enum GNUNET_SET_ResultMode result_mode, |
419 | struct GNUNET_SET_Option options[], | 426 | struct GNUNET_SET_Option options[], |
420 | GNUNET_SET_ResultIterator result_cb, | 427 | GNUNET_SET_ResultIterator result_cb, |
421 | void *result_cls); | 428 | void *result_cls); |
422 | 429 | ||
423 | 430 | ||
424 | /** | 431 | /** |
@@ -436,11 +443,11 @@ GNUNET_SET_prepare(const struct GNUNET_PeerIdentity *other_peer, | |||
436 | * @return a handle that can be used to cancel the listen operation | 443 | * @return a handle that can be used to cancel the listen operation |
437 | */ | 444 | */ |
438 | struct GNUNET_SET_ListenHandle * | 445 | struct GNUNET_SET_ListenHandle * |
439 | GNUNET_SET_listen(const struct GNUNET_CONFIGURATION_Handle *cfg, | 446 | GNUNET_SET_listen (const struct GNUNET_CONFIGURATION_Handle *cfg, |
440 | enum GNUNET_SET_OperationType op_type, | 447 | enum GNUNET_SET_OperationType op_type, |
441 | const struct GNUNET_HashCode *app_id, | 448 | const struct GNUNET_HashCode *app_id, |
442 | GNUNET_SET_ListenCallback listen_cb, | 449 | GNUNET_SET_ListenCallback listen_cb, |
443 | void *listen_cls); | 450 | void *listen_cls); |
444 | 451 | ||
445 | 452 | ||
446 | /** | 453 | /** |
@@ -452,7 +459,7 @@ GNUNET_SET_listen(const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
452 | * @param lh handle for the listen operation | 459 | * @param lh handle for the listen operation |
453 | */ | 460 | */ |
454 | void | 461 | void |
455 | GNUNET_SET_listen_cancel(struct GNUNET_SET_ListenHandle *lh); | 462 | GNUNET_SET_listen_cancel (struct GNUNET_SET_ListenHandle *lh); |
456 | 463 | ||
457 | 464 | ||
458 | /** | 465 | /** |
@@ -470,11 +477,11 @@ GNUNET_SET_listen_cancel(struct GNUNET_SET_ListenHandle *lh); | |||
470 | * @return a handle to cancel the operation | 477 | * @return a handle to cancel the operation |
471 | */ | 478 | */ |
472 | struct GNUNET_SET_OperationHandle * | 479 | struct GNUNET_SET_OperationHandle * |
473 | GNUNET_SET_accept(struct GNUNET_SET_Request *request, | 480 | GNUNET_SET_accept (struct GNUNET_SET_Request *request, |
474 | enum GNUNET_SET_ResultMode result_mode, | 481 | enum GNUNET_SET_ResultMode result_mode, |
475 | struct GNUNET_SET_Option options[], | 482 | struct GNUNET_SET_Option options[], |
476 | GNUNET_SET_ResultIterator result_cb, | 483 | GNUNET_SET_ResultIterator result_cb, |
477 | void *result_cls); | 484 | void *result_cls); |
478 | 485 | ||
479 | 486 | ||
480 | /** | 487 | /** |
@@ -491,8 +498,8 @@ GNUNET_SET_accept(struct GNUNET_SET_Request *request, | |||
491 | * set is invalid (e.g. the set service crashed) | 498 | * set is invalid (e.g. the set service crashed) |
492 | */ | 499 | */ |
493 | int | 500 | int |
494 | GNUNET_SET_commit(struct GNUNET_SET_OperationHandle *oh, | 501 | GNUNET_SET_commit (struct GNUNET_SET_OperationHandle *oh, |
495 | struct GNUNET_SET_Handle *set); | 502 | struct GNUNET_SET_Handle *set); |
496 | 503 | ||
497 | 504 | ||
498 | /** | 505 | /** |
@@ -503,7 +510,7 @@ GNUNET_SET_commit(struct GNUNET_SET_OperationHandle *oh, | |||
503 | * @param oh set operation to cancel | 510 | * @param oh set operation to cancel |
504 | */ | 511 | */ |
505 | void | 512 | void |
506 | GNUNET_SET_operation_cancel(struct GNUNET_SET_OperationHandle *oh); | 513 | GNUNET_SET_operation_cancel (struct GNUNET_SET_OperationHandle *oh); |
507 | 514 | ||
508 | 515 | ||
509 | /** | 516 | /** |
@@ -520,9 +527,9 @@ GNUNET_SET_operation_cancel(struct GNUNET_SET_OperationHandle *oh); | |||
520 | * #GNUNET_SYSERR if the set is invalid (e.g. the server crashed, disconnected) | 527 | * #GNUNET_SYSERR if the set is invalid (e.g. the server crashed, disconnected) |
521 | */ | 528 | */ |
522 | int | 529 | int |
523 | GNUNET_SET_iterate(struct GNUNET_SET_Handle *set, | 530 | GNUNET_SET_iterate (struct GNUNET_SET_Handle *set, |
524 | GNUNET_SET_ElementIterator iter, | 531 | GNUNET_SET_ElementIterator iter, |
525 | void *iter_cls); | 532 | void *iter_cls); |
526 | 533 | ||
527 | 534 | ||
528 | /** | 535 | /** |
@@ -533,7 +540,7 @@ GNUNET_SET_iterate(struct GNUNET_SET_Handle *set, | |||
533 | * @param set the set to stop iterating over | 540 | * @param set the set to stop iterating over |
534 | */ | 541 | */ |
535 | void | 542 | void |
536 | GNUNET_SET_iterate_cancel(struct GNUNET_SET_Handle *set); | 543 | GNUNET_SET_iterate_cancel (struct GNUNET_SET_Handle *set); |
537 | 544 | ||
538 | 545 | ||
539 | /** | 546 | /** |
@@ -544,7 +551,7 @@ GNUNET_SET_iterate_cancel(struct GNUNET_SET_Handle *set); | |||
544 | * @return the copied element | 551 | * @return the copied element |
545 | */ | 552 | */ |
546 | struct GNUNET_SET_Element * | 553 | struct GNUNET_SET_Element * |
547 | GNUNET_SET_element_dup(const struct GNUNET_SET_Element *element); | 554 | GNUNET_SET_element_dup (const struct GNUNET_SET_Element *element); |
548 | 555 | ||
549 | 556 | ||
550 | /** | 557 | /** |
@@ -555,8 +562,8 @@ GNUNET_SET_element_dup(const struct GNUNET_SET_Element *element); | |||
555 | * should be stored | 562 | * should be stored |
556 | */ | 563 | */ |
557 | void | 564 | void |
558 | GNUNET_SET_element_hash(const struct GNUNET_SET_Element *element, | 565 | GNUNET_SET_element_hash (const struct GNUNET_SET_Element *element, |
559 | struct GNUNET_HashCode *ret_hash); | 566 | struct GNUNET_HashCode *ret_hash); |
560 | 567 | ||
561 | 568 | ||
562 | #if 0 /* keep Emacsens' auto-indent happy */ | 569 | #if 0 /* keep Emacsens' auto-indent happy */ |