diff options
Diffstat (limited to 'src/include/gnunet_pseudonym_lib.h')
-rw-r--r-- | src/include/gnunet_pseudonym_lib.h | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/src/include/gnunet_pseudonym_lib.h b/src/include/gnunet_pseudonym_lib.h index 7a9373cc4..138375fe1 100644 --- a/src/include/gnunet_pseudonym_lib.h +++ b/src/include/gnunet_pseudonym_lib.h | |||
@@ -61,8 +61,9 @@ typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls, | |||
61 | * @param delta by how much should the rating be changed? | 61 | * @param delta by how much should the rating be changed? |
62 | * @return new rating of the namespace | 62 | * @return new rating of the namespace |
63 | */ | 63 | */ |
64 | int GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, | 64 | int |
65 | const GNUNET_HashCode * nsid, int delta); | 65 | GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, |
66 | const GNUNET_HashCode * nsid, int delta); | ||
66 | 67 | ||
67 | /** | 68 | /** |
68 | * Add a pseudonym to the set of known pseudonyms. | 69 | * Add a pseudonym to the set of known pseudonyms. |
@@ -73,9 +74,10 @@ int GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
73 | * @param id the pseudonym identifier | 74 | * @param id the pseudonym identifier |
74 | * @param meta metadata for the pseudonym | 75 | * @param meta metadata for the pseudonym |
75 | */ | 76 | */ |
76 | void GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, | 77 | void |
77 | const GNUNET_HashCode * id, | 78 | GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, |
78 | const struct GNUNET_CONTAINER_MetaData *meta); | 79 | const GNUNET_HashCode * id, |
80 | const struct GNUNET_CONTAINER_MetaData *meta); | ||
79 | 81 | ||
80 | 82 | ||
81 | /** | 83 | /** |
@@ -86,41 +88,44 @@ void GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
86 | * @param closure closure for iterator | 88 | * @param closure closure for iterator |
87 | * @return number of pseudonyms found | 89 | * @return number of pseudonyms found |
88 | */ | 90 | */ |
89 | int GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, | 91 | int |
90 | GNUNET_PSEUDONYM_Iterator iterator, | 92 | GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, |
91 | void *closure); | 93 | GNUNET_PSEUDONYM_Iterator iterator, void *closure); |
92 | 94 | ||
93 | /** | 95 | /** |
94 | * Register callback to be invoked whenever we discover | 96 | * Register callback to be invoked whenever we discover |
95 | * a new pseudonym. | 97 | * a new pseudonym. |
96 | */ | 98 | */ |
97 | int GNUNET_PSEUDONYM_discovery_callback_register (const struct | 99 | int |
98 | GNUNET_CONFIGURATION_Handle | 100 | GNUNET_PSEUDONYM_discovery_callback_register (const struct |
99 | *cfg, | 101 | GNUNET_CONFIGURATION_Handle *cfg, |
100 | GNUNET_PSEUDONYM_Iterator | 102 | GNUNET_PSEUDONYM_Iterator |
101 | iterator, void *closure); | 103 | iterator, void *closure); |
102 | 104 | ||
103 | /** | 105 | /** |
104 | * Unregister namespace discovery callback. | 106 | * Unregister namespace discovery callback. |
105 | */ | 107 | */ |
106 | int GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator | 108 | int |
107 | iterator, void *closure); | 109 | GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator |
110 | iterator, void *closure); | ||
108 | 111 | ||
109 | /** | 112 | /** |
110 | * Return the unique, human readable name for the given pseudonym. | 113 | * Return the unique, human readable name for the given pseudonym. |
111 | * | 114 | * |
112 | * @return NULL on failure (should never happen) | 115 | * @return NULL on failure (should never happen) |
113 | */ | 116 | */ |
114 | char *GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle | 117 | char * |
115 | *cfg, const GNUNET_HashCode * pseudo); | 118 | GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle *cfg, |
119 | const GNUNET_HashCode * pseudo); | ||
116 | 120 | ||
117 | /** | 121 | /** |
118 | * Get the pseudonym ID belonging to the given human readable name. | 122 | * Get the pseudonym ID belonging to the given human readable name. |
119 | * | 123 | * |
120 | * @return GNUNET_OK on success | 124 | * @return GNUNET_OK on success |
121 | */ | 125 | */ |
122 | int GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg, | 126 | int |
123 | const char *hname, GNUNET_HashCode * psid); | 127 | GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg, |
128 | const char *hname, GNUNET_HashCode * psid); | ||
124 | 129 | ||
125 | 130 | ||
126 | #if 0 /* keep Emacsens' auto-indent happy */ | 131 | #if 0 /* keep Emacsens' auto-indent happy */ |