aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_list_indexed.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-04-03 13:47:56 +0000
committerChristian Grothoff <christian@grothoff.org>2011-04-03 13:47:56 +0000
commit8c23a185ee8d3c16c5552668dced851f82986041 (patch)
tree83f59d2190ffadcdc5643ba36578b2c6766b0e42 /src/fs/test_fs_list_indexed.c
parent1888cd7da7ae5e2c32faf66d3bef47ac7d225b35 (diff)
downloadgnunet-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_list_indexed.c')
-rw-r--r--src/fs/test_fs_list_indexed.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c
index ec3d6fecd..d53732eaf 100644
--- a/src/fs/test_fs_list_indexed.c
+++ b/src/fs/test_fs_list_indexed.c
@@ -239,6 +239,7 @@ run (void *cls,
239 struct GNUNET_FS_FileInformation *fi2; 239 struct GNUNET_FS_FileInformation *fi2;
240 struct GNUNET_FS_FileInformation *fidir; 240 struct GNUNET_FS_FileInformation *fidir;
241 size_t i; 241 size_t i;
242 struct GNUNET_FS_BlockOptions bo;
242 243
243 setup_peer (&p1, "test_fs_list_indexed_data.conf"); 244 setup_peer (&p1, "test_fs_list_indexed_data.conf");
244 fs = GNUNET_FS_start (cfg, 245 fs = GNUNET_FS_start (cfg,
@@ -272,33 +273,33 @@ run (void *cls,
272 273
273 meta = GNUNET_CONTAINER_meta_data_create (); 274 meta = GNUNET_CONTAINER_meta_data_create ();
274 kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords); 275 kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
276 bo.content_priority = 42;
277 bo.anonymity_level = 1;
278 bo.replication_level = 0;
279 bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME);
275 fi1 = GNUNET_FS_file_information_create_from_file (fs, 280 fi1 = GNUNET_FS_file_information_create_from_file (fs,
276 "list_indexed-context1", 281 "list_indexed-context1",
277 fn1, 282 fn1,
278 kuri, 283 kuri,
279 meta, 284 meta,
280 GNUNET_YES, 285 GNUNET_YES,
281 1, 286 &bo);
282 42,
283 GNUNET_TIME_relative_to_absolute (LIFETIME));
284 GNUNET_assert (NULL != fi1); 287 GNUNET_assert (NULL != fi1);
288 bo.anonymity_level = 2;
285 fi2 = GNUNET_FS_file_information_create_from_file (fs, 289 fi2 = GNUNET_FS_file_information_create_from_file (fs,
286 "list_indexed-context2", 290 "list_indexed-context2",
287 fn2, 291 fn2,
288 kuri, 292 kuri,
289 meta, 293 meta,
290 GNUNET_YES, 294 GNUNET_YES,
291 2, 295 &bo);
292 42,
293 GNUNET_TIME_relative_to_absolute (LIFETIME));
294 GNUNET_assert (NULL != fi2); 296 GNUNET_assert (NULL != fi2);
297 bo.anonymity_level = 3;
295 fidir = GNUNET_FS_file_information_create_empty_directory (fs, 298 fidir = GNUNET_FS_file_information_create_empty_directory (fs,
296 "list_indexed-context-dir", 299 "list_indexed-context-dir",
297 kuri, 300 kuri,
298 meta, 301 meta,
299 3, 302 &bo);
300 42,
301 GNUNET_TIME_relative_to_absolute (LIFETIME));
302 GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1)); 303 GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1));
303 GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2)); 304 GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2));
304 GNUNET_FS_uri_destroy (kuri); 305 GNUNET_FS_uri_destroy (kuri);