diff options
author | Gabor X Toth <*@tg-x.net> | 2013-07-23 05:38:35 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-07-23 05:38:35 +0000 |
commit | 51b67f6beffd8ae186229af8367a7f4220e0f01f (patch) | |
tree | 364afe235839914200834f25a6e12b74939958c1 /src/include/gnunet_multicast_service.h | |
parent | 05a1f3c2535040b00c754676f196c68c3bb60c0b (diff) | |
download | gnunet-51b67f6beffd8ae186229af8367a7f4220e0f01f.tar.gz gnunet-51b67f6beffd8ae186229af8367a7f4220e0f01f.zip |
multicast/psyc: no part cb needed
Diffstat (limited to 'src/include/gnunet_multicast_service.h')
-rw-r--r-- | src/include/gnunet_multicast_service.h | 52 |
1 files changed, 11 insertions, 41 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h index 58f5c4fbe..68d4944de 100644 --- a/src/include/gnunet_multicast_service.h +++ b/src/include/gnunet_multicast_service.h | |||
@@ -164,6 +164,8 @@ struct GNUNET_MULTICAST_MessageHeader | |||
164 | 164 | ||
165 | /** | 165 | /** |
166 | * Byte offset of this @e fragment of the @e message. | 166 | * Byte offset of this @e fragment of the @e message. |
167 | * | ||
168 | * FIXME: needed? | ||
167 | */ | 169 | */ |
168 | uint64_t fragment_offset GNUNET_PACKED; | 170 | uint64_t fragment_offset GNUNET_PACKED; |
169 | 171 | ||
@@ -201,7 +203,7 @@ struct GNUNET_MULTICAST_MessageHeader | |||
201 | uint64_t state_delta GNUNET_PACKED; | 203 | uint64_t state_delta GNUNET_PACKED; |
202 | 204 | ||
203 | /** | 205 | /** |
204 | * Flags for this message. | 206 | * Flags for this message fragment. |
205 | */ | 207 | */ |
206 | enum GNUNET_MULTICAST_MessageFlags flags GNUNET_PACKED; | 208 | enum GNUNET_MULTICAST_MessageFlags flags GNUNET_PACKED; |
207 | 209 | ||
@@ -265,14 +267,6 @@ GNUNET_NETWORK_STRUCT_END | |||
265 | */ | 267 | */ |
266 | struct GNUNET_MULTICAST_JoinHandle; | 268 | struct GNUNET_MULTICAST_JoinHandle; |
267 | 269 | ||
268 | /** | ||
269 | * Handle that identifies a part request. | ||
270 | * | ||
271 | * Used to match calls to #GNUNET_MULTICAST_PartCallback to the | ||
272 | * corresponding calls to GNUNET_MULTICAST_part_ack(). | ||
273 | */ | ||
274 | struct GNUNET_MULTICAST_PartHandle; | ||
275 | |||
276 | 270 | ||
277 | /** | 271 | /** |
278 | * Function to call with the decision made for a join request. | 272 | * Function to call with the decision made for a join request. |
@@ -305,15 +299,6 @@ GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh, | |||
305 | 299 | ||
306 | 300 | ||
307 | /** | 301 | /** |
308 | * Part acknowledgment. | ||
309 | * | ||
310 | * @param ph Part handle. | ||
311 | */ | ||
312 | void | ||
313 | GNUNET_MULTICAST_part_ack (struct GNUNET_MULTICAST_PartHandle *ph); | ||
314 | |||
315 | |||
316 | /** | ||
317 | * Method called whenever another peer wants to join the multicast group. | 302 | * Method called whenever another peer wants to join the multicast group. |
318 | * | 303 | * |
319 | * Implementations of this function must call GNUNET_MULTICAST_join_decision() | 304 | * Implementations of this function must call GNUNET_MULTICAST_join_decision() |
@@ -334,22 +319,6 @@ typedef void (*GNUNET_MULTICAST_JoinCallback)(void *cls, | |||
334 | 319 | ||
335 | 320 | ||
336 | /** | 321 | /** |
337 | * Method called whenever another peer wants to part the multicast group. | ||
338 | * | ||
339 | * A part request must always be honoured, and answered with GNUNET_MULTICAST_part_ack(); | ||
340 | * | ||
341 | * @param cls Closure. | ||
342 | * @param peer Identity of the peer that wants to part. | ||
343 | * @param msg Application-dependent part message from the leaving user. | ||
344 | * @param ph Part handle. | ||
345 | */ | ||
346 | typedef void (*GNUNET_MULTICAST_PartCallback)(void *cls, | ||
347 | const struct GNUNET_PeerIdentity *peer, | ||
348 | const struct GNUNET_MessageHeader *msg, | ||
349 | struct GNUNET_MULTICAST_PartHandle *ph); | ||
350 | |||
351 | |||
352 | /** | ||
353 | * Handle to pass back for the answer of a membership test. | 322 | * Handle to pass back for the answer of a membership test. |
354 | */ | 323 | */ |
355 | struct GNUNET_MULTICAST_MembershipTestHandle; | 324 | struct GNUNET_MULTICAST_MembershipTestHandle; |
@@ -507,7 +476,6 @@ GNUNET_MULTICAST_replay (struct GNUNET_MULTICAST_ReplayHandle *rh, | |||
507 | * @param replay_cb Function that can be called to replay a message. | 476 | * @param replay_cb Function that can be called to replay a message. |
508 | * @param test_cb Function multicast can use to test group membership. | 477 | * @param test_cb Function multicast can use to test group membership. |
509 | * @param join_cb Function called to approve / disapprove joining of a peer. | 478 | * @param join_cb Function called to approve / disapprove joining of a peer. |
510 | * @param part_cb Function called when a member wants to part the group. | ||
511 | * @param request_cb Function called with messages from group members. | 479 | * @param request_cb Function called with messages from group members. |
512 | * @return Handle for the origin, NULL on error. | 480 | * @return Handle for the origin, NULL on error. |
513 | */ | 481 | */ |
@@ -519,7 +487,6 @@ GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
519 | GNUNET_MULITCAST_ReplayCallback replay_cb, | 487 | GNUNET_MULITCAST_ReplayCallback replay_cb, |
520 | GNUNET_MULITCAST_MembershipTestCallback test_cb, | 488 | GNUNET_MULITCAST_MembershipTestCallback test_cb, |
521 | GNUNET_MULTICAST_JoinCallback join_cb, | 489 | GNUNET_MULTICAST_JoinCallback join_cb, |
522 | GNUNET_MULTICAST_PartCallback part_cb, | ||
523 | GNUNET_MULTICAST_RequestCallback request_cb); | 490 | GNUNET_MULTICAST_RequestCallback request_cb); |
524 | 491 | ||
525 | 492 | ||
@@ -580,11 +547,11 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin); | |||
580 | * @param pub_key ECC key that identifies the group. | 547 | * @param pub_key ECC key that identifies the group. |
581 | * @param origin Peer identity of the origin. | 548 | * @param origin Peer identity of the origin. |
582 | * @param max_known_fragment_id Largest known message fragment ID to the replay | 549 | * @param max_known_fragment_id Largest known message fragment ID to the replay |
583 | service; all messages with IDs larger than this ID will be replayed if | 550 | * service; all messages with IDs larger than this ID will be replayed if |
584 | * possible (lower IDs will be considered known and thus only | 551 | * possible (lower IDs will be considered known and thus only |
585 | * be replayed upon explicit request). | 552 | * be replayed upon explicit request). |
586 | * @param max_known_state_fragment_id Largest known message fragment ID with a | 553 | * @param max_known_state_fragment_id Largest known message fragment ID with a |
587 | non-zero value for the @e state_delta; state messages with | 554 | * non-zero value for the @e state_delta; state messages with |
588 | * larger IDs than this value will be replayed with high priority | 555 | * larger IDs than this value will be replayed with high priority |
589 | * (lower IDs will be considered known and thus only | 556 | * (lower IDs will be considered known and thus only |
590 | * be replayed upon explicit request). | 557 | * be replayed upon explicit request). |
@@ -652,12 +619,15 @@ GNUNET_MULTICAST_member_request_replay_cancel (struct GNUNET_MULTICAST_MemberRep | |||
652 | /** | 619 | /** |
653 | * Part a multicast group. | 620 | * Part a multicast group. |
654 | * | 621 | * |
622 | * Disconnects from all group members and invalidates the @a member handle. | ||
623 | * | ||
624 | * An application-dependent part message can be transmitted beforehand using | ||
625 | * GNUNET_MULTICAST_member_to_origin()) | ||
626 | * | ||
655 | * @param member Membership handle. | 627 | * @param member Membership handle. |
656 | * @param part_req Application-dependent part request to send to the origin. | ||
657 | */ | 628 | */ |
658 | void | 629 | void |
659 | GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member, | 630 | GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member); |
660 | const struct GNUNET_MessageHeader *part_req); | ||
661 | 631 | ||
662 | 632 | ||
663 | /** | 633 | /** |