diff options
author | Nathan S. Evans <evans@in.tum.de> | 2011-02-16 16:25:01 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2011-02-16 16:25:01 +0000 |
commit | 6ba4e3ed384f9c3e5afd6595b6c0ca42be55f336 (patch) | |
tree | 57b67b29d0c269fa0f1e888c5d60511c609bd56b /src/include/gnunet_core_service.h | |
parent | 27a6cee72d7c479853acbeed0047534fd4566deb (diff) | |
download | gnunet-6ba4e3ed384f9c3e5afd6595b6c0ca42be55f336.tar.gz gnunet-6ba4e3ed384f9c3e5afd6595b6c0ca42be55f336.zip |
add specific peer check to core iteration api
Diffstat (limited to 'src/include/gnunet_core_service.h')
-rw-r--r-- | src/include/gnunet_core_service.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index b93c86b79..5664d34fc 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h | |||
@@ -380,6 +380,25 @@ GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
380 | GNUNET_CORE_ConnectEventHandler peer_cb, | 380 | GNUNET_CORE_ConnectEventHandler peer_cb, |
381 | void *cb_cls); | 381 | void *cb_cls); |
382 | 382 | ||
383 | /** | ||
384 | * Iterate over all currently connected peers. | ||
385 | * Calls peer_cb with each connected peer, and then | ||
386 | * once with NULL to indicate that all peers have | ||
387 | * been handled. | ||
388 | * | ||
389 | * @param cfg configuration to use | ||
390 | * @param peer the specific peer to check for | ||
391 | * @param peer_cb function to call with the peer information | ||
392 | * @param cb_cls closure for peer_cb | ||
393 | * | ||
394 | * @return GNUNET_OK if iterating, GNUNET_SYSERR on error | ||
395 | */ | ||
396 | int | ||
397 | GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
398 | struct GNUNET_PeerIdentity *peer, | ||
399 | GNUNET_CORE_ConnectEventHandler peer_cb, | ||
400 | void *cb_cls); | ||
401 | |||
383 | 402 | ||
384 | /** | 403 | /** |
385 | * Handle for a transmission request. | 404 | * Handle for a transmission request. |