diff options
author | Gabor X Toth <*@tg-x.net> | 2013-08-24 06:25:10 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-08-24 06:25:10 +0000 |
commit | df6facef1ea4d8dd7fe836d78473aa66270d6684 (patch) | |
tree | e1a9e4585e0f549f1c9d9217e362cc2539527dd0 /src | |
parent | 9602e23163e6d562197b40c361a46eead3276489 (diff) | |
download | gnunet-df6facef1ea4d8dd7fe836d78473aa66270d6684.tar.gz gnunet-df6facef1ea4d8dd7fe836d78473aa66270d6684.zip |
multicast: added replay_end(), returning replay handle from join_decision(); removed admitted/effective since where not needed; social: keep_active flag instead of away
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_multicast_service.h | 16 | ||||
-rw-r--r-- | src/include/gnunet_psyc_service.h | 5 | ||||
-rw-r--r-- | src/include/gnunet_psycstore_service.h | 1 | ||||
-rw-r--r-- | src/include/gnunet_social_service.h | 31 |
4 files changed, 18 insertions, 35 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h index e187b963b..01074358e 100644 --- a/src/include/gnunet_multicast_service.h +++ b/src/include/gnunet_multicast_service.h | |||
@@ -277,7 +277,6 @@ struct GNUNET_MULTICAST_JoinHandle; | |||
277 | * @param jh Join request handle. | 277 | * @param jh Join request handle. |
278 | * @param is_admitted #GNUNET_YES if joining is approved, | 278 | * @param is_admitted #GNUNET_YES if joining is approved, |
279 | * #GNUNET_NO if it is disapproved | 279 | * #GNUNET_NO if it is disapproved |
280 | * @param admitted_since Message ID the member is admitted since. | ||
281 | * @param relay_count Number of relays given. | 280 | * @param relay_count Number of relays given. |
282 | * @param relays Array of suggested peers that might be useful relays to use | 281 | * @param relays Array of suggested peers that might be useful relays to use |
283 | * when joining the multicast group (essentially a list of peers that | 282 | * when joining the multicast group (essentially a list of peers that |
@@ -291,10 +290,9 @@ struct GNUNET_MULTICAST_JoinHandle; | |||
291 | * application layer; this response is to be transmitted to the | 290 | * application layer; this response is to be transmitted to the |
292 | * peer that issued the request even if admission is denied. | 291 | * peer that issued the request even if admission is denied. |
293 | */ | 292 | */ |
294 | void | 293 | struct GNUNET_MULTICAST_ReplayHandle * |
295 | GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh, | 294 | GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh, |
296 | int is_admitted, | 295 | int is_admitted, |
297 | uint64_t admitted_since, | ||
298 | unsigned int relay_count, | 296 | unsigned int relay_count, |
299 | const struct GNUNET_PeerIdentity *relays, | 297 | const struct GNUNET_PeerIdentity *relays, |
300 | const struct GNUNET_MessageHeader *join_response); | 298 | const struct GNUNET_MessageHeader *join_response); |
@@ -514,6 +512,17 @@ GNUNET_MULTICAST_replay (struct GNUNET_MULTICAST_ReplayHandle *rh, | |||
514 | const struct GNUNET_MessageHeader *msg, | 512 | const struct GNUNET_MessageHeader *msg, |
515 | enum GNUNET_MULTICAST_ReplayErrorCode ec); | 513 | enum GNUNET_MULTICAST_ReplayErrorCode ec); |
516 | 514 | ||
515 | |||
516 | /** | ||
517 | * Indicate the end of the replay session. | ||
518 | * | ||
519 | * Invalidates the replay handle. | ||
520 | * | ||
521 | * @param rh Replay session to end. | ||
522 | */ | ||
523 | void | ||
524 | GNUNET_MULTICAST_replay_end (struct GNUNET_MULTICAST_ReplayHandle *rh); | ||
525 | |||
517 | /** | 526 | /** |
518 | * Function called to provide data for a transmission for a replay. | 527 | * Function called to provide data for a transmission for a replay. |
519 | * | 528 | * |
@@ -684,7 +693,6 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
684 | size_t relay_count, | 693 | size_t relay_count, |
685 | const struct GNUNET_PeerIdentity *relays, | 694 | const struct GNUNET_PeerIdentity *relays, |
686 | const struct GNUNET_MessageHeader *join_request, | 695 | const struct GNUNET_MessageHeader *join_request, |
687 | uint64_t max_known_fragment_id, | ||
688 | GNUNET_MULTICAST_JoinCallback join_cb, | 696 | GNUNET_MULTICAST_JoinCallback join_cb, |
689 | GNUNET_MULITCAST_MembershipTestCallback test_cb, | 697 | GNUNET_MULITCAST_MembershipTestCallback test_cb, |
690 | GNUNET_MULITCAST_ReplayCallback replay_cb, | 698 | GNUNET_MULITCAST_ReplayCallback replay_cb, |
diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h index ec6028772..7caf8a40f 100644 --- a/src/include/gnunet_psyc_service.h +++ b/src/include/gnunet_psyc_service.h | |||
@@ -258,7 +258,6 @@ typedef int | |||
258 | * @param jh Join request handle. | 258 | * @param jh Join request handle. |
259 | * @param is_admitted #GNUNET_YES if joining is approved, | 259 | * @param is_admitted #GNUNET_YES if joining is approved, |
260 | * #GNUNET_NO if it is disapproved. | 260 | * #GNUNET_NO if it is disapproved. |
261 | * @param admitted_since Message ID the member is admitted since. | ||
262 | * @param relay_count Number of relays given. | 261 | * @param relay_count Number of relays given. |
263 | * @param relays Array of suggested peers that might be useful relays to use | 262 | * @param relays Array of suggested peers that might be useful relays to use |
264 | * when joining the multicast group (essentially a list of peers that | 263 | * when joining the multicast group (essentially a list of peers that |
@@ -275,7 +274,6 @@ typedef int | |||
275 | void | 274 | void |
276 | GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh, | 275 | GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh, |
277 | int is_admitted, | 276 | int is_admitted, |
278 | uint64_t admitted_since, | ||
279 | unsigned int relay_count, | 277 | unsigned int relay_count, |
280 | const struct GNUNET_PeerIdentity *relays, | 278 | const struct GNUNET_PeerIdentity *relays, |
281 | const char *method_name, | 279 | const char *method_name, |
@@ -625,8 +623,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel, | |||
625 | void | 623 | void |
626 | GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, | 624 | GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, |
627 | const struct GNUNET_CRYPTO_EccPublicKey *slave_key, | 625 | const struct GNUNET_CRYPTO_EccPublicKey *slave_key, |
628 | uint64_t announced_at, | 626 | uint64_t announced_at); |
629 | uint64_t effective_since); | ||
630 | 627 | ||
631 | 628 | ||
632 | /** | 629 | /** |
diff --git a/src/include/gnunet_psycstore_service.h b/src/include/gnunet_psycstore_service.h index cd93c165f..8fc7dbcd7 100644 --- a/src/include/gnunet_psycstore_service.h +++ b/src/include/gnunet_psycstore_service.h | |||
@@ -134,6 +134,7 @@ typedef void | |||
134 | * @param did_join #GNUNET_YES on join, #GNUNET_NO on part. | 134 | * @param did_join #GNUNET_YES on join, #GNUNET_NO on part. |
135 | * @param announced_at ID of the message that announced the membership change. | 135 | * @param announced_at ID of the message that announced the membership change. |
136 | * @param effective_since Message ID this membership change is in effect since. | 136 | * @param effective_since Message ID this membership change is in effect since. |
137 | * For joins it is <= announced_at, for parts it is always 0. | ||
137 | * @param group_generation In case of a part, the last group generation the | 138 | * @param group_generation In case of a part, the last group generation the |
138 | * slave has access to. It has relevance when a larger message have | 139 | * slave has access to. It has relevance when a larger message have |
139 | * fragments with different group generations. | 140 | * fragments with different group generations. |
diff --git a/src/include/gnunet_social_service.h b/src/include/gnunet_social_service.h index 0421c1d75..abb749b9b 100644 --- a/src/include/gnunet_social_service.h +++ b/src/include/gnunet_social_service.h | |||
@@ -372,23 +372,12 @@ GNUNET_SOCIAL_home_announce_cancel (struct GNUNET_SOCIAL_Announcement *a); | |||
372 | * Convert our home to a place so we can access it via the place API. | 372 | * Convert our home to a place so we can access it via the place API. |
373 | * | 373 | * |
374 | * @param home Handle for the home. | 374 | * @param home Handle for the home. |
375 | * @param keep_active Keep home active after last application disconnected. | ||
375 | * @return Place handle for the same home, valid as long as @a home is valid; | 376 | * @return Place handle for the same home, valid as long as @a home is valid; |
376 | * do NOT try to GNUNET_SOCIAL_place_leave() this place, it's your home! | 377 | * do NOT try to GNUNET_SOCIAL_place_leave() this place, it's your home! |
377 | */ | 378 | */ |
378 | struct GNUNET_SOCIAL_Place * | 379 | struct GNUNET_SOCIAL_Place * |
379 | GNUNET_SOCIAL_home_get_place (struct GNUNET_SOCIAL_Home *home); | 380 | GNUNET_SOCIAL_home_get_place (struct GNUNET_SOCIAL_Home *home, int keep_active); |
380 | |||
381 | |||
382 | /** | ||
383 | * Leave a home temporarily, visitors can stay. | ||
384 | * | ||
385 | * After leaving, handling of incoming messages are left to other clients of the | ||
386 | * social service, and stops after the last client exits. | ||
387 | * | ||
388 | * @param home Home to leave temporarily (handle becomes invalid). | ||
389 | */ | ||
390 | void | ||
391 | GNUNET_SOCIAL_home_away (struct GNUNET_SOCIAL_Home *home); | ||
392 | 381 | ||
393 | 382 | ||
394 | /** | 383 | /** |
@@ -627,22 +616,10 @@ GNUNET_SOCIAL_place_get_history_cancel (struct GNUNET_SOCIAL_HistoryLesson *hist | |||
627 | * Notifies the owner of the place about leaving, and destroys the place handle. | 616 | * Notifies the owner of the place about leaving, and destroys the place handle. |
628 | * | 617 | * |
629 | * @param place Place to leave permanently. | 618 | * @param place Place to leave permanently. |
619 | * @param keep_active Keep place active after last application disconnected. | ||
630 | */ | 620 | */ |
631 | void | 621 | void |
632 | GNUNET_SOCIAL_place_leave (struct GNUNET_SOCIAL_Place *place); | 622 | GNUNET_SOCIAL_place_leave (struct GNUNET_SOCIAL_Place *place, int keep_active); |
633 | |||
634 | |||
635 | /** | ||
636 | * Leave a place temporarily. | ||
637 | * | ||
638 | * Stop following the conversation for the @a place and destroy the @a place | ||
639 | * handle. Only affects the application calling this function, other clients of | ||
640 | * the service continue receiving the messages. | ||
641 | * | ||
642 | * @param place Place to leave temporarily. | ||
643 | */ | ||
644 | void | ||
645 | GNUNET_SOCIAL_place_away (struct GNUNET_SOCIAL_Place *place); | ||
646 | 623 | ||
647 | 624 | ||
648 | #if 0 /* keep Emacsens' auto-indent happy */ | 625 | #if 0 /* keep Emacsens' auto-indent happy */ |