(GNUNET_OK != GNUNET_BIO_write_string(fileW, ns_name)) ||
(GNUNET_OK != GNUNET_BIO_write_meta_data(fileW, meta)) )
{
- GNUNET_BIO_write_close(fileW);
+ (void) GNUNET_BIO_write_close(fileW);
GNUNET_break (GNUNET_OK == GNUNET_DISK_directory_remove (fn));
GNUNET_free (fn);
return;
{
if ((meta != NULL) && (name == NULL))
name = GNUNET_CONTAINER_meta_data_get_first_by_types (meta,
- EXTRACTOR_TITLE,
- EXTRACTOR_FILENAME,
- EXTRACTOR_DESCRIPTION,
- EXTRACTOR_SUBJECT,
- EXTRACTOR_PUBLISHER,
- EXTRACTOR_AUTHOR,
- EXTRACTOR_COMMENT,
- EXTRACTOR_SUMMARY,
- EXTRACTOR_OWNER,
+ EXTRACTOR_METATYPE_TITLE,
+ EXTRACTOR_METATYPE_FILENAME,
+ EXTRACTOR_METATYPE_DESCRIPTION,
+ EXTRACTOR_METATYPE_SUBJECT,
+ EXTRACTOR_METATYPE_PUBLISHER,
+ EXTRACTOR_METATYPE_AUTHOR_NAME,
+ EXTRACTOR_METATYPE_COMMENT,
+ EXTRACTOR_METATYPE_SUMMARY,
-1);
if (meta != NULL)
{
return ret;
}
+
/**
* Change the ranking of a pseudonym.
*
return ranking;
}
+
/**
* Insert metadata into existing MD record (passed as cls).
*
* @param cls metadata to add to
+ * @param plugin_name name of the plugin that generated the meta data
* @param type type of entry to insert
- * @param data value of entry to insert
+ * @param format format of data
+ * @param data_mime_type mime type of data
+ * @param data value of the meta data
+ * @param data_len number of bytes in data
+ * @return always 0
*/
static int
-merge_meta_helper (void *cls, EXTRACTOR_KeywordType type, const char *data)
+merge_meta_helper (void *cls,
+ const char *plugin_name,
+ enum EXTRACTOR_MetaType type,
+ enum EXTRACTOR_MetaFormat format,
+ const char *data_mime_type,
+ const char *data,
+ size_t data_len)
{
struct GNUNET_CONTAINER_MetaData *meta = cls;
- GNUNET_CONTAINER_meta_data_insert (meta, type, data);
- return GNUNET_OK;
+
+ (void) GNUNET_CONTAINER_meta_data_insert (meta, plugin_name,
+ type, format,
+ data_mime_type,
+ data, data_len);
+ return 0;
}
if ((0 == STAT (fn, &sbuf)) &&
(GNUNET_OK == read_info (cfg, id, &old, &ranking, &name)))
{
- GNUNET_CONTAINER_meta_data_get_contents (meta, &merge_meta_helper, old);
+ GNUNET_CONTAINER_meta_data_iterate (meta, &merge_meta_helper, old);
write_pseudonym_info (cfg, id, old, ranking, name);
GNUNET_CONTAINER_meta_data_destroy (old);
GNUNET_free_non_null (name);
}
-
-
-
/* end of pseudonym.c */