diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-09 22:04:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-09 22:04:11 +0000 |
commit | 1dd22b0d681848af9980e5202e38b1a307cf2094 (patch) | |
tree | e013a7f735f2e967222890d87136bd5b76c1f803 /src/include/gnunet_transport_plugin.h | |
parent | c9f75566447fd3a9c5c304dbc8e31fd68b6aa3ed (diff) | |
download | gnunet-1dd22b0d681848af9980e5202e38b1a307cf2094.tar.gz gnunet-1dd22b0d681848af9980e5202e38b1a307cf2094.zip |
clarify prettyprinter API and protocols, make sure implementations are consistent in their implemenation, doxygen fixes, indentation fixes, subtle semantic fixes
Diffstat (limited to 'src/include/gnunet_transport_plugin.h')
-rw-r--r-- | src/include/gnunet_transport_plugin.h | 31 |
1 files changed, 26 insertions, 5 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, |