diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-10-03 20:12:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-10-03 20:12:09 +0000 |
commit | 5baf12a487a19225962d15e28ba52f10d1d1f7d4 (patch) | |
tree | 59b511a23d38b57ef880e7171a46df6e90562893 /src/include/gnunet_hello_lib.h | |
parent | f7f85255bce69204e68b5fca21afae8ea4d6d352 (diff) | |
download | gnunet-5baf12a487a19225962d15e28ba52f10d1d1f7d4.tar.gz gnunet-5baf12a487a19225962d15e28ba52f10d1d1f7d4.zip |
improving comments and coding style for libgnunethello library
Diffstat (limited to 'src/include/gnunet_hello_lib.h')
-rw-r--r-- | src/include/gnunet_hello_lib.h | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h index f08d4cb2a..f7f4780f0 100644 --- a/src/include/gnunet_hello_lib.h +++ b/src/include/gnunet_hello_lib.h | |||
@@ -204,7 +204,7 @@ struct GNUNET_HELLO_Message; | |||
204 | * Return HELLO type | 204 | * Return HELLO type |
205 | * | 205 | * |
206 | * @param h HELLO Message to test | 206 | * @param h HELLO Message to test |
207 | * @return #GNUNET_YES or #GNUNET_NO | 207 | * @return #GNUNET_YES for friend-only or #GNUNET_NO otherwise |
208 | */ | 208 | */ |
209 | int | 209 | int |
210 | GNUNET_HELLO_is_friend_only (const struct GNUNET_HELLO_Message *h); | 210 | GNUNET_HELLO_is_friend_only (const struct GNUNET_HELLO_Message *h); |
@@ -253,14 +253,14 @@ typedef ssize_t | |||
253 | * If friend only is set to #GNUNET_YES we create a FRIEND_HELLO which | 253 | * If friend only is set to #GNUNET_YES we create a FRIEND_HELLO which |
254 | * will not be gossiped to other peers. | 254 | * will not be gossiped to other peers. |
255 | * | 255 | * |
256 | * @param publicKey public key to include in the HELLO | 256 | * @param public_key public key to include in the HELLO |
257 | * @param addrgen callback to invoke to get addresses | 257 | * @param addrgen callback to invoke to get addresses |
258 | * @param addrgen_cls closure for @a addrgen | 258 | * @param addrgen_cls closure for @a addrgen |
259 | * @param friend_only should the returned HELLO be only visible to friends? | 259 | * @param friend_only should the returned HELLO be only visible to friends? |
260 | * @return the hello message | 260 | * @return the hello message |
261 | */ | 261 | */ |
262 | struct GNUNET_HELLO_Message * | 262 | struct GNUNET_HELLO_Message * |
263 | GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EddsaPublicKey *publicKey, | 263 | GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EddsaPublicKey *public_key, |
264 | GNUNET_HELLO_GenerateAddressListCallback addrgen, | 264 | GNUNET_HELLO_GenerateAddressListCallback addrgen, |
265 | void *addrgen_cls, | 265 | void *addrgen_cls, |
266 | int friend_only); | 266 | int friend_only); |
@@ -357,8 +357,10 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg, | |||
357 | 357 | ||
358 | 358 | ||
359 | /** | 359 | /** |
360 | * Iterate over addresses in "new_hello" that | 360 | * Iterate over addresses in @a new_hello that are NOT already present |
361 | * are NOT already present in "old_hello". | 361 | * in @a old_hello. Note that if the address is present in @a old_hello |
362 | * but the expiration time in @a new_hello is more recent, the | ||
363 | * iterator is also called. | ||
362 | * | 364 | * |
363 | * @param new_hello a HELLO message | 365 | * @param new_hello a HELLO message |
364 | * @param old_hello a HELLO message | 366 | * @param old_hello a HELLO message |
@@ -376,18 +378,6 @@ GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message *new_hello | |||
376 | 378 | ||
377 | 379 | ||
378 | /** | 380 | /** |
379 | * Get the public key from a HELLO message. | ||
380 | * | ||
381 | * @param hello the hello message | ||
382 | * @param publicKey where to copy the public key information, can be NULL | ||
383 | * @return #GNUNET_SYSERR if the HELLO was malformed | ||
384 | */ | ||
385 | int | ||
386 | GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello, | ||
387 | struct GNUNET_CRYPTO_EddsaPublicKey *publicKey); | ||
388 | |||
389 | |||
390 | /** | ||
391 | * Get the peer identity from a HELLO message. | 381 | * Get the peer identity from a HELLO message. |
392 | * | 382 | * |
393 | * @param hello the hello message | 383 | * @param hello the hello message |
@@ -412,9 +402,11 @@ GNUNET_HELLO_get_header (struct GNUNET_HELLO_Message *hello); | |||
412 | 402 | ||
413 | 403 | ||
414 | /** | 404 | /** |
415 | * FIXME. | 405 | * Helper function to load/access transport plugins. |
406 | * FIXME: pass closure! | ||
416 | * | 407 | * |
417 | * @param name | 408 | * @param name name of the transport plugin to load |
409 | * @return NULL if a plugin with name @a name is not known/loadable | ||
418 | */ | 410 | */ |
419 | typedef struct GNUNET_TRANSPORT_PluginFunctions * | 411 | typedef struct GNUNET_TRANSPORT_PluginFunctions * |
420 | (*GNUNET_HELLO_TransportPluginsFind) (const char *name); | 412 | (*GNUNET_HELLO_TransportPluginsFind) (const char *name); |