diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_transport_plugin.h | 31 | ||||
-rw-r--r-- | src/include/gnunet_transport_service.h | 20 |
2 files changed, 37 insertions, 14 deletions
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index 7fc12d4bb..b32b94004 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | (C) 2009, 2010 Christian Grothoff (and other contributing authors) | 3 | (C) 2009-2014 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -194,18 +194,28 @@ typedef struct GNUNET_TIME_Relative | |||
194 | const struct GNUNET_PeerIdentity *peer, | 194 | const struct GNUNET_PeerIdentity *peer, |
195 | size_t amount_recved); | 195 | size_t amount_recved); |
196 | 196 | ||
197 | /** | ||
198 | * FIXME: document! | ||
199 | */ | ||
197 | typedef void | 200 | typedef void |
198 | (*GNUNET_TRANSPORT_RegisterQuotaNotification) (void *cls, | 201 | (*GNUNET_TRANSPORT_RegisterQuotaNotification) (void *cls, |
199 | const struct GNUNET_PeerIdentity *peer, | 202 | const struct GNUNET_PeerIdentity *peer, |
200 | const char *plugin, | 203 | const char *plugin, |
201 | struct Session *session); | 204 | struct Session *session); |
202 | 205 | ||
206 | /** | ||
207 | * FIXME: document! | ||
208 | */ | ||
203 | typedef void | 209 | typedef void |
204 | (*GNUNET_TRANSPORT_UnregisterQuotaNotification) (void *cls, | 210 | (*GNUNET_TRANSPORT_UnregisterQuotaNotification) (void *cls, |
205 | const struct GNUNET_PeerIdentity *peer, const char *plugin, struct Session *session); | 211 | const struct GNUNET_PeerIdentity *peer, |
212 | const char *plugin, | ||
213 | struct Session *session); | ||
206 | 214 | ||
207 | /** | 215 | /** |
208 | * Function that returns a HELLO message. | 216 | * Function that returns a HELLO message. |
217 | * | ||
218 | * @return HELLO message (FIXME with what?) | ||
209 | */ | 219 | */ |
210 | typedef const struct GNUNET_MessageHeader * | 220 | typedef const struct GNUNET_MessageHeader * |
211 | (*GNUNET_TRANSPORT_GetHelloCallback) (void); | 221 | (*GNUNET_TRANSPORT_GetHelloCallback) (void); |
@@ -284,8 +294,14 @@ struct GNUNET_TRANSPORT_PluginEnvironment | |||
284 | */ | 294 | */ |
285 | GNUNET_TRANSPORT_UpdateAddressMetrics update_address_metrics; | 295 | GNUNET_TRANSPORT_UpdateAddressMetrics update_address_metrics; |
286 | 296 | ||
297 | /** | ||
298 | * FIXME: document! | ||
299 | */ | ||
287 | GNUNET_TRANSPORT_RegisterQuotaNotification register_quota_notification; | 300 | GNUNET_TRANSPORT_RegisterQuotaNotification register_quota_notification; |
288 | 301 | ||
302 | /** | ||
303 | * FIXME: document! | ||
304 | */ | ||
289 | GNUNET_TRANSPORT_UnregisterQuotaNotification unregister_quota_notification; | 305 | GNUNET_TRANSPORT_UnregisterQuotaNotification unregister_quota_notification; |
290 | 306 | ||
291 | /** | 307 | /** |
@@ -412,12 +428,17 @@ typedef void | |||
412 | 428 | ||
413 | /** | 429 | /** |
414 | * Function called by the pretty printer for the resolved address for | 430 | * Function called by the pretty printer for the resolved address for |
415 | * each human-readable address obtained. | 431 | * each human-readable address obtained. The callback can be called |
432 | * several times. The last invocation must be with a @a address of | ||
433 | * NULL and a @a res of #GNUNET_OK. Thus, to indicate conversion | ||
434 | * errors, the callback might be called first with @a address NULL and | ||
435 | * @a res being #GNUNET_SYSERR. In that case, there must still be a | ||
436 | * subsequent call later with @a address NULL and @a res #GNUNET_OK. | ||
416 | * | 437 | * |
417 | * @param cls closure | 438 | * @param cls closure |
418 | * @param address one of the names for the host, NULL on last callback | 439 | * @param address one of the names for the host, NULL on last callback |
419 | * @param res GNUNET_OK if conversion was successful, GNUNET_SYSERR on failure, | 440 | * @param res #GNUNET_OK if conversion was successful, #GNUNET_SYSERR on failure, |
420 | * GNUNET_OK on last callback | 441 | * #GNUNET_OK on last callback |
421 | */ | 442 | */ |
422 | typedef void | 443 | typedef void |
423 | (*GNUNET_TRANSPORT_AddressStringCallback) (void *cls, | 444 | (*GNUNET_TRANSPORT_AddressStringCallback) (void *cls, |
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 9e82a0dda..3a4d282e4 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -277,18 +277,20 @@ typedef void | |||
277 | 277 | ||
278 | 278 | ||
279 | /** | 279 | /** |
280 | * Function to call with a textual representation of an address. | 280 | * Function to call with a textual representation of an address. This |
281 | * This function will be called several times with different possible | 281 | * function will be called several times with different possible |
282 | * textual representations, and a last time with NULL to signal the end | 282 | * textual representations, and a last time with @address being NULL |
283 | * of the iteration. | 283 | * to signal the end of the iteration. Note that @address NULL |
284 | * always is the last call, regardless of the value in @a res. | ||
284 | * | 285 | * |
285 | * @param cls closure | 286 | * @param cls closure |
286 | * @param address NULL on error or end of iteration, | 287 | * @param address NULL on end of iteration, |
287 | * otherwise 0-terminated printable UTF-8 string | 288 | * otherwise 0-terminated printable UTF-8 string, |
289 | * in particular an empty string if @a res is #GNUNET_NO | ||
288 | * @param res result of the address to string conversion: | 290 | * @param res result of the address to string conversion: |
289 | * if #GNUNET_OK: address was valid (conversion to | 291 | * if #GNUNET_OK: conversion successful |
290 | * string might still have failed) | 292 | * if #GNUNET_NO: address was invalid (or not supported) |
291 | * if #GNUNET_SYSERR: address is invalid | 293 | * if #GNUNET_SYSERR: communication error (IPC error) |
292 | */ | 294 | */ |
293 | typedef void | 295 | typedef void |
294 | (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls, | 296 | (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls, |