diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-01-27 00:36:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-01-27 00:36:47 +0100 |
commit | 65b339b7ce68fcbaec9df6f66e8ed45e60b39ce1 (patch) | |
tree | fff17cdb219935617877a5504bb8435712b80a61 /src/include/gnunet_cadet_service.h | |
parent | 8f884f001a70fee622fff0c0ac8c38a0634df789 (diff) | |
download | gnunet-65b339b7ce68fcbaec9df6f66e8ed45e60b39ce1.tar.gz gnunet-65b339b7ce68fcbaec9df6f66e8ed45e60b39ce1.zip |
more work on #5385
Diffstat (limited to 'src/include/gnunet_cadet_service.h')
-rw-r--r-- | src/include/gnunet_cadet_service.h | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/include/gnunet_cadet_service.h b/src/include/gnunet_cadet_service.h index fb4499db0..2ac98e621 100644 --- a/src/include/gnunet_cadet_service.h +++ b/src/include/gnunet_cadet_service.h | |||
@@ -411,6 +411,12 @@ GNUNET_CADET_get_channel (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
411 | void *callback_cls); | 411 | void *callback_cls); |
412 | 412 | ||
413 | 413 | ||
414 | /** | ||
415 | * Cancel a channel monitor request. The callback will not be called (anymore). | ||
416 | * | ||
417 | * @param h Cadet handle. | ||
418 | * @return Closure that was given to #GNUNET_CADET_get_channel(). | ||
419 | */ | ||
414 | void * | 420 | void * |
415 | GNUNET_CADET_get_channel_cancel (struct GNUNET_CADET_ChannelMonitor *cm); | 421 | GNUNET_CADET_get_channel_cancel (struct GNUNET_CADET_ChannelMonitor *cm); |
416 | 422 | ||
@@ -444,13 +450,10 @@ struct GNUNET_CADET_PeersLister; | |||
444 | * The callback will be called for every peer known to the service. | 450 | * The callback will be called for every peer known to the service. |
445 | * Only one info request (of any kind) can be active at once. | 451 | * Only one info request (of any kind) can be active at once. |
446 | * | 452 | * |
447 | * WARNING: unstable API, likely to change in the future! | ||
448 | * | ||
449 | * @param h Handle to the cadet peer. | 453 | * @param h Handle to the cadet peer. |
450 | * @param callback Function to call with the requested data. | 454 | * @param callback Function to call with the requested data. |
451 | * @param callback_cls Closure for @c callback. | 455 | * @param callback_cls Closure for @c callback. |
452 | * | 456 | * @return NULL on error |
453 | * @return #GNUNET_OK / #GNUNET_SYSERR | ||
454 | */ | 457 | */ |
455 | struct GNUNET_CADET_PeersLister * | 458 | struct GNUNET_CADET_PeersLister * |
456 | GNUNET_CADET_list_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, | 459 | GNUNET_CADET_list_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, |
@@ -461,14 +464,13 @@ GNUNET_CADET_list_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
461 | /** | 464 | /** |
462 | * Cancel a peer info request. The callback will not be called (anymore). | 465 | * Cancel a peer info request. The callback will not be called (anymore). |
463 | * | 466 | * |
464 | * @param h Cadet handle. | 467 | * @param pl operation handle |
465 | * @return Closure that was given to #GNUNET_CADET_list_peers(). | 468 | * @return Closure that was given to #GNUNET_CADET_list_peers(). |
466 | */ | 469 | */ |
467 | void * | 470 | void * |
468 | GNUNET_CADET_list_peers_cancel (struct GNUNET_CADET_PeersLister *pl); | 471 | GNUNET_CADET_list_peers_cancel (struct GNUNET_CADET_PeersLister *pl); |
469 | 472 | ||
470 | 473 | ||
471 | |||
472 | /** | 474 | /** |
473 | * Method called to retrieve information about a specific peer | 475 | * Method called to retrieve information about a specific peer |
474 | * known to the service. | 476 | * known to the service. |
@@ -493,6 +495,9 @@ typedef void | |||
493 | int finished_with_paths); | 495 | int finished_with_paths); |
494 | 496 | ||
495 | 497 | ||
498 | /** | ||
499 | * Handle to cancel #GNUNET_CADET_get_peer() operation. | ||
500 | */ | ||
496 | struct GNUNET_CADET_GetPeer; | 501 | struct GNUNET_CADET_GetPeer; |
497 | 502 | ||
498 | /** | 503 | /** |
@@ -500,14 +505,11 @@ struct GNUNET_CADET_GetPeer; | |||
500 | * The callback will be called for the tunnel once. | 505 | * The callback will be called for the tunnel once. |
501 | * Only one info request (of any kind) can be active at once. | 506 | * Only one info request (of any kind) can be active at once. |
502 | * | 507 | * |
503 | * WARNING: unstable API, likely to change in the future! | ||
504 | * | ||
505 | * @param h Handle to the cadet peer. | 508 | * @param h Handle to the cadet peer. |
506 | * @param id Peer whose tunnel to examine. | 509 | * @param id Peer whose tunnel to examine. |
507 | * @param callback Function to call with the requested data. | 510 | * @param callback Function to call with the requested data. |
508 | * @param callback_cls Closure for @c callback. | 511 | * @param callback_cls Closure for @c callback. |
509 | * | 512 | * @return NULL on error |
510 | * @return #GNUNET_OK / #GNUNET_SYSERR | ||
511 | */ | 513 | */ |
512 | struct GNUNET_CADET_GetPeer * | 514 | struct GNUNET_CADET_GetPeer * |
513 | GNUNET_CADET_get_peer (const struct GNUNET_CONFIGURATION_Handle *cfg, | 515 | GNUNET_CADET_get_peer (const struct GNUNET_CONFIGURATION_Handle *cfg, |
@@ -516,6 +518,12 @@ GNUNET_CADET_get_peer (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
516 | void *callback_cls); | 518 | void *callback_cls); |
517 | 519 | ||
518 | 520 | ||
521 | /** | ||
522 | * Cancel @a gp operation. | ||
523 | * | ||
524 | * @param gp operation to cancel | ||
525 | * @return closure from #GNUNET_CADET_get_peer(). | ||
526 | */ | ||
519 | void * | 527 | void * |
520 | GNUNET_CADET_get_peer_cancel (struct GNUNET_CADET_GetPeer *gp); | 528 | GNUNET_CADET_get_peer_cancel (struct GNUNET_CADET_GetPeer *gp); |
521 | 529 | ||