diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_identity_service.h | 82 |
1 files changed, 39 insertions, 43 deletions
diff --git a/src/include/gnunet_identity_service.h b/src/include/gnunet_identity_service.h index 043a71770..035b9e227 100644 --- a/src/include/gnunet_identity_service.h +++ b/src/include/gnunet_identity_service.h | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -43,9 +43,8 @@ | |||
43 | #define GNUNET_IDENTITY_SERVICE_H | 43 | #define GNUNET_IDENTITY_SERVICE_H |
44 | 44 | ||
45 | #ifdef __cplusplus | 45 | #ifdef __cplusplus |
46 | extern "C" | 46 | extern "C" { |
47 | { | 47 | #if 0 /* keep Emacsens' auto-indent happy */ |
48 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
49 | } | 48 | } |
50 | #endif | 49 | #endif |
51 | #endif | 50 | #endif |
@@ -101,7 +100,7 @@ GNUNET_IDENTITY_ego_get_anonymous (void); | |||
101 | */ | 100 | */ |
102 | void | 101 | void |
103 | GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego, | 102 | GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego, |
104 | struct GNUNET_CRYPTO_EcdsaPublicKey *pk); | 103 | struct GNUNET_CRYPTO_EcdsaPublicKey *pk); |
105 | 104 | ||
106 | 105 | ||
107 | /** | 106 | /** |
@@ -138,11 +137,10 @@ GNUNET_IDENTITY_ego_get_public_key (const struct GNUNET_IDENTITY_Ego *ego, | |||
138 | * NULL if the user just deleted the ego and it | 137 | * NULL if the user just deleted the ego and it |
139 | * must thus no longer be used | 138 | * must thus no longer be used |
140 | */ | 139 | */ |
141 | typedef void | 140 | typedef void (*GNUNET_IDENTITY_Callback) (void *cls, |
142 | (*GNUNET_IDENTITY_Callback)(void *cls, | 141 | struct GNUNET_IDENTITY_Ego *ego, |
143 | struct GNUNET_IDENTITY_Ego *ego, | 142 | void **ctx, |
144 | void **ctx, | 143 | const char *name); |
145 | const char *name); | ||
146 | 144 | ||
147 | 145 | ||
148 | /** | 146 | /** |
@@ -155,8 +153,8 @@ typedef void | |||
155 | */ | 153 | */ |
156 | struct GNUNET_IDENTITY_Handle * | 154 | struct GNUNET_IDENTITY_Handle * |
157 | GNUNET_IDENTITY_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 155 | GNUNET_IDENTITY_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
158 | GNUNET_IDENTITY_Callback cb, | 156 | GNUNET_IDENTITY_Callback cb, |
159 | void *cb_cls); | 157 | void *cb_cls); |
160 | 158 | ||
161 | 159 | ||
162 | /** | 160 | /** |
@@ -170,9 +168,9 @@ GNUNET_IDENTITY_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
170 | */ | 168 | */ |
171 | struct GNUNET_IDENTITY_Operation * | 169 | struct GNUNET_IDENTITY_Operation * |
172 | GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *id, | 170 | GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *id, |
173 | const char *service_name, | 171 | const char *service_name, |
174 | GNUNET_IDENTITY_Callback cb, | 172 | GNUNET_IDENTITY_Callback cb, |
175 | void *cb_cls); | 173 | void *cb_cls); |
176 | 174 | ||
177 | 175 | ||
178 | /** | 176 | /** |
@@ -182,9 +180,7 @@ GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *id, | |||
182 | * @param cls closure | 180 | * @param cls closure |
183 | * @param emsg NULL on success, otherwise an error message | 181 | * @param emsg NULL on success, otherwise an error message |
184 | */ | 182 | */ |
185 | typedef void | 183 | typedef void (*GNUNET_IDENTITY_Continuation) (void *cls, const char *emsg); |
186 | (*GNUNET_IDENTITY_Continuation)(void *cls, | ||
187 | const char *emsg); | ||
188 | 184 | ||
189 | 185 | ||
190 | /** | 186 | /** |
@@ -199,10 +195,10 @@ typedef void | |||
199 | */ | 195 | */ |
200 | struct GNUNET_IDENTITY_Operation * | 196 | struct GNUNET_IDENTITY_Operation * |
201 | GNUNET_IDENTITY_set (struct GNUNET_IDENTITY_Handle *id, | 197 | GNUNET_IDENTITY_set (struct GNUNET_IDENTITY_Handle *id, |
202 | const char *service_name, | 198 | const char *service_name, |
203 | struct GNUNET_IDENTITY_Ego *ego, | 199 | struct GNUNET_IDENTITY_Ego *ego, |
204 | GNUNET_IDENTITY_Continuation cont, | 200 | GNUNET_IDENTITY_Continuation cont, |
205 | void *cont_cls); | 201 | void *cont_cls); |
206 | 202 | ||
207 | 203 | ||
208 | /** | 204 | /** |
@@ -222,10 +218,10 @@ GNUNET_IDENTITY_disconnect (struct GNUNET_IDENTITY_Handle *h); | |||
222 | * @param pk private key, NULL on error | 218 | * @param pk private key, NULL on error |
223 | * @param emsg error message, NULL on success | 219 | * @param emsg error message, NULL on success |
224 | */ | 220 | */ |
225 | typedef void | 221 | typedef void (*GNUNET_IDENTITY_CreateContinuation) ( |
226 | (*GNUNET_IDENTITY_CreateContinuation)(void *cls, | 222 | void *cls, |
227 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk, | 223 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk, |
228 | const char *emsg); | 224 | const char *emsg); |
229 | 225 | ||
230 | 226 | ||
231 | /** | 227 | /** |
@@ -239,9 +235,9 @@ typedef void | |||
239 | */ | 235 | */ |
240 | struct GNUNET_IDENTITY_Operation * | 236 | struct GNUNET_IDENTITY_Operation * |
241 | GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id, | 237 | GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id, |
242 | const char *name, | 238 | const char *name, |
243 | GNUNET_IDENTITY_CreateContinuation cont, | 239 | GNUNET_IDENTITY_CreateContinuation cont, |
244 | void *cont_cls); | 240 | void *cont_cls); |
245 | 241 | ||
246 | 242 | ||
247 | /** | 243 | /** |
@@ -256,10 +252,10 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id, | |||
256 | */ | 252 | */ |
257 | struct GNUNET_IDENTITY_Operation * | 253 | struct GNUNET_IDENTITY_Operation * |
258 | GNUNET_IDENTITY_rename (struct GNUNET_IDENTITY_Handle *id, | 254 | GNUNET_IDENTITY_rename (struct GNUNET_IDENTITY_Handle *id, |
259 | const char *old_name, | 255 | const char *old_name, |
260 | const char *new_name, | 256 | const char *new_name, |
261 | GNUNET_IDENTITY_Continuation cb, | 257 | GNUNET_IDENTITY_Continuation cb, |
262 | void *cb_cls); | 258 | void *cb_cls); |
263 | 259 | ||
264 | 260 | ||
265 | /** | 261 | /** |
@@ -273,9 +269,9 @@ GNUNET_IDENTITY_rename (struct GNUNET_IDENTITY_Handle *id, | |||
273 | */ | 269 | */ |
274 | struct GNUNET_IDENTITY_Operation * | 270 | struct GNUNET_IDENTITY_Operation * |
275 | GNUNET_IDENTITY_delete (struct GNUNET_IDENTITY_Handle *id, | 271 | GNUNET_IDENTITY_delete (struct GNUNET_IDENTITY_Handle *id, |
276 | const char *name, | 272 | const char *name, |
277 | GNUNET_IDENTITY_Continuation cb, | 273 | GNUNET_IDENTITY_Continuation cb, |
278 | void *cb_cls); | 274 | void *cb_cls); |
279 | 275 | ||
280 | 276 | ||
281 | /** | 277 | /** |
@@ -298,9 +294,9 @@ GNUNET_IDENTITY_cancel (struct GNUNET_IDENTITY_Operation *op); | |||
298 | * @param cls closure | 294 | * @param cls closure |
299 | * @param ego NULL on error / ego not found | 295 | * @param ego NULL on error / ego not found |
300 | */ | 296 | */ |
301 | typedef void | 297 | typedef void (*GNUNET_IDENTITY_EgoCallback) ( |
302 | (*GNUNET_IDENTITY_EgoCallback)(void *cls, | 298 | void *cls, |
303 | const struct GNUNET_IDENTITY_Ego *ego); | 299 | const struct GNUNET_IDENTITY_Ego *ego); |
304 | 300 | ||
305 | /** | 301 | /** |
306 | * Handle for ego lookup. | 302 | * Handle for ego lookup. |
@@ -319,9 +315,9 @@ struct GNUNET_IDENTITY_EgoLookup; | |||
319 | */ | 315 | */ |
320 | struct GNUNET_IDENTITY_EgoLookup * | 316 | struct GNUNET_IDENTITY_EgoLookup * |
321 | GNUNET_IDENTITY_ego_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, | 317 | GNUNET_IDENTITY_ego_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, |
322 | const char *name, | 318 | const char *name, |
323 | GNUNET_IDENTITY_EgoCallback cb, | 319 | GNUNET_IDENTITY_EgoCallback cb, |
324 | void *cb_cls); | 320 | void *cb_cls); |
325 | 321 | ||
326 | 322 | ||
327 | /** | 323 | /** |
@@ -333,7 +329,7 @@ void | |||
333 | GNUNET_IDENTITY_ego_lookup_cancel (struct GNUNET_IDENTITY_EgoLookup *el); | 329 | GNUNET_IDENTITY_ego_lookup_cancel (struct GNUNET_IDENTITY_EgoLookup *el); |
334 | 330 | ||
335 | 331 | ||
336 | #if 0 /* keep Emacsens' auto-indent happy */ | 332 | #if 0 /* keep Emacsens' auto-indent happy */ |
337 | { | 333 | { |
338 | #endif | 334 | #endif |
339 | #ifdef __cplusplus | 335 | #ifdef __cplusplus |