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/test_fs_publish_persistence.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/test_fs_publish_persistence.c')
-rw-r--r-- | src/fs/test_fs_publish_persistence.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c index 4a84bf9dc..1610c25c1 100644 --- a/src/fs/test_fs_publish_persistence.c +++ b/src/fs/test_fs_publish_persistence.c | |||
@@ -282,6 +282,7 @@ run (void *cls, | |||
282 | struct GNUNET_FS_FileInformation *fi2; | 282 | struct GNUNET_FS_FileInformation *fi2; |
283 | struct GNUNET_FS_FileInformation *fidir; | 283 | struct GNUNET_FS_FileInformation *fidir; |
284 | size_t i; | 284 | size_t i; |
285 | struct GNUNET_FS_BlockOptions bo; | ||
285 | 286 | ||
286 | cfg = c; | 287 | cfg = c; |
287 | setup_peer (&p1, "test_fs_publish_data.conf"); | 288 | setup_peer (&p1, "test_fs_publish_data.conf"); |
@@ -316,33 +317,33 @@ run (void *cls, | |||
316 | 317 | ||
317 | meta = GNUNET_CONTAINER_meta_data_create (); | 318 | meta = GNUNET_CONTAINER_meta_data_create (); |
318 | kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords); | 319 | kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords); |
320 | bo.content_priority = 42; | ||
321 | bo.anonymity_level = 1; | ||
322 | bo.replication_level = 0; | ||
323 | bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); | ||
319 | fi1 = GNUNET_FS_file_information_create_from_file (fs, | 324 | fi1 = GNUNET_FS_file_information_create_from_file (fs, |
320 | "publish-context1", | 325 | "publish-context1", |
321 | fn1, | 326 | fn1, |
322 | kuri, | 327 | kuri, |
323 | meta, | 328 | meta, |
324 | GNUNET_YES, | 329 | GNUNET_YES, |
325 | 1, | 330 | &bo); |
326 | 42, | ||
327 | GNUNET_TIME_relative_to_absolute (LIFETIME)); | ||
328 | GNUNET_assert (NULL != fi1); | 331 | GNUNET_assert (NULL != fi1); |
332 | bo.anonymity_level = 2; | ||
329 | fi2 = GNUNET_FS_file_information_create_from_file (fs, | 333 | fi2 = GNUNET_FS_file_information_create_from_file (fs, |
330 | "publish-context2", | 334 | "publish-context2", |
331 | fn2, | 335 | fn2, |
332 | kuri, | 336 | kuri, |
333 | meta, | 337 | meta, |
334 | GNUNET_YES, | 338 | GNUNET_YES, |
335 | 2, | 339 | &bo); |
336 | 42, | ||
337 | GNUNET_TIME_relative_to_absolute (LIFETIME)); | ||
338 | GNUNET_assert (NULL != fi2); | 340 | GNUNET_assert (NULL != fi2); |
341 | bo.anonymity_level = 3; | ||
339 | fidir = GNUNET_FS_file_information_create_empty_directory (fs, | 342 | fidir = GNUNET_FS_file_information_create_empty_directory (fs, |
340 | "publish-context-dir", | 343 | "publish-context-dir", |
341 | kuri, | 344 | kuri, |
342 | meta, | 345 | meta, |
343 | 3, | 346 | &bo); |
344 | 42, | ||
345 | GNUNET_TIME_relative_to_absolute (LIFETIME)); | ||
346 | GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1)); | 347 | GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1)); |
347 | GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2)); | 348 | GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2)); |
348 | GNUNET_FS_uri_destroy (kuri); | 349 | GNUNET_FS_uri_destroy (kuri); |