aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-04-07 17:05:57 +0000
committerChristian Grothoff <christian@grothoff.org>2013-04-07 17:05:57 +0000
commit128a54c3bf0beb12e25927038681fa43143f4c25 (patch)
treea6b85ad27e9c78fc789e5b579432fc1eae44b23f
parente7c7ad752d44a0bc9a1c06caa56186f7bc339ca3 (diff)
downloadgnunet-128a54c3bf0beb12e25927038681fa43143f4c25.tar.gz
gnunet-128a54c3bf0beb12e25927038681fa43143f4c25.zip
-update
-rw-r--r--src/include/gnunet_multicast_service.h40
1 files changed, 36 insertions, 4 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h
index 0ef012395..cf99d764e 100644
--- a/src/include/gnunet_multicast_service.h
+++ b/src/include/gnunet_multicast_service.h
@@ -235,12 +235,17 @@ GNUNET_MULTICAST_replay (struct GNUNET_MULTICAST_ReplayHandle *rh,
235 * 235 *
236 * @param cls closure 236 * @param cls closure
237 * @param peer identity of the peer that wants to join or leave 237 * @param peer identity of the peer that wants to join or leave
238 * @param join_req application-dependent join message from the new user
239 * (might, for example, contain a user
240 * bind user identity/pseudonym to peer identity, application-level
241 * message to origin, etc.)
238 * @param is_joining GNUNET_YES if the peer wants to join, GNUNET_NO if the peer left 242 * @param is_joining GNUNET_YES if the peer wants to join, GNUNET_NO if the peer left
239 * @return GNUNET_OK if joining is approved, GNUNET_SYSERR if it is disapproved; 243 * @return GNUNET_OK if joining is approved, GNUNET_SYSERR if it is disapproved;
240 * GNUNET_NO should be returned for peers leaving 244 * GNUNET_NO should be returned for peers leaving
241 */ 245 */
242typedef int (*GNUNET_MULTICAST_MembershipChangeCallback)(void *cls, 246typedef int (*GNUNET_MULTICAST_MembershipChangeCallback)(void *cls,
243 const struct GNUNET_PeerIdentity *peer, 247 const struct GNUNET_PeerIdentity *peer,
248 const struct GNUNET_MessageHeader *join_req,
244 int is_joining); 249 int is_joining);
245 250
246 251
@@ -335,7 +340,7 @@ GNUNET_MULTICAST_origin_end (struct GNUNET_MULTICAST_Origin *origin);
335 340
336 341
337/** 342/**
338 * Join a multicast group. 343 * Join a multicast group. The entity joining is always the local peer.
339 * 344 *
340 * @param cfg configuration to use 345 * @param cfg configuration to use
341 * @param cls closure for callbacks 346 * @param cls closure for callbacks
@@ -356,7 +361,8 @@ GNUNET_MULTICAST_origin_end (struct GNUNET_MULTICAST_Origin *origin);
356 * @param message_cb function to be called for all messages we 361 * @param message_cb function to be called for all messages we
357 * receive from the group, excluding those our replay_cb 362 * receive from the group, excluding those our replay_cb
358 * already has 363 * already has
359 * FIXME: need some argument(s) to identify the joining member (key pair to 364 * @param join_req application-dependent join message to be passed to origin
365 * (might, for example, contain a user
360 * bind user identity/pseudonym to peer identity, application-level 366 * bind user identity/pseudonym to peer identity, application-level
361 * message to origin, etc.) 367 * message to origin, etc.)
362 * @return handle for the member, NULL on error 368 * @return handle for the member, NULL on error
@@ -369,7 +375,14 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
369 uint64_t max_known_state_message_id, 375 uint64_t max_known_state_message_id,
370 GNUNET_MULTICAST_ReplayCallback replay_cb, 376 GNUNET_MULTICAST_ReplayCallback replay_cb,
371 GNUNET_MULITCAST_MembershipTestCallback test_cb, 377 GNUNET_MULITCAST_MembershipTestCallback test_cb,
372 GNUNET_MULTICAST_MessageCallback message_cb); 378 GNUNET_MULTICAST_MessageCallback message_cb,
379 const struct GNUNET_MessageHeader *join_req);
380
381
382/**
383 * Handle for a replay request.
384 */
385struct GNUNET_MULTICAST_ReplayRequest;
373 386
374 387
375/** 388/**
@@ -377,15 +390,28 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
377 * the 'max_known_*_id's given when joining are needed and not 390 * the 'max_known_*_id's given when joining are needed and not
378 * known to the client. 391 * known to the client.
379 * 392 *
393 * FIXME: we currently use the 'replay_cb' from the member_join call;
394 * we might alternatively add a different cb here.
395 *
380 * @param member membership handle 396 * @param member membership handle
381 * @param message_id ID of a message that this client would like to see replayed 397 * @param message_id ID of a message that this client would like to see replayed
398 * @return replay request handle, NULL on error
382 */ 399 */
383void 400struct GNUNET_MULTICAST_ReplayRequest *
384GNUNET_MULTICAST_member_request_replay (struct GNUNET_MULTICAST_Member *member, 401GNUNET_MULTICAST_member_request_replay (struct GNUNET_MULTICAST_Member *member,
385 uint64_t message_id); 402 uint64_t message_id);
386 403
387 404
388/** 405/**
406 * Cancel a replay request.
407 *
408 * @param rr request to cancel
409 */
410void
411GNUNET_MULTICAST_member_request_replay_cancel (struct GNUNET_MULTICAST_ReplayRequest *rr);
412
413
414/**
389 * Leave a mutlicast group. 415 * Leave a mutlicast group.
390 * 416 *
391 * @param member membership handle 417 * @param member membership handle
@@ -395,6 +421,12 @@ GNUNET_MULTICAST_member_leave (struct GNUNET_MULTICAST_Member *member);
395 421
396 422
397/** 423/**
424 * Handle for a message to be delivered to the origin.
425 */
426struct GNUNET_MULTICAST_ResponseRequest;
427
428
429/**
398 * Send a message to the origin of the multicast group. FIXME: how 430 * Send a message to the origin of the multicast group. FIXME: how
399 * will we do routing/flow-control of responses? 431 * will we do routing/flow-control of responses?
400 * 432 *