aboutsummaryrefslogtreecommitdiff
path: root/src/util/pseudonym.c
diff options
context:
space:
mode:
authorJi Lu <jilu@140774ce-b5e7-0310-ab8b-a85725594a96>2009-11-16 14:55:04 +0000
committerJi Lu <jilu@140774ce-b5e7-0310-ab8b-a85725594a96>2009-11-16 14:55:04 +0000
commit0bc0cf133b95e2664777be53ff5b39ac428c89cc (patch)
tree4d13d73cb392b86537b0cc90f65553a3d4cc4f32 /src/util/pseudonym.c
parent3cf8a24f8a74ce2fc4707e61038431c69a5ace3b (diff)
downloadgnunet-0bc0cf133b95e2664777be53ff5b39ac428c89cc.tar.gz
gnunet-0bc0cf133b95e2664777be53ff5b39ac428c89cc.zip
FIXME
Diffstat (limited to 'src/util/pseudonym.c')
-rw-r--r--src/util/pseudonym.c60
1 files changed, 37 insertions, 23 deletions
diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c
index 55ed3884a..85913d178 100644
--- a/src/util/pseudonym.c
+++ b/src/util/pseudonym.c
@@ -32,48 +32,48 @@
32#include "gnunet_bio_lib.h" 32#include "gnunet_bio_lib.h"
33 33
34/** 34/**
35 * FIXME 35 * 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/metadata" DIR_SEPARATOR_STR
38 38
39/** 39/**
40 * FIXME 40 * the directory which stores name for pseudonym
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/names" DIR_SEPARATOR_STR
43 43
44 44
45/** 45/**
46 * FIXME 46 * link list struct DiscoveryCallback
47 */ 47 */
48struct DiscoveryCallback 48struct DiscoveryCallback
49{ 49{
50
51 /** 50 /**
52 * FIXME 51 * the point which points address of the next DiscoveryCallback
53 */ 52 */
54 struct DiscoveryCallback *next; 53 struct DiscoveryCallback *next;
55 54
56 /** 55 /**
57 * FIXME 56 * Iterator over pseudonym
58 */ 57 */
59 GNUNET_PSEUDONYM_Iterator callback; 58 GNUNET_PSEUDONYM_Iterator callback;
60 59
61 /** 60 /**
62 * FIXME 61 * a point to closure
63 */ 62 */
64 void *closure; 63 void *closure;
65}; 64};
66 65
67 66
68/** 67/**
69 * FIXME 68 * declare a point to a static stuct DiscoveryCallback
70 */ 69 */
71static struct DiscoveryCallback *head; 70static struct DiscoveryCallback *head;
72 71
73/** 72/**
74 * Internal notification about new tracked URI. 73 * Internal notification about new tracked URI.
75 * 74 * @param id a point to the hash code of pseudonym
76 * FIXME 75 * @param md meta data to be written
76 * @param rating rating of pseudonym
77 */ 77 */
78static void 78static void
79internal_notify (const GNUNET_HashCode * id, 79internal_notify (const GNUNET_HashCode * id,
@@ -92,8 +92,9 @@ internal_notify (const GNUNET_HashCode * id,
92/** 92/**
93 * Register callback to be invoked whenever we discover 93 * Register callback to be invoked whenever we discover
94 * a new pseudonym. 94 * a new pseudonym.
95 * 95 * @param cfg configuration to use
96 * FIXME 96 * @param iterator iterator over pseudonym
97 * @param closure point to a closure
97 */ 98 */
98int 99int
99GNUNET_PSEUDONYM_discovery_callback_register (const struct 100GNUNET_PSEUDONYM_discovery_callback_register (const struct
@@ -115,8 +116,8 @@ GNUNET_PSEUDONYM_discovery_callback_register (const struct
115 116
116/** 117/**
117 * Unregister pseudonym discovery callback. 118 * Unregister pseudonym discovery callback.
118 * 119 * @param iterator iterator over pseudonym
119 * FIXME 120 * @param closure point to a closure
120 */ 121 */
121int 122int
122GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator 123GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
@@ -147,8 +148,9 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
147/** 148/**
148 * Get the filename (or directory name) for the given 149 * Get the filename (or directory name) for the given
149 * pseudonym identifier and directory prefix. 150 * pseudonym identifier and directory prefix.
150 * 151 * @param cfg configuration to use
151 * FIXME 152 * @param prefix path components to append to the private directory name
153 * @param psid hash code of pseudonym
152 */ 154 */
153static char * 155static char *
154get_data_filename (const struct GNUNET_CONFIGURATION_Handle 156get_data_filename (const struct GNUNET_CONFIGURATION_Handle
@@ -168,7 +170,12 @@ get_data_filename (const struct GNUNET_CONFIGURATION_Handle
168 170
169 171
170/** 172/**
171 * FIXME 173 * Write the pseudonym infomation into a file
174 * @param cfg configuration to use
175 * @param nsid hash code of a pseudonym
176 * @param meta meta data to be written into a file
177 * @param ranking ranking of a pseudonym
178 * @param ns_name name of a pseudonym
172 */ 179 */
173static void 180static void
174write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg, 181write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -207,7 +214,12 @@ write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
207 214
208 215
209/** 216/**
210 * FIXME 217 * read the pseudonym infomation from a file
218 * @param cfg configuration to use
219 * @param nsid hash code of a pseudonym
220 * @param meta meta data to be read from a file
221 * @param ranking ranking of a pseudonym
222 * @param ns_name name of a pseudonym
211 */ 223 */
212static int 224static int
213read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, 225read_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -402,23 +414,23 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
402 414
403 415
404/** 416/**
405 * FIXME 417 * struct used to list the pseudonym
406 */ 418 */
407struct ListPseudonymClosure 419struct ListPseudonymClosure
408{ 420{
409 421
410 /** 422 /**
411 * FIXME 423 * iterator over pseudonym
412 */ 424 */
413 GNUNET_PSEUDONYM_Iterator iterator; 425 GNUNET_PSEUDONYM_Iterator iterator;
414 426
415 /** 427 /**
416 * FIXME 428 * point to closure
417 */ 429 */
418 void *closure; 430 void *closure;
419 431
420 /** 432 /**
421 * FIXME 433 * cfg configuration to use
422 */ 434 */
423 const struct GNUNET_CONFIGURATION_Handle *cfg; 435 const struct GNUNET_CONFIGURATION_Handle *cfg;
424}; 436};
@@ -426,7 +438,9 @@ struct ListPseudonymClosure
426 438
427 439
428/** 440/**
429 * FIXME 441 * the help function to list all available pseudonyms
442 * @param cls point to a struct ListPseudonymClosure
443 * @param fullname name of pseudonym
430 */ 444 */
431static int 445static int
432list_pseudonym_helper (void *cls, const char *fullname) 446list_pseudonym_helper (void *cls, const char *fullname)