diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-09-22 19:06:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-09-22 19:06:35 +0000 |
commit | 4ad96e182037d35ec6e62a8bfb1d2ea9b14be106 (patch) | |
tree | 7e5b055bce051c11bfd460443956e619466d4710 /src/util/pseudonym.c | |
parent | d62bacc863759d211988cd59d0f0849e378d2a61 (diff) | |
download | gnunet-4ad96e182037d35ec6e62a8bfb1d2ea9b14be106.tar.gz gnunet-4ad96e182037d35ec6e62a8bfb1d2ea9b14be106.zip |
documentation cleanup
Diffstat (limited to 'src/util/pseudonym.c')
-rw-r--r-- | src/util/pseudonym.c | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index c19662540..5d9750f5b 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c | |||
@@ -30,20 +30,49 @@ | |||
30 | #include "gnunet_disk_lib.h" | 30 | #include "gnunet_disk_lib.h" |
31 | #include "gnunet_pseudonym_lib.h" | 31 | #include "gnunet_pseudonym_lib.h" |
32 | 32 | ||
33 | /** | ||
34 | * FIXME | ||
35 | */ | ||
33 | #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/metadata" DIR_SEPARATOR_STR | 36 | #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/metadata" DIR_SEPARATOR_STR |
37 | |||
38 | /** | ||
39 | * FIXME | ||
40 | */ | ||
34 | #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/names" DIR_SEPARATOR_STR | 41 | #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/names" DIR_SEPARATOR_STR |
35 | 42 | ||
43 | |||
44 | /** | ||
45 | * FIXME | ||
46 | */ | ||
36 | struct DiscoveryCallback | 47 | struct DiscoveryCallback |
37 | { | 48 | { |
49 | |||
50 | /** | ||
51 | * FIXME | ||
52 | */ | ||
38 | struct DiscoveryCallback *next; | 53 | struct DiscoveryCallback *next; |
54 | |||
55 | /** | ||
56 | * FIXME | ||
57 | */ | ||
39 | GNUNET_PSEUDONYM_Iterator callback; | 58 | GNUNET_PSEUDONYM_Iterator callback; |
59 | |||
60 | /** | ||
61 | * FIXME | ||
62 | */ | ||
40 | void *closure; | 63 | void *closure; |
41 | }; | 64 | }; |
42 | 65 | ||
66 | |||
67 | /** | ||
68 | * FIXME | ||
69 | */ | ||
43 | static struct DiscoveryCallback *head; | 70 | static struct DiscoveryCallback *head; |
44 | 71 | ||
45 | /** | 72 | /** |
46 | * Internal notification about new tracked URI. | 73 | * Internal notification about new tracked URI. |
74 | * | ||
75 | * FIXME | ||
47 | */ | 76 | */ |
48 | static void | 77 | static void |
49 | internal_notify (const GNUNET_HashCode * id, | 78 | internal_notify (const GNUNET_HashCode * id, |
@@ -62,6 +91,8 @@ internal_notify (const GNUNET_HashCode * id, | |||
62 | /** | 91 | /** |
63 | * Register callback to be invoked whenever we discover | 92 | * Register callback to be invoked whenever we discover |
64 | * a new pseudonym. | 93 | * a new pseudonym. |
94 | * | ||
95 | * FIXME | ||
65 | */ | 96 | */ |
66 | int | 97 | int |
67 | GNUNET_PSEUDONYM_discovery_callback_register (const struct | 98 | GNUNET_PSEUDONYM_discovery_callback_register (const struct |
@@ -83,6 +114,8 @@ GNUNET_PSEUDONYM_discovery_callback_register (const struct | |||
83 | 114 | ||
84 | /** | 115 | /** |
85 | * Unregister pseudonym discovery callback. | 116 | * Unregister pseudonym discovery callback. |
117 | * | ||
118 | * FIXME | ||
86 | */ | 119 | */ |
87 | int | 120 | int |
88 | GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator | 121 | GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator |
@@ -113,6 +146,8 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator | |||
113 | /** | 146 | /** |
114 | * Get the filename (or directory name) for the given | 147 | * Get the filename (or directory name) for the given |
115 | * pseudonym identifier and directory prefix. | 148 | * pseudonym identifier and directory prefix. |
149 | * | ||
150 | * FIXME | ||
116 | */ | 151 | */ |
117 | static char * | 152 | static char * |
118 | get_data_filename (const struct GNUNET_CONFIGURATION_Handle | 153 | get_data_filename (const struct GNUNET_CONFIGURATION_Handle |
@@ -130,6 +165,10 @@ get_data_filename (const struct GNUNET_CONFIGURATION_Handle | |||
130 | NULL); | 165 | NULL); |
131 | } | 166 | } |
132 | 167 | ||
168 | |||
169 | /** | ||
170 | * FIXME | ||
171 | */ | ||
133 | static void | 172 | static void |
134 | write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | 173 | write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg, |
135 | const GNUNET_HashCode * nsid, | 174 | const GNUNET_HashCode * nsid, |
@@ -178,6 +217,10 @@ write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
178 | GNUNET_free_non_null (GNUNET_PSEUDONYM_id_to_name (cfg, nsid)); | 217 | GNUNET_free_non_null (GNUNET_PSEUDONYM_id_to_name (cfg, nsid)); |
179 | } | 218 | } |
180 | 219 | ||
220 | |||
221 | /** | ||
222 | * FIXME | ||
223 | */ | ||
181 | static int | 224 | static int |
182 | read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | 225 | read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, |
183 | const GNUNET_HashCode * nsid, | 226 | const GNUNET_HashCode * nsid, |
@@ -270,6 +313,8 @@ read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
270 | /** | 313 | /** |
271 | * Return the unique, human readable name for the given namespace. | 314 | * Return the unique, human readable name for the given namespace. |
272 | * | 315 | * |
316 | * @param cfg configuration | ||
317 | * @param nsid cryptographic ID of the namespace | ||
273 | * @return NULL on failure (should never happen) | 318 | * @return NULL on failure (should never happen) |
274 | */ | 319 | */ |
275 | char * | 320 | char * |
@@ -353,6 +398,9 @@ GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
353 | /** | 398 | /** |
354 | * Get the namespace ID belonging to the given namespace name. | 399 | * Get the namespace ID belonging to the given namespace name. |
355 | * | 400 | * |
401 | * @param cfg configuration to use | ||
402 | * @param ns_uname human-readable name for the namespace | ||
403 | * @param nsid set to namespace ID based on 'ns_uname' | ||
356 | * @return GNUNET_OK on success | 404 | * @return GNUNET_OK on success |
357 | */ | 405 | */ |
358 | int | 406 | int |
@@ -403,14 +451,33 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
403 | 451 | ||
404 | 452 | ||
405 | 453 | ||
406 | 454 | /** | |
455 | * FIXME | ||
456 | */ | ||
407 | struct ListPseudonymClosure | 457 | struct ListPseudonymClosure |
408 | { | 458 | { |
459 | |||
460 | /** | ||
461 | * FIXME | ||
462 | */ | ||
409 | GNUNET_PSEUDONYM_Iterator iterator; | 463 | GNUNET_PSEUDONYM_Iterator iterator; |
464 | |||
465 | /** | ||
466 | * FIXME | ||
467 | */ | ||
410 | void *closure; | 468 | void *closure; |
469 | |||
470 | /** | ||
471 | * FIXME | ||
472 | */ | ||
411 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 473 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
412 | }; | 474 | }; |
413 | 475 | ||
476 | |||
477 | |||
478 | /** | ||
479 | * FIXME | ||
480 | */ | ||
414 | static int | 481 | static int |
415 | list_pseudonym_helper (void *cls, const char *fullname) | 482 | list_pseudonym_helper (void *cls, const char *fullname) |
416 | { | 483 | { |
@@ -439,8 +506,14 @@ list_pseudonym_helper (void *cls, const char *fullname) | |||
439 | return ret; | 506 | return ret; |
440 | } | 507 | } |
441 | 508 | ||
509 | |||
442 | /** | 510 | /** |
443 | * List all available pseudonyms. | 511 | * List all available pseudonyms. |
512 | * | ||
513 | * @param cfg overall configuration | ||
514 | * @param iterator function to call for each pseudonym | ||
515 | * @param closure closure for iterator | ||
516 | * @return number of pseudonyms found | ||
444 | */ | 517 | */ |
445 | int | 518 | int |
446 | GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, | 519 | GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, |
@@ -464,6 +537,7 @@ GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
464 | /** | 537 | /** |
465 | * Change the ranking of a pseudonym. | 538 | * Change the ranking of a pseudonym. |
466 | * | 539 | * |
540 | * @param cfg overall configuration | ||
467 | * @param nsid id of the pseudonym | 541 | * @param nsid id of the pseudonym |
468 | * @param delta by how much should the rating be | 542 | * @param delta by how much should the rating be |
469 | * changed? | 543 | * changed? |
@@ -494,6 +568,10 @@ GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
494 | 568 | ||
495 | /** | 569 | /** |
496 | * Insert metadata into existing MD record (passed as cls). | 570 | * Insert metadata into existing MD record (passed as cls). |
571 | * | ||
572 | * @param cls metadata to add to | ||
573 | * @param type type of entry to insert | ||
574 | * @param data value of entry to insert | ||
497 | */ | 575 | */ |
498 | static int | 576 | static int |
499 | merge_meta_helper (void *cls, | 577 | merge_meta_helper (void *cls, |
@@ -512,7 +590,9 @@ merge_meta_helper (void *cls, | |||
512 | * For all pseudonym advertisements that we discover | 590 | * For all pseudonym advertisements that we discover |
513 | * FSUI should automatically call this function. | 591 | * FSUI should automatically call this function. |
514 | * | 592 | * |
593 | * @param cfg overall configuration | ||
515 | * @param id the pseudonym identifier | 594 | * @param id the pseudonym identifier |
595 | * @param metadata for the pseudonym | ||
516 | */ | 596 | */ |
517 | void | 597 | void |
518 | GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, | 598 | GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, |