X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Finclude%2Fgnunet_pseudonym_lib.h;h=bde98ef8ff7e8caa87ef1b010454cffc0181b20d;hb=a6fb0db57f2a70a05bdb6ef7ccf69a044268dee6;hp=ba240941b54b48ca853732a4a389d21f8edf7193;hpb=fe947a9704bed14c2fc74b2f2069596fe884cbad;p=oweals%2Fgnunet.git diff --git a/src/include/gnunet_pseudonym_lib.h b/src/include/gnunet_pseudonym_lib.h index ba240941b..bde98ef8f 100644 --- a/src/include/gnunet_pseudonym_lib.h +++ b/src/include/gnunet_pseudonym_lib.h @@ -42,15 +42,16 @@ extern "C" /** * Iterator over all known pseudonyms. * + * @param cls closure + * @param pseudonym hash code of public key of pseudonym + * @param md meta data known about the pseudonym * @param rating the local rating of the pseudonym * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort */ typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls, - const GNUNET_HashCode * - pseudonym, - const struct - GNUNET_CONTAINER_MetaData * md, - int rating); + const GNUNET_HashCode * pseudonym, + const struct GNUNET_CONTAINER_MetaData + * md, int rating); /** * Change the ranking of a pseudonym. @@ -60,8 +61,9 @@ typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls, * @param delta by how much should the rating be changed? * @return new rating of the namespace */ -int GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, - const GNUNET_HashCode *nsid, int delta); +int +GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, + const GNUNET_HashCode * nsid, int delta); /** * Add a pseudonym to the set of known pseudonyms. @@ -72,27 +74,33 @@ int GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, * @param id the pseudonym identifier * @param meta metadata for the pseudonym */ -void GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, - const GNUNET_HashCode *id, - const struct GNUNET_CONTAINER_MetaData *meta); +void +GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, + const GNUNET_HashCode * id, + const struct GNUNET_CONTAINER_MetaData *meta); /** * List all known pseudonyms. + * + * @param cfg overall configuration + * @param iterator function to call for each pseudonym + * @param closure closure for iterator + * @return number of pseudonyms found */ -int GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, - GNUNET_PSEUDONYM_Iterator iterator, - void *closure); +int +GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, + GNUNET_PSEUDONYM_Iterator iterator, void *closure); /** * Register callback to be invoked whenever we discover * a new pseudonym. */ -int GNUNET_PSEUDONYM_discovery_callback_register (const struct - GNUNET_CONFIGURATION_Handle - *cfg, - GNUNET_PSEUDONYM_Iterator - iterator, void *closure); +int +GNUNET_PSEUDONYM_discovery_callback_register (const struct + GNUNET_CONFIGURATION_Handle *cfg, + GNUNET_PSEUDONYM_Iterator + iterator, void *closure); /** * Unregister namespace discovery callback. @@ -106,16 +114,18 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator * * @return NULL on failure (should never happen) */ -char *GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle *cfg, - const GNUNET_HashCode * pseudo); +char * +GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle *cfg, + const GNUNET_HashCode * pseudo); /** * Get the pseudonym ID belonging to the given human readable name. * * @return GNUNET_OK on success */ -int GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg, - const char *hname, GNUNET_HashCode * psid); +int +GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg, + const char *hname, GNUNET_HashCode * psid); #if 0 /* keep Emacsens' auto-indent happy */