aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-publish.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r--src/fs/gnunet-publish.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index c62edcd61..59f16210a 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -26,6 +26,7 @@
26 * @author Igor Wronsky 26 * @author Igor Wronsky
27 */ 27 */
28#include "platform.h" 28#include "platform.h"
29
29#include "gnunet_fs_service.h" 30#include "gnunet_fs_service.h"
30#include "gnunet_identity_service.h" 31#include "gnunet_identity_service.h"
31 32
@@ -57,7 +58,7 @@ static struct GNUNET_FS_PublishContext *pc;
57/** 58/**
58 * Meta-data provided via command-line option. 59 * Meta-data provided via command-line option.
59 */ 60 */
60static struct GNUNET_CONTAINER_MetaData *meta; 61static struct GNUNET_FS_MetaData *meta;
61 62
62/** 63/**
63 * Keywords provided via command-line option. 64 * Keywords provided via command-line option.
@@ -175,7 +176,7 @@ do_stop_task (void *cls)
175 } 176 }
176 if (NULL != meta) 177 if (NULL != meta)
177 { 178 {
178 GNUNET_CONTAINER_meta_data_destroy (meta); 179 GNUNET_FS_meta_data_destroy (meta);
179 meta = NULL; 180 meta = NULL;
180 } 181 }
181 if (NULL != uri) 182 if (NULL != uri)
@@ -376,7 +377,7 @@ static int
376publish_inspector (void *cls, 377publish_inspector (void *cls,
377 struct GNUNET_FS_FileInformation *fi, 378 struct GNUNET_FS_FileInformation *fi,
378 uint64_t length, 379 uint64_t length,
379 struct GNUNET_CONTAINER_MetaData *m, 380 struct GNUNET_FS_MetaData *m,
380 struct GNUNET_FS_Uri **uri, 381 struct GNUNET_FS_Uri **uri,
381 struct GNUNET_FS_BlockOptions *bo, 382 struct GNUNET_FS_BlockOptions *bo,
382 int *do_index, 383 int *do_index,
@@ -410,20 +411,20 @@ publish_inspector (void *cls,
410 } 411 }
411 if (NULL != meta) 412 if (NULL != meta)
412 { 413 {
413 GNUNET_CONTAINER_meta_data_merge (m, meta); 414 GNUNET_FS_meta_data_merge (m, meta);
414 GNUNET_CONTAINER_meta_data_destroy (meta); 415 GNUNET_FS_meta_data_destroy (meta);
415 meta = NULL; 416 meta = NULL;
416 } 417 }
417 if (enable_creation_time) 418 if (enable_creation_time)
418 GNUNET_CONTAINER_meta_data_add_publication_date (m); 419 GNUNET_FS_meta_data_add_publication_date (m);
419 if (extract_only) 420 if (extract_only)
420 { 421 {
421 fn = GNUNET_CONTAINER_meta_data_get_by_type ( 422 fn = GNUNET_FS_meta_data_get_by_type (
422 m, 423 m,
423 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME); 424 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME);
424 fs = GNUNET_STRINGS_byte_size_fancy (length); 425 fs = GNUNET_STRINGS_byte_size_fancy (length);
425 fprintf (stdout, _ ("Meta data for file `%s' (%s)\n"), fn, fs); 426 fprintf (stdout, _ ("Meta data for file `%s' (%s)\n"), fn, fs);
426 GNUNET_CONTAINER_meta_data_iterate (m, &meta_printer, NULL); 427 GNUNET_FS_meta_data_iterate (m, &meta_printer, NULL);
427 fprintf (stdout, _ ("Keywords for file `%s' (%s)\n"), fn, fs); 428 fprintf (stdout, _ ("Keywords for file `%s' (%s)\n"), fn, fs);
428 GNUNET_free (fn); 429 GNUNET_free (fn);
429 GNUNET_free (fs); 430 GNUNET_free (fs);
@@ -521,11 +522,11 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item)
521 if (GNUNET_YES == item->is_directory) 522 if (GNUNET_YES == item->is_directory)
522 { 523 {
523 if (NULL == item->meta) 524 if (NULL == item->meta)
524 item->meta = GNUNET_CONTAINER_meta_data_create (); 525 item->meta = GNUNET_FS_meta_data_create ();
525 GNUNET_CONTAINER_meta_data_delete (item->meta, 526 GNUNET_FS_meta_data_delete (item->meta,
526 EXTRACTOR_METATYPE_MIMETYPE, 527 EXTRACTOR_METATYPE_MIMETYPE,
527 NULL, 528 NULL,
528 0); 529 0);
529 GNUNET_FS_meta_data_make_directory (item->meta); 530 GNUNET_FS_meta_data_make_directory (item->meta);
530 if (NULL == item->ksk_uri) 531 if (NULL == item->ksk_uri)
531 { 532 {