diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-04-03 13:47:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-04-03 13:47:56 +0000 |
commit | 8c23a185ee8d3c16c5552668dced851f82986041 (patch) | |
tree | 83f59d2190ffadcdc5643ba36578b2c6766b0e42 /src/fs/gnunet-pseudonym.c | |
parent | 1888cd7da7ae5e2c32faf66d3bef47ac7d225b35 (diff) | |
download | gnunet-8c23a185ee8d3c16c5552668dced851f82986041.tar.gz gnunet-8c23a185ee8d3c16c5552668dced851f82986041.zip |
changing datastore API to support replication level --- not fully implemented --- and adding GNUNET_FS_BlockOptions struct to replace prio/anonymity/expiration+replication args
Diffstat (limited to 'src/fs/gnunet-pseudonym.c')
-rw-r--r-- | src/fs/gnunet-pseudonym.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/fs/gnunet-pseudonym.c b/src/fs/gnunet-pseudonym.c index b7aba8ef4..769b4239d 100644 --- a/src/fs/gnunet-pseudonym.c +++ b/src/fs/gnunet-pseudonym.c | |||
@@ -26,11 +26,6 @@ | |||
26 | #include "gnunet_fs_service.h" | 26 | #include "gnunet_fs_service.h" |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * -a optiton. | ||
30 | */ | ||
31 | static unsigned int anonymity; | ||
32 | |||
33 | /** | ||
34 | * -C option | 29 | * -C option |
35 | */ | 30 | */ |
36 | static char *create_ns; | 31 | static char *create_ns; |
@@ -56,9 +51,9 @@ static int print_local_only; | |||
56 | static struct GNUNET_CONTAINER_MetaData *adv_metadata; | 51 | static struct GNUNET_CONTAINER_MetaData *adv_metadata; |
57 | 52 | ||
58 | /** | 53 | /** |
59 | * -p option. | 54 | * Our block options (-p, -r, -a). |
60 | */ | 55 | */ |
61 | static unsigned int priority = 365; | 56 | static struct GNUNET_FS_BlockOptions bo = { { 2 * 365 * 24 * 60 * 60 * 1000LL }, 1, 365, 1 }; |
62 | 57 | ||
63 | /** | 58 | /** |
64 | * -q option given. | 59 | * -q option given. |
@@ -279,9 +274,7 @@ run (void *cls, | |||
279 | ksk_uri, | 274 | ksk_uri, |
280 | ns, | 275 | ns, |
281 | adv_metadata, | 276 | adv_metadata, |
282 | anonymity, | 277 | &bo, |
283 | priority, | ||
284 | expiration, | ||
285 | root_identifier, | 278 | root_identifier, |
286 | &post_advertising, | 279 | &post_advertising, |
287 | NULL); | 280 | NULL); |
@@ -307,7 +300,8 @@ run (void *cls, | |||
307 | 300 | ||
308 | 301 | ||
309 | /** | 302 | /** |
310 | * The main function to inspect GNUnet directories. | 303 | * The main function to manipulate GNUnet pseudonyms (and publish |
304 | * to namespaces). | ||
311 | * | 305 | * |
312 | * @param argc number of arguments from the command line | 306 | * @param argc number of arguments from the command line |
313 | * @param argv command line arguments | 307 | * @param argv command line arguments |
@@ -319,7 +313,7 @@ main (int argc, char *const *argv) | |||
319 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 313 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { |
320 | {'a', "anonymity", "LEVEL", | 314 | {'a', "anonymity", "LEVEL", |
321 | gettext_noop ("set the desired LEVEL of sender-anonymity"), | 315 | gettext_noop ("set the desired LEVEL of sender-anonymity"), |
322 | 1, &GNUNET_GETOPT_set_uint, &anonymity}, | 316 | 1, &GNUNET_GETOPT_set_uint, &bo.anonymity_level}, |
323 | {'C', "create", "NAME", | 317 | {'C', "create", "NAME", |
324 | gettext_noop | 318 | gettext_noop |
325 | ("create or advertise namespace NAME"), | 319 | ("create or advertise namespace NAME"), |
@@ -341,11 +335,14 @@ main (int argc, char *const *argv) | |||
341 | 0, &GNUNET_GETOPT_set_one, &print_local_only}, | 335 | 0, &GNUNET_GETOPT_set_one, &print_local_only}, |
342 | {'p', "priority", "PRIORITY", | 336 | {'p', "priority", "PRIORITY", |
343 | gettext_noop ("use the given PRIORITY for the advertisments"), | 337 | gettext_noop ("use the given PRIORITY for the advertisments"), |
344 | 1, &GNUNET_GETOPT_set_uint, &priority}, | 338 | 1, &GNUNET_GETOPT_set_uint, &bo.content_priority}, |
345 | {'q', "quiet", NULL, | 339 | {'q', "quiet", NULL, |
346 | gettext_noop ("do not print names of remote namespaces"), | 340 | gettext_noop ("do not print names of remote namespaces"), |
347 | 0, &GNUNET_GETOPT_set_one, &no_remote_printing}, | 341 | 0, &GNUNET_GETOPT_set_one, &no_remote_printing}, |
348 | {'r', "root", "ID", | 342 | {'r', "replication", "LEVEL", |
343 | gettext_noop ("set the desired replication LEVEL"), | ||
344 | 0, &GNUNET_GETOPT_set_uint, &bo.replication_level}, | ||
345 | {'R', "root", "ID", | ||
349 | gettext_noop | 346 | gettext_noop |
350 | ("specify ID of the root of the namespace"), | 347 | ("specify ID of the root of the namespace"), |
351 | 1, &GNUNET_GETOPT_set_string, &root_identifier}, | 348 | 1, &GNUNET_GETOPT_set_string, &root_identifier}, |