diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-31 11:26:51 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-31 11:26:51 +0000 |
commit | 28067448d3952faa16107f209e670c3a75d980d6 (patch) | |
tree | f2dd730474c9b1fcbe080130a99f210f3d868168 /src/testbed/gnunet-service-testbed.h | |
parent | c3e341dbcf55f02e0b246ddc47c1e692cb9fe78f (diff) | |
download | gnunet-28067448d3952faa16107f209e670c3a75d980d6.tar.gz gnunet-28067448d3952faa16107f209e670c3a75d980d6.zip |
- get core handle in core startup callback
Diffstat (limited to 'src/testbed/gnunet-service-testbed.h')
-rw-r--r-- | src/testbed/gnunet-service-testbed.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h index bd18d69c8..d4adf2526 100644 --- a/src/testbed/gnunet-service-testbed.h +++ b/src/testbed/gnunet-service-testbed.h | |||
@@ -863,6 +863,37 @@ GST_cache_get_handle_transport (unsigned int peer_id, | |||
863 | 863 | ||
864 | 864 | ||
865 | /** | 865 | /** |
866 | * Get a CORE handle with the given configuration. If the handle is already | ||
867 | * cached before, it will be retured in the given callback; the peer_id is used | ||
868 | * to lookup in the cache. If the handle is not cached before, a new operation | ||
869 | * is started to open the CORE handle and will be given in the callback when it | ||
870 | * is available along with the peer identity | ||
871 | * | ||
872 | * @param peer_id the index of the peer | ||
873 | * @param cfg the configuration with which the transport handle has to be | ||
874 | * created if it was not present in the cache | ||
875 | * @param cb the callback to notify when the transport handle is available | ||
876 | * @param cb_cls the closure for the above callback | ||
877 | * @param target the peer identify of the peer whose connection to our CORE | ||
878 | * subsystem will be notified through the connect_notify_cb. Can be NULL | ||
879 | * @param connect_notify_cb the callback to call when the given target peer is | ||
880 | * connected. This callback will only be called once or never again (in | ||
881 | * case the target peer cannot be connected). Can be NULL | ||
882 | * @param connect_notify_cb_cls the closure for the above callback | ||
883 | * @return the handle which can be used cancel or mark that the handle is no | ||
884 | * longer being used | ||
885 | */ | ||
886 | struct GSTCacheGetHandle * | ||
887 | GST_cache_get_handle_core (unsigned int peer_id, | ||
888 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
889 | GST_cache_callback cb, | ||
890 | void *cb_cls, | ||
891 | const struct GNUNET_PeerIdentity *target, | ||
892 | GST_cache_peer_connect_notify connect_notify_cb, | ||
893 | void *connect_notify_cb_cls); | ||
894 | |||
895 | |||
896 | /** | ||
866 | * Mark the GetCacheHandle as being done if a handle has been provided already | 897 | * Mark the GetCacheHandle as being done if a handle has been provided already |
867 | * or as being cancelled if the callback for the handle hasn't been called. | 898 | * or as being cancelled if the callback for the handle hasn't been called. |
868 | * | 899 | * |