diff options
author | Gabor X Toth <*@tg-x.net> | 2013-07-28 19:57:04 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-07-28 19:57:04 +0000 |
commit | 67370e1b06a281cf45d9bf7d9019a2b86491d473 (patch) | |
tree | 333cd700b41dba71b3484bd6e235e765d8b02d6f /src | |
parent | b9b10bb434ec1f611be916a402d15440ccc8ec6d (diff) | |
download | gnunet-67370e1b06a281cf45d9bf7d9019a2b86491d473.tar.gz gnunet-67370e1b06a281cf45d9bf7d9019a2b86491d473.zip |
multicast/psyc: join cb for members/slaves too
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_multicast_service.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_psyc_service.h | 14 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h index 46e6f824b..cc951495d 100644 --- a/src/include/gnunet_multicast_service.h +++ b/src/include/gnunet_multicast_service.h | |||
@@ -600,10 +600,11 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin); | |||
600 | * possible (lower IDs will be considered known and thus only | 600 | * possible (lower IDs will be considered known and thus only |
601 | * be replayed upon explicit request). | 601 | * be replayed upon explicit request). |
602 | * FIXME: needed? can be optional or moved to a separate function. | 602 | * FIXME: needed? can be optional or moved to a separate function. |
603 | * @param join_cb Function called to approve / disapprove joining of a peer. | ||
604 | * @param test_cb Function multicast can use to test group membership. | ||
603 | * @param replay_cb Function that can be called to replay messages | 605 | * @param replay_cb Function that can be called to replay messages |
604 | * this peer already knows from this group; NULL if this | 606 | * this peer already knows from this group; NULL if this |
605 | * client is unable to support replay. | 607 | * client is unable to support replay. |
606 | * @param test_cb Function multicast can use to test group membership. | ||
607 | * @param message_cb Function to be called for all message fragments we | 608 | * @param message_cb Function to be called for all message fragments we |
608 | * receive from the group, excluding those our @a replay_cb | 609 | * receive from the group, excluding those our @a replay_cb |
609 | * already has. | 610 | * already has. |
@@ -618,8 +619,9 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
618 | const struct GNUNET_PeerIdentity *members, | 619 | const struct GNUNET_PeerIdentity *members, |
619 | const struct GNUNET_MessageHeader *join_request, | 620 | const struct GNUNET_MessageHeader *join_request, |
620 | uint64_t max_known_fragment_id, | 621 | uint64_t max_known_fragment_id, |
621 | GNUNET_MULTICAST_ReplayCallback replay_cb, | 622 | GNUNET_MULTICAST_JoinCallback join_cb, |
622 | GNUNET_MULITCAST_MembershipTestCallback test_cb, | 623 | GNUNET_MULITCAST_MembershipTestCallback test_cb, |
624 | GNUNET_MULITCAST_ReplayCallback replay_cb, | ||
623 | GNUNET_MULTICAST_MessageCallback message_cb, | 625 | GNUNET_MULTICAST_MessageCallback message_cb, |
624 | void *cls); | 626 | void *cls); |
625 | 627 | ||
diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h index fae52f6cd..399f2cad2 100644 --- a/src/include/gnunet_psyc_service.h +++ b/src/include/gnunet_psyc_service.h | |||
@@ -247,16 +247,16 @@ struct GNUNET_PSYC_Master; | |||
247 | * one in the future. | 247 | * one in the future. |
248 | * @param policy Group policy specifying join and history restrictions. | 248 | * @param policy Group policy specifying join and history restrictions. |
249 | * Used to automate group management decisions. | 249 | * Used to automate group management decisions. |
250 | * @param method_cb Function to invoke on messages received from members. | 250 | * @param method Function to invoke on messages received from members. |
251 | * @param join_cb Function to invoke when a peer wants to join. | 251 | * @param join_cb Function to invoke when a peer wants to join. |
252 | * @param cls Closure for the callbacks. | 252 | * @param cls Closure for @a method and @a join_cb. |
253 | * @return Handle for the channel master, NULL on error. | 253 | * @return Handle for the channel master, NULL on error. |
254 | */ | 254 | */ |
255 | struct GNUNET_PSYC_Master * | 255 | struct GNUNET_PSYC_Master * |
256 | GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | 256 | GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
257 | const struct GNUNET_CRYPTO_EccPrivateKey *priv_key, | 257 | const struct GNUNET_CRYPTO_EccPrivateKey *priv_key, |
258 | enum GNUNET_MULTICAST_GroupPolicy policy, | 258 | enum GNUNET_MULTICAST_GroupPolicy policy, |
259 | GNUNET_PSYC_Method method_cb, | 259 | GNUNET_PSYC_Method method, |
260 | GNUNET_PSYC_JoinCallback join_cb, | 260 | GNUNET_PSYC_JoinCallback join_cb, |
261 | void *cls); | 261 | void *cls); |
262 | 262 | ||
@@ -351,8 +351,9 @@ struct GNUNET_PSYC_Slave; | |||
351 | * @param pub_key ECC key that identifies the channel we wish to join. | 351 | * @param pub_key ECC key that identifies the channel we wish to join. |
352 | * @param origin Peer identity of the origin. | 352 | * @param origin Peer identity of the origin. |
353 | * @param method Function to invoke on messages received from the channel, | 353 | * @param method Function to invoke on messages received from the channel, |
354 | * typically at least contains functions for @e join and @e part. | 354 | * typically at least contains functions for @e join and @e part. |
355 | * @param method_cls Closure for @a method. | 355 | * @param join_cb Function to invoke when a peer wants to join. |
356 | * @param cls Closure for @a method_cb and @a join_cb. | ||
356 | * @param method_name Method name for the join request. | 357 | * @param method_name Method name for the join request. |
357 | * @param env Environment containing transient variables for the request, or NULL. | 358 | * @param env Environment containing transient variables for the request, or NULL. |
358 | * @param data_size Number of bytes in @a data. | 359 | * @param data_size Number of bytes in @a data. |
@@ -364,7 +365,8 @@ GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
364 | const struct GNUNET_CRYPTO_EccPublicKey *pub_key, | 365 | const struct GNUNET_CRYPTO_EccPublicKey *pub_key, |
365 | const struct GNUNET_PeerIdentity *origin, | 366 | const struct GNUNET_PeerIdentity *origin, |
366 | GNUNET_PSYC_Method method, | 367 | GNUNET_PSYC_Method method, |
367 | void *method_cls, | 368 | GNUNET_PSYC_JoinCallback join_cb, |
369 | void *cls, | ||
368 | const char *method_name, | 370 | const char *method_name, |
369 | const struct GNUNET_ENV_Environment *env, | 371 | const struct GNUNET_ENV_Environment *env, |
370 | size_t data_size, | 372 | size_t data_size, |