aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-02 11:21:00 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-02 11:21:00 +0000
commit147d72a99e4ed0558c98fe7c9c41062ede51a68a (patch)
treef712c8aa222e53dc3e299972f3144ad92b15b180 /src/include
parent8439fe12f24ab3ae5a1821face2b79d443fa044e (diff)
downloadgnunet-147d72a99e4ed0558c98fe7c9c41062ede51a68a.tar.gz
gnunet-147d72a99e4ed0558c98fe7c9c41062ede51a68a.zip
cleanup API for get_hello and get_hello_cancel
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_testing_lib.h9
-rw-r--r--src/include/gnunet_transport_service.h17
2 files changed, 18 insertions, 8 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 786522cdd..945a3900b 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -319,6 +319,11 @@ struct GNUNET_TESTING_Daemon
319 struct GNUNET_TRANSPORT_Handle *th; 319 struct GNUNET_TRANSPORT_Handle *th;
320 320
321 /** 321 /**
322 * Handle for getting HELLOs from transport
323 */
324 struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
325
326 /**
322 * HELLO message for this peer 327 * HELLO message for this peer
323 */ 328 */
324 struct GNUNET_HELLO_Message *hello; 329 struct GNUNET_HELLO_Message *hello;
@@ -723,7 +728,7 @@ GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg);
723 * @param cb function to call at the end 728 * @param cb function to call at the end
724 * @param cb_cls closure for cb 729 * @param cb_cls closure for cb
725 */ 730 */
726struct GNUNET_TESTING_ConnectContext * 731void /* struct GNUNET_TESTING_ConnectContext * */
727GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, 732GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
728 struct GNUNET_TESTING_Daemon *d2, 733 struct GNUNET_TESTING_Daemon *d2,
729 struct GNUNET_TIME_Relative timeout, 734 struct GNUNET_TIME_Relative timeout,
@@ -733,6 +738,7 @@ GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
733 void *cb_cls); 738 void *cb_cls);
734 739
735 740
741#if 0
736/** 742/**
737 * Cancel an attempt to connect two daemons. 743 * Cancel an attempt to connect two daemons.
738 * 744 *
@@ -741,6 +747,7 @@ GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
741void 747void
742GNUNET_TESTING_daemons_connect_cancel (struct GNUNET_TESTING_ConnectContext 748GNUNET_TESTING_daemons_connect_cancel (struct GNUNET_TESTING_ConnectContext
743 *cc); 749 *cc);
750#endif
744 751
745 752
746/** 753/**
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index e90acab4d..84a13ed68 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -573,13 +573,20 @@ typedef void (*GNUNET_TRANSPORT_HelloUpdateCallback) (void *cls,
573 573
574 574
575/** 575/**
576 * Handle to cancel a 'GNUNET_TRANSPORT_get_hello' operation.
577 */
578struct GNUNET_TRANSPORT_GetHelloHandle;
579
580
581/**
576 * Obtain updates on changes to the HELLO message for this peer. 582 * Obtain updates on changes to the HELLO message for this peer.
577 * 583 *
578 * @param handle connection to transport service 584 * @param handle connection to transport service
579 * @param rec function to call with the HELLO 585 * @param rec function to call with the HELLO
580 * @param rec_cls closure for rec 586 * @param rec_cls closure for rec
587 * @return handle to cancel the operation, NULL on error
581 */ 588 */
582void 589struct GNUNET_TRANSPORT_GetHelloHandle *
583GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle, 590GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
584 GNUNET_TRANSPORT_HelloUpdateCallback rec, 591 GNUNET_TRANSPORT_HelloUpdateCallback rec,
585 void *rec_cls); 592 void *rec_cls);
@@ -588,14 +595,10 @@ GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
588/** 595/**
589 * Stop receiving updates about changes to our HELLO message. 596 * Stop receiving updates about changes to our HELLO message.
590 * 597 *
591 * @param handle connection to transport service 598 * @param ghh handle returned from 'GNUNET_TRANSPORT_get_hello')
592 * @param rec function previously registered to be called with the HELLOs
593 * @param rec_cls closure for rec
594 */ 599 */
595void 600void
596GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle, 601GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_GetHelloHandle *ghh);
597 GNUNET_TRANSPORT_HelloUpdateCallback rec,
598 void *rec_cls);
599 602
600 603
601/** 604/**