aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_core_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-02 11:10:12 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-02 11:10:12 +0000
commitb734ef1365245bbaf42fbdb1861baeaa95327f67 (patch)
tree6f65f4ce7e052244c5523bdcc89724820ca41d56 /src/include/gnunet_core_service.h
parent45063a766d9a922d7f2b762ede305679e728cbfc (diff)
downloadgnunet-b734ef1365245bbaf42fbdb1861baeaa95327f67.tar.gz
gnunet-b734ef1365245bbaf42fbdb1861baeaa95327f67.zip
-fixing #2293
Diffstat (limited to 'src/include/gnunet_core_service.h')
-rw-r--r--src/include/gnunet_core_service.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h
index a317fbdd5..cb48f4182 100644
--- a/src/include/gnunet_core_service.h
+++ b/src/include/gnunet_core_service.h
@@ -292,6 +292,12 @@ GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
292 292
293 293
294/** 294/**
295 * Handle to cancel 'is_peer_connected' test.
296 */
297struct GNUNET_CORE_ConnectTestHandle;
298
299
300/**
295 * Check if the given peer is currently connected and return information 301 * Check if the given peer is currently connected and return information
296 * about the session if so. This function is for special cirumstances 302 * about the session if so. This function is for special cirumstances
297 * (GNUNET_TESTING uses it), normal users of the CORE API are 303 * (GNUNET_TESTING uses it), normal users of the CORE API are
@@ -299,22 +305,28 @@ GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
299 * connect/disconnect callbacks from GNUNET_CORE_connect. This 305 * connect/disconnect callbacks from GNUNET_CORE_connect. This
300 * function is NOT part of the 'versioned', 'official' API. 306 * function is NOT part of the 'versioned', 'official' API.
301 * 307 *
302 * FIXME: we should probably make it possible to 'cancel' the
303 * operation...
304 *
305 * @param cfg configuration to use 308 * @param cfg configuration to use
306 * @param peer the specific peer to check for 309 * @param peer the specific peer to check for
307 * @param peer_cb function to call with the peer information 310 * @param peer_cb function to call with the peer information
308 * @param cb_cls closure for peer_cb 311 * @param cb_cls closure for peer_cb
309 * @return GNUNET_OK if iterating, GNUNET_SYSERR on error 312 * @return handle to cancel the operation
310 */ 313 */
311int 314struct GNUNET_CORE_ConnectTestHandle *
312GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle *cfg, 315GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle *cfg,
313 struct GNUNET_PeerIdentity *peer, 316 const struct GNUNET_PeerIdentity *peer,
314 GNUNET_CORE_ConnectEventHandler peer_cb, 317 GNUNET_CORE_ConnectEventHandler peer_cb,
315 void *cb_cls); 318 void *cb_cls);
316 319
317 320
321/**
322 * Abort 'is_connected' test operation.
323 *
324 * @param cth handle for operation to cancel
325 */
326void
327GNUNET_CORE_is_peer_connected_cancel (struct GNUNET_CORE_ConnectTestHandle *cth);
328
329
318#if 0 /* keep Emacsens' auto-indent happy */ 330#if 0 /* keep Emacsens' auto-indent happy */
319{ 331{
320#endif 332#endif