aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-11 09:54:37 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-11 09:54:37 +0000
commit39589dd2116957e3265c8bd55cf1b9633b1e0b1a (patch)
treed2449b5a9a30afa9735a780c193ae4dfd9bb1405 /src/include
parentfcef0fe54948e3219fffde41a4ff7c5542c6f072 (diff)
downloadgnunet-39589dd2116957e3265c8bd55cf1b9633b1e0b1a.tar.gz
gnunet-39589dd2116957e3265c8bd55cf1b9633b1e0b1a.zip
allow cancellation of certain transport API operations
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_transport_service.h38
1 files changed, 34 insertions, 4 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index 8435271f9..4f868e526 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -629,7 +629,6 @@ GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_GetHelloHandle *ghh);
629 * @param hello the hello message 629 * @param hello the hello message
630 * @param cont continuation to call when HELLO has been sent 630 * @param cont continuation to call when HELLO has been sent
631 * @param cls closure for continuation 631 * @param cls closure for continuation
632 *
633 */ 632 */
634void 633void
635GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, 634GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
@@ -638,6 +637,12 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
638 637
639 638
640/** 639/**
640 * Handle to cancel a pending address lookup.
641 */
642struct GNUNET_TRANSPORT_AddressLookupContext;
643
644
645/**
641 * Convert a binary address into a human readable address. 646 * Convert a binary address into a human readable address.
642 * 647 *
643 * @param cfg configuration to use 648 * @param cfg configuration to use
@@ -649,8 +654,9 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
649 * @param timeout how long is the lookup allowed to take at most 654 * @param timeout how long is the lookup allowed to take at most
650 * @param aluc function to call with the results 655 * @param aluc function to call with the results
651 * @param aluc_cls closure for aluc 656 * @param aluc_cls closure for aluc
657 * @return handle to cancel the operation, NULL on error
652 */ 658 */
653void 659struct GNUNET_TRANSPORT_AddressLookupContext *
654GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, 660GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
655 const char *address, size_t addressLen, 661 const char *address, size_t addressLen,
656 int numeric, const char *nameTrans, 662 int numeric, const char *nameTrans,
@@ -660,6 +666,21 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
660 666
661 667
662/** 668/**
669 * Cancel request for address conversion.
670 *
671 * @param alc handle for the request to cancel
672 */
673void
674GNUNET_TRANSPORT_address_lookup_cancel (struct GNUNET_TRANSPORT_AddressLookupContext *alc);
675
676
677/**
678 * Handle to cancel a pending address lookup.
679 */
680struct GNUNET_TRANSPORT_AddressLookupContext;
681
682
683/**
663 * Return all the known addresses for a peer. FIXME: document better! 684 * Return all the known addresses for a peer. FIXME: document better!
664 * FIXME: use better name! 685 * FIXME: use better name!
665 * 686 *
@@ -669,7 +690,7 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
669 * @param peer_address_callback function to call with the results 690 * @param peer_address_callback function to call with the results
670 * @param peer_address_callback_cls closure for peer_address_callback 691 * @param peer_address_callback_cls closure for peer_address_callback
671 */ 692 */
672void 693struct GNUNET_TRANSPORT_PeerAddressLookupContext *
673GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle 694GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle
674 *cfg, 695 *cfg,
675 const struct GNUNET_PeerIdentity *peer, 696 const struct GNUNET_PeerIdentity *peer,
@@ -680,8 +701,17 @@ GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle
680 701
681 702
682/** 703/**
704 * Cancel request for peer lookup.
705 *
706 * @param alc handle for the request to cancel
707 */
708void
709GNUNET_TRANSPORT_peer_address_lookup_cancel (struct GNUNET_TRANSPORT_PeerAddressLookupContext *alc);
710
711
712/**
683 * Return all the known addresses. FIXME: document better! 713 * Return all the known addresses. FIXME: document better!
684 * FIXME: use better name! 714 * FIXME: use better name! FIXME: extend API to allow cancellation!
685 * 715 *
686 * @param cfg configuration to use 716 * @param cfg configuration to use
687 * @param timeout how long is the lookup allowed to take at most 717 * @param timeout how long is the lookup allowed to take at most