aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-10 11:50:42 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-10 11:50:42 +0000
commit648a6cd5055798507a011b1e9c0d612371ce7a8d (patch)
treee851a861d26fd9aa02e24ef0ddf9d076258e2cac /src/include
parent2ac8943f5d703fcf886b16fbf2eb6be3fedb746f (diff)
downloadgnunet-648a6cd5055798507a011b1e9c0d612371ce7a8d.tar.gz
gnunet-648a6cd5055798507a011b1e9c0d612371ce7a8d.zip
doku
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_core_service.h84
1 files changed, 50 insertions, 34 deletions
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h
index 24083f1a1..a7c5ba45c 100644
--- a/src/include/gnunet_core_service.h
+++ b/src/include/gnunet_core_service.h
@@ -211,40 +211,6 @@ GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
211 211
212 212
213/** 213/**
214 * Iterate over all connected peers. Calls peer_cb with each
215 * connected peer, and then once with NULL to indicate that all peers
216 * have been handled.
217 *
218 * @param cfg configuration handle
219 * @param peer_cb function to call with the peer information
220 * @param cb_cls closure for peer_cb
221 * @return GNUNET_OK on success, GNUNET_SYSERR on errors
222 */
223int
224GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
225 GNUNET_CORE_ConnectEventHandler peer_cb,
226 void *cb_cls);
227
228
229/**
230 * Check if the given peer is currently connected and return information
231 * about the session if so.
232 *
233 * @param cfg configuration to use
234 * @param peer the specific peer to check for
235 * @param peer_cb function to call with the peer information
236 * @param cb_cls closure for peer_cb
237 *
238 * @return GNUNET_OK if iterating, GNUNET_SYSERR on error
239 */
240int
241GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle *cfg,
242 struct GNUNET_PeerIdentity *peer,
243 GNUNET_CORE_ConnectEventHandler peer_cb,
244 void *cb_cls);
245
246
247/**
248 * Handle for a transmission request. 214 * Handle for a transmission request.
249 */ 215 */
250struct GNUNET_CORE_TransmitHandle; 216struct GNUNET_CORE_TransmitHandle;
@@ -298,6 +264,56 @@ GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle
298 *th); 264 *th);
299 265
300 266
267
268
269
270/**
271 * Iterate over all connected peers. Calls peer_cb with each
272 * connected peer, and then once with NULL to indicate that all peers
273 * have been handled. Normal users of the CORE API are not expected
274 * to use this function. It is different in that it truly lists
275 * all connections, not just those relevant to the application. This
276 * function is used by special applications for diagnostics. This
277 * function is NOT part of the 'versioned', 'official' API.
278 *
279 * FIXME: we should probably make it possible to 'cancel' the
280 * operation...
281 *
282 * @param cfg configuration handle
283 * @param peer_cb function to call with the peer information
284 * @param cb_cls closure for peer_cb
285 * @return GNUNET_OK on success, GNUNET_SYSERR on errors
286 */
287int
288GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
289 GNUNET_CORE_ConnectEventHandler peer_cb,
290 void *cb_cls);
291
292
293/**
294 * Check if the given peer is currently connected and return information
295 * about the session if so. This function is for special cirumstances
296 * (GNUNET_TESTING uses it), normal users of the CORE API are
297 * expected to track which peers are connected based on the
298 * connect/disconnect callbacks from GNUNET_CORE_connect. This
299 * function is NOT part of the 'versioned', 'official' API.
300 *
301 * FIXME: we should probably make it possible to 'cancel' the
302 * operation...
303 *
304 * @param cfg configuration to use
305 * @param peer the specific peer to check for
306 * @param peer_cb function to call with the peer information
307 * @param cb_cls closure for peer_cb
308 * @return GNUNET_OK if iterating, GNUNET_SYSERR on error
309 */
310int
311GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle *cfg,
312 struct GNUNET_PeerIdentity *peer,
313 GNUNET_CORE_ConnectEventHandler peer_cb,
314 void *cb_cls);
315
316
301#if 0 /* keep Emacsens' auto-indent happy */ 317#if 0 /* keep Emacsens' auto-indent happy */
302{ 318{
303#endif 319#endif