diff options
Diffstat (limited to 'src/set/gnunet-service-set.h')
-rw-r--r-- | src/set/gnunet-service-set.h | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/src/set/gnunet-service-set.h b/src/set/gnunet-service-set.h index 2234a5c72..402281da4 100644 --- a/src/set/gnunet-service-set.h +++ b/src/set/gnunet-service-set.h | |||
@@ -159,7 +159,8 @@ typedef void | |||
159 | * Dispatch table for a specific set operation. Every set operation | 159 | * Dispatch table for a specific set operation. Every set operation |
160 | * has to implement the callback in this struct. | 160 | * has to implement the callback in this struct. |
161 | */ | 161 | */ |
162 | struct SetVT { | 162 | struct SetVT |
163 | { | ||
163 | /** | 164 | /** |
164 | * Callback for the set creation. | 165 | * Callback for the set creation. |
165 | */ | 166 | */ |
@@ -211,7 +212,8 @@ struct SetVT { | |||
211 | * MutationEvent gives information about changes | 212 | * MutationEvent gives information about changes |
212 | * to an element (removal / addition) in a set content. | 213 | * to an element (removal / addition) in a set content. |
213 | */ | 214 | */ |
214 | struct MutationEvent { | 215 | struct MutationEvent |
216 | { | ||
215 | /** | 217 | /** |
216 | * First generation affected by this mutation event. | 218 | * First generation affected by this mutation event. |
217 | * | 219 | * |
@@ -234,7 +236,8 @@ struct MutationEvent { | |||
234 | * Element`, so that the remove and add operations are reasonably | 236 | * Element`, so that the remove and add operations are reasonably |
235 | * fast. | 237 | * fast. |
236 | */ | 238 | */ |
237 | struct ElementEntry { | 239 | struct ElementEntry |
240 | { | ||
238 | /** | 241 | /** |
239 | * The actual element. The data for the element | 242 | * The actual element. The data for the element |
240 | * should be allocated at the end of this struct. | 243 | * should be allocated at the end of this struct. |
@@ -281,7 +284,8 @@ struct Listener; | |||
281 | /** | 284 | /** |
282 | * State we keep per client. | 285 | * State we keep per client. |
283 | */ | 286 | */ |
284 | struct ClientState { | 287 | struct ClientState |
288 | { | ||
285 | /** | 289 | /** |
286 | * Set, if associated with the client, otherwise NULL. | 290 | * Set, if associated with the client, otherwise NULL. |
287 | */ | 291 | */ |
@@ -307,7 +311,8 @@ struct ClientState { | |||
307 | /** | 311 | /** |
308 | * Operation context used to execute a set operation. | 312 | * Operation context used to execute a set operation. |
309 | */ | 313 | */ |
310 | struct Operation { | 314 | struct Operation |
315 | { | ||
311 | /** | 316 | /** |
312 | * Kept in a DLL of the listener, if @e listener is non-NULL. | 317 | * Kept in a DLL of the listener, if @e listener is non-NULL. |
313 | */ | 318 | */ |
@@ -426,7 +431,8 @@ struct Operation { | |||
426 | * SetContent stores the actual set elements, which may be shared by | 431 | * SetContent stores the actual set elements, which may be shared by |
427 | * multiple generations derived from one set. | 432 | * multiple generations derived from one set. |
428 | */ | 433 | */ |
429 | struct SetContent { | 434 | struct SetContent |
435 | { | ||
430 | /** | 436 | /** |
431 | * Maps `struct GNUNET_HashCode *` to `struct ElementEntry *`. | 437 | * Maps `struct GNUNET_HashCode *` to `struct ElementEntry *`. |
432 | */ | 438 | */ |
@@ -463,7 +469,8 @@ struct SetContent { | |||
463 | }; | 469 | }; |
464 | 470 | ||
465 | 471 | ||
466 | struct GenerationRange { | 472 | struct GenerationRange |
473 | { | ||
467 | /** | 474 | /** |
468 | * First generation that is excluded. | 475 | * First generation that is excluded. |
469 | */ | 476 | */ |
@@ -479,7 +486,8 @@ struct GenerationRange { | |||
479 | /** | 486 | /** |
480 | * Information about a mutation to apply to a set. | 487 | * Information about a mutation to apply to a set. |
481 | */ | 488 | */ |
482 | struct PendingMutation { | 489 | struct PendingMutation |
490 | { | ||
483 | /** | 491 | /** |
484 | * Mutations are kept in a DLL. | 492 | * Mutations are kept in a DLL. |
485 | */ | 493 | */ |
@@ -507,7 +515,8 @@ struct PendingMutation { | |||
507 | /** | 515 | /** |
508 | * A set that supports a specific operation with other peers. | 516 | * A set that supports a specific operation with other peers. |
509 | */ | 517 | */ |
510 | struct Set { | 518 | struct Set |
519 | { | ||
511 | /** | 520 | /** |
512 | * Sets are held in a doubly linked list (in `sets_head` and `sets_tail`). | 521 | * Sets are held in a doubly linked list (in `sets_head` and `sets_tail`). |
513 | */ | 522 | */ |
@@ -611,8 +620,8 @@ extern struct GNUNET_STATISTICS_Handle *_GSS_statistics; | |||
611 | * @param gc #GNUNET_YES to perform garbage collection on the set | 620 | * @param gc #GNUNET_YES to perform garbage collection on the set |
612 | */ | 621 | */ |
613 | void | 622 | void |
614 | _GSS_operation_destroy(struct Operation *op, | 623 | _GSS_operation_destroy (struct Operation *op, |
615 | int gc); | 624 | int gc); |
616 | 625 | ||
617 | 626 | ||
618 | /** | 627 | /** |
@@ -621,7 +630,7 @@ _GSS_operation_destroy(struct Operation *op, | |||
621 | * logic in the various places where it is called. | 630 | * logic in the various places where it is called. |
622 | */ | 631 | */ |
623 | void | 632 | void |
624 | _GSS_operation_destroy2(struct Operation *op); | 633 | _GSS_operation_destroy2 (struct Operation *op); |
625 | 634 | ||
626 | 635 | ||
627 | /** | 636 | /** |
@@ -630,7 +639,7 @@ _GSS_operation_destroy2(struct Operation *op); | |||
630 | * @return the operation specific VTable | 639 | * @return the operation specific VTable |
631 | */ | 640 | */ |
632 | const struct SetVT * | 641 | const struct SetVT * |
633 | _GSS_union_vt(void); | 642 | _GSS_union_vt (void); |
634 | 643 | ||
635 | 644 | ||
636 | /** | 645 | /** |
@@ -639,7 +648,7 @@ _GSS_union_vt(void); | |||
639 | * @return the operation specific VTable | 648 | * @return the operation specific VTable |
640 | */ | 649 | */ |
641 | const struct SetVT * | 650 | const struct SetVT * |
642 | _GSS_intersection_vt(void); | 651 | _GSS_intersection_vt (void); |
643 | 652 | ||
644 | 653 | ||
645 | /** | 654 | /** |
@@ -650,8 +659,8 @@ _GSS_intersection_vt(void); | |||
650 | * @return #GNUNET_YES if the element is in the set, #GNUNET_NO if not | 659 | * @return #GNUNET_YES if the element is in the set, #GNUNET_NO if not |
651 | */ | 660 | */ |
652 | int | 661 | int |
653 | _GSS_is_element_of_operation(struct ElementEntry *ee, | 662 | _GSS_is_element_of_operation (struct ElementEntry *ee, |
654 | struct Operation *op); | 663 | struct Operation *op); |
655 | 664 | ||
656 | 665 | ||
657 | #endif | 666 | #endif |