diff options
Diffstat (limited to 'src/fs/fs_namespace.c')
-rw-r--r-- | src/fs/fs_namespace.c | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index bc66bb21f..175879707 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c | |||
@@ -285,9 +285,9 @@ struct AdvertisementContext | |||
285 | struct GNUNET_FS_Namespace *ns; | 285 | struct GNUNET_FS_Namespace *ns; |
286 | 286 | ||
287 | /** | 287 | /** |
288 | * Expiration time. | 288 | * Block options. |
289 | */ | 289 | */ |
290 | struct GNUNET_TIME_Absolute expiration; | 290 | struct GNUNET_FS_BlockOptions bo; |
291 | 291 | ||
292 | /** | 292 | /** |
293 | * Number of bytes of plaintext. | 293 | * Number of bytes of plaintext. |
@@ -295,16 +295,6 @@ struct AdvertisementContext | |||
295 | size_t pt_size; | 295 | size_t pt_size; |
296 | 296 | ||
297 | /** | 297 | /** |
298 | * Anonymity level. | ||
299 | */ | ||
300 | uint32_t anonymity; | ||
301 | |||
302 | /** | ||
303 | * Content priority. | ||
304 | */ | ||
305 | uint32_t priority; | ||
306 | |||
307 | /** | ||
308 | * Current keyword offset. | 298 | * Current keyword offset. |
309 | */ | 299 | */ |
310 | unsigned int pos; | 300 | unsigned int pos; |
@@ -410,9 +400,10 @@ advertisement_cont (void *cls, | |||
410 | ac->pt_size + sizeof (struct NBlock), | 400 | ac->pt_size + sizeof (struct NBlock), |
411 | ac->nb, | 401 | ac->nb, |
412 | GNUNET_BLOCK_TYPE_FS_NBLOCK, | 402 | GNUNET_BLOCK_TYPE_FS_NBLOCK, |
413 | ac->priority, | 403 | ac->bo.content_priority, |
414 | ac->anonymity, | 404 | ac->bo.anonymity_level, |
415 | ac->expiration, | 405 | ac->bo.replication_level, |
406 | ac->bo.expiration_time, | ||
416 | -2, 1, | 407 | -2, 1, |
417 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, | 408 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, |
418 | &advertisement_cont, | 409 | &advertisement_cont, |
@@ -427,9 +418,7 @@ advertisement_cont (void *cls, | |||
427 | * @param ksk_uri keywords to use for advertisment | 418 | * @param ksk_uri keywords to use for advertisment |
428 | * @param namespace handle for the namespace that should be advertised | 419 | * @param namespace handle for the namespace that should be advertised |
429 | * @param meta meta-data for the namespace advertisement | 420 | * @param meta meta-data for the namespace advertisement |
430 | * @param anonymity for the namespace advertismement | 421 | * @param bo block options |
431 | * @param priority for the namespace advertisement | ||
432 | * @param expiration for the namespace advertisement | ||
433 | * @param rootEntry name of the root of the namespace | 422 | * @param rootEntry name of the root of the namespace |
434 | * @param cont continuation | 423 | * @param cont continuation |
435 | * @param cont_cls closure for cont | 424 | * @param cont_cls closure for cont |
@@ -439,9 +428,7 @@ GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h, | |||
439 | struct GNUNET_FS_Uri *ksk_uri, | 428 | struct GNUNET_FS_Uri *ksk_uri, |
440 | struct GNUNET_FS_Namespace *namespace, | 429 | struct GNUNET_FS_Namespace *namespace, |
441 | const struct GNUNET_CONTAINER_MetaData *meta, | 430 | const struct GNUNET_CONTAINER_MetaData *meta, |
442 | uint32_t anonymity, | 431 | const struct GNUNET_FS_BlockOptions *bo, |
443 | uint32_t priority, | ||
444 | struct GNUNET_TIME_Absolute expiration, | ||
445 | const char *rootEntry, | 432 | const char *rootEntry, |
446 | GNUNET_FS_PublishContinuation cont, | 433 | GNUNET_FS_PublishContinuation cont, |
447 | void *cont_cls) | 434 | void *cont_cls) |
@@ -512,9 +499,7 @@ GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h, | |||
512 | ctx->pt_size = mdsize + reslen; | 499 | ctx->pt_size = mdsize + reslen; |
513 | ctx->ns = namespace; | 500 | ctx->ns = namespace; |
514 | ctx->ns->rc++; | 501 | ctx->ns->rc++; |
515 | ctx->anonymity = anonymity; | 502 | ctx->bo = *bo; |
516 | ctx->priority = priority; | ||
517 | ctx->expiration = expiration; | ||
518 | advertisement_cont (ctx, GNUNET_OK, NULL); | 503 | advertisement_cont (ctx, GNUNET_OK, NULL); |
519 | } | 504 | } |
520 | 505 | ||
@@ -828,9 +813,7 @@ sb_put_cont (void *cls, | |||
828 | * @param update update identifier to use | 813 | * @param update update identifier to use |
829 | * @param meta metadata to use | 814 | * @param meta metadata to use |
830 | * @param uri URI to refer to in the SBlock | 815 | * @param uri URI to refer to in the SBlock |
831 | * @param expirationTime when the SBlock expires | 816 | * @param bo block options |
832 | * @param anonymity anonymity level for the SBlock | ||
833 | * @param priority priority for the SBlock | ||
834 | * @param options publication options | 817 | * @param options publication options |
835 | * @param cont continuation | 818 | * @param cont continuation |
836 | * @param cont_cls closure for cont | 819 | * @param cont_cls closure for cont |
@@ -842,9 +825,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, | |||
842 | const char *update, | 825 | const char *update, |
843 | const struct GNUNET_CONTAINER_MetaData *meta, | 826 | const struct GNUNET_CONTAINER_MetaData *meta, |
844 | const struct GNUNET_FS_Uri *uri, | 827 | const struct GNUNET_FS_Uri *uri, |
845 | struct GNUNET_TIME_Absolute expirationTime, | 828 | const struct GNUNET_FS_BlockOptions *bo, |
846 | uint32_t anonymity, | ||
847 | uint32_t priority, | ||
848 | enum GNUNET_FS_PublishOptions options, | 829 | enum GNUNET_FS_PublishOptions options, |
849 | GNUNET_FS_PublishContinuation cont, | 830 | GNUNET_FS_PublishContinuation cont, |
850 | void *cont_cls) | 831 | void *cont_cls) |
@@ -975,9 +956,10 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, | |||
975 | size, | 956 | size, |
976 | sb_enc, | 957 | sb_enc, |
977 | GNUNET_BLOCK_TYPE_FS_SBLOCK, | 958 | GNUNET_BLOCK_TYPE_FS_SBLOCK, |
978 | priority, | 959 | bo->content_priority, |
979 | anonymity, | 960 | bo->anonymity_level, |
980 | expirationTime, | 961 | bo->replication_level, |
962 | bo->expiration_time, | ||
981 | -2, 1, | 963 | -2, 1, |
982 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, | 964 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, |
983 | &sb_put_cont, | 965 | &sb_put_cont, |