aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-01-27 01:07:58 +0100
committerChristian Grothoff <christian@grothoff.org>2019-01-27 01:07:58 +0100
commit3db0825fdc964032a7c6ee17ccb7dedbbcfb208b (patch)
tree0fe0221028f6f127a0135f15898c38efe6257b51 /src/include
parent65b339b7ce68fcbaec9df6f66e8ed45e60b39ce1 (diff)
downloadgnunet-3db0825fdc964032a7c6ee17ccb7dedbbcfb208b.tar.gz
gnunet-3db0825fdc964032a7c6ee17ccb7dedbbcfb208b.zip
more work on #5385
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_cadet_service.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/src/include/gnunet_cadet_service.h b/src/include/gnunet_cadet_service.h
index 2ac98e621..3ff8cf59c 100644
--- a/src/include/gnunet_cadet_service.h
+++ b/src/include/gnunet_cadet_service.h
@@ -389,15 +389,16 @@ typedef void
389 uint32_t /* ugh */ public_channel_number); 389 uint32_t /* ugh */ public_channel_number);
390 390
391 391
392/**
393 * Operation handle.
394 */
392struct GNUNET_CADET_ChannelMonitor; 395struct GNUNET_CADET_ChannelMonitor;
393 396
394 397
395/** 398/**
396 * Request information about a specific channel of the running cadet peer. 399 * Request information about a specific channel of the running cadet peer.
397 * 400 *
398 * WARNING: unstable API, likely to change in the future! 401 * @param cfg configuration to use
399 *
400 * @param h Handle to the cadet peer.
401 * @param peer ID of the other end of the channel. 402 * @param peer ID of the other end of the channel.
402 * @param channel_number Channel number. 403 * @param channel_number Channel number.
403 * @param callback Function to call with the requested data. 404 * @param callback Function to call with the requested data.
@@ -442,6 +443,9 @@ typedef void
442 unsigned int best_path); 443 unsigned int best_path);
443 444
444 445
446/**
447 * Operation handle.
448 */
445struct GNUNET_CADET_PeersLister; 449struct GNUNET_CADET_PeersLister;
446 450
447 451
@@ -450,7 +454,7 @@ struct GNUNET_CADET_PeersLister;
450 * The callback will be called for every peer known to the service. 454 * The callback will be called for every peer known to the service.
451 * Only one info request (of any kind) can be active at once. 455 * Only one info request (of any kind) can be active at once.
452 * 456 *
453 * @param h Handle to the cadet peer. 457 * @param cfg configuration to use
454 * @param callback Function to call with the requested data. 458 * @param callback Function to call with the requested data.
455 * @param callback_cls Closure for @c callback. 459 * @param callback_cls Closure for @c callback.
456 * @return NULL on error 460 * @return NULL on error
@@ -500,12 +504,13 @@ typedef void
500 */ 504 */
501struct GNUNET_CADET_GetPeer; 505struct GNUNET_CADET_GetPeer;
502 506
507
503/** 508/**
504 * Request information about a peer known to the running cadet peer. 509 * Request information about a peer known to the running cadet peer.
505 * The callback will be called for the tunnel once. 510 * The callback will be called for the tunnel once.
506 * Only one info request (of any kind) can be active at once. 511 * Only one info request (of any kind) can be active at once.
507 * 512 *
508 * @param h Handle to the cadet peer. 513 * @param cfg configuration to use
509 * @param id Peer whose tunnel to examine. 514 * @param id Peer whose tunnel to examine.
510 * @param callback Function to call with the requested data. 515 * @param callback Function to call with the requested data.
511 * @param callback_cls Closure for @c callback. 516 * @param callback_cls Closure for @c callback.
@@ -550,6 +555,9 @@ typedef void
550 uint16_t cstate); 555 uint16_t cstate);
551 556
552 557
558/**
559 * Operation handle.
560 */
553struct GNUNET_CADET_ListTunnels; 561struct GNUNET_CADET_ListTunnels;
554 562
555 563
@@ -558,12 +566,9 @@ struct GNUNET_CADET_ListTunnels;
558 * The callback will be called for every tunnel of the service. 566 * The callback will be called for every tunnel of the service.
559 * Only one info request (of any kind) can be active at once. 567 * Only one info request (of any kind) can be active at once.
560 * 568 *
561 * WARNING: unstable API, likely to change in the future! 569 * @param cfg configuration to use
562 *
563 * @param h Handle to the cadet peer.
564 * @param callback Function to call with the requested data. 570 * @param callback Function to call with the requested data.
565 * @param callback_cls Closure for @c callback. 571 * @param callback_cls Closure for @c callback.
566 *
567 * @return #GNUNET_OK / #GNUNET_SYSERR 572 * @return #GNUNET_OK / #GNUNET_SYSERR
568 */ 573 */
569struct GNUNET_CADET_ListTunnels * 574struct GNUNET_CADET_ListTunnels *
@@ -575,8 +580,7 @@ GNUNET_CADET_list_tunnels (const struct GNUNET_CONFIGURATION_Handle *cfg,
575/** 580/**
576 * Cancel a monitor request. The monitor callback will not be called. 581 * Cancel a monitor request. The monitor callback will not be called.
577 * 582 *
578 * @param h Cadet handle. 583 * @param lt operation handle
579 *
580 * @return Closure given to #GNUNET_CADET_list_tunnels(), if any. 584 * @return Closure given to #GNUNET_CADET_list_tunnels(), if any.
581 */ 585 */
582void * 586void *
@@ -608,6 +612,9 @@ typedef void
608 unsigned int cstate); 612 unsigned int cstate);
609 613
610 614
615/**
616 * Operation handle.
617 */
611struct GNUNET_CADET_GetTunnel; 618struct GNUNET_CADET_GetTunnel;
612 619
613 620
@@ -616,13 +623,10 @@ struct GNUNET_CADET_GetTunnel;
616 * The callback will be called for the tunnel once. 623 * The callback will be called for the tunnel once.
617 * Only one info request (of any kind) can be active at once. 624 * Only one info request (of any kind) can be active at once.
618 * 625 *
619 * WARNING: unstable API, likely to change in the future! 626 * @param cfg configuration to use
620 *
621 * @param h Handle to the cadet peer.
622 * @param id Peer whose tunnel to examine. 627 * @param id Peer whose tunnel to examine.
623 * @param callback Function to call with the requested data. 628 * @param callback Function to call with the requested data.
624 * @param callback_cls Closure for @c callback. 629 * @param callback_cls Closure for @c callback.
625 *
626 * @return #GNUNET_OK / #GNUNET_SYSERR 630 * @return #GNUNET_OK / #GNUNET_SYSERR
627 */ 631 */
628struct GNUNET_CADET_GetTunnel * 632struct GNUNET_CADET_GetTunnel *
@@ -632,6 +636,12 @@ GNUNET_CADET_get_tunnel (const struct GNUNET_CONFIGURATION_Handle *cfg,
632 void *callback_cls); 636 void *callback_cls);
633 637
634 638
639/**
640 * Cancel a monitor request. The monitor callback will not be called.
641 *
642 * @param lt operation handle
643 * @return Closure given to #GNUNET_CADET_get_tunnel(), if any.
644 */
635void * 645void *
636GNUNET_CADET_get_tunnel_cancel (struct GNUNET_CADET_GetTunnel *gt); 646GNUNET_CADET_get_tunnel_cancel (struct GNUNET_CADET_GetTunnel *gt);
637 647