diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-11-19 20:15:45 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-11-19 20:15:45 +0000 |
commit | cd09aed6f9c8663148957c682e04fe3a3bdaf4c7 (patch) | |
tree | 8ea34610deeb5108a436145c102ed5929ec7e2e4 /src/util/pseudonym.c | |
parent | fd42933ad64d75140865169dcaadcec3221c5ead (diff) | |
download | gnunet-cd09aed6f9c8663148957c682e04fe3a3bdaf4c7.tar.gz gnunet-cd09aed6f9c8663148957c682e04fe3a3bdaf4c7.zip |
improving comments
Diffstat (limited to 'src/util/pseudonym.c')
-rw-r--r-- | src/util/pseudonym.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index 85913d178..997311e5d 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c | |||
@@ -32,40 +32,41 @@ | |||
32 | #include "gnunet_bio_lib.h" | 32 | #include "gnunet_bio_lib.h" |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * the directory which stores meta data for pseudonym | 35 | * Name of the directory which stores meta data for pseudonym |
36 | */ | 36 | */ |
37 | #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/metadata" DIR_SEPARATOR_STR | 37 | #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms" DIR_SEPARATOR_STR "metadata" DIR_SEPARATOR_STR |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * the directory which stores name for pseudonym | 40 | * Name of the directory which stores names for pseudonyms |
41 | */ | 41 | */ |
42 | #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/names" DIR_SEPARATOR_STR | 42 | #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms" DIR_SEPARATOR_STR "names" DIR_SEPARATOR_STR |
43 | 43 | ||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * link list struct DiscoveryCallback | 46 | * Registered callbacks for discovery of pseudonyms. |
47 | */ | 47 | */ |
48 | struct DiscoveryCallback | 48 | struct DiscoveryCallback |
49 | { | 49 | { |
50 | /** | 50 | /** |
51 | * the point which points address of the next DiscoveryCallback | 51 | * This is a linked list. |
52 | */ | 52 | */ |
53 | struct DiscoveryCallback *next; | 53 | struct DiscoveryCallback *next; |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Iterator over pseudonym | 56 | * Function to call each time a pseudonym is discovered. |
57 | */ | 57 | */ |
58 | GNUNET_PSEUDONYM_Iterator callback; | 58 | GNUNET_PSEUDONYM_Iterator callback; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * a point to closure | 61 | * Closure for callback. |
62 | */ | 62 | */ |
63 | void *closure; | 63 | void *closure; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | 66 | ||
67 | /** | 67 | /** |
68 | * declare a point to a static stuct DiscoveryCallback | 68 | * Head of the linked list of functions to call when |
69 | * new pseudonyms are added. | ||
69 | */ | 70 | */ |
70 | static struct DiscoveryCallback *head; | 71 | static struct DiscoveryCallback *head; |
71 | 72 | ||
@@ -150,7 +151,8 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator | |||
150 | * pseudonym identifier and directory prefix. | 151 | * pseudonym identifier and directory prefix. |
151 | * @param cfg configuration to use | 152 | * @param cfg configuration to use |
152 | * @param prefix path components to append to the private directory name | 153 | * @param prefix path components to append to the private directory name |
153 | * @param psid hash code of pseudonym | 154 | * @param psid hash code of pseudonym, can be NULL |
155 | * @return filename of the pseudonym (if psid != NULL) or directory with the data (if psid == NULL) | ||
154 | */ | 156 | */ |
155 | static char * | 157 | static char * |
156 | get_data_filename (const struct GNUNET_CONFIGURATION_Handle | 158 | get_data_filename (const struct GNUNET_CONFIGURATION_Handle |
@@ -425,12 +427,12 @@ struct ListPseudonymClosure | |||
425 | GNUNET_PSEUDONYM_Iterator iterator; | 427 | GNUNET_PSEUDONYM_Iterator iterator; |
426 | 428 | ||
427 | /** | 429 | /** |
428 | * point to closure | 430 | * Closure for iterator. |
429 | */ | 431 | */ |
430 | void *closure; | 432 | void *closure; |
431 | 433 | ||
432 | /** | 434 | /** |
433 | * cfg configuration to use | 435 | * Configuration to use. |
434 | */ | 436 | */ |
435 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 437 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
436 | }; | 438 | }; |