char *message_id;
char *thread_id;
char *in_reply_to;
- notmuch_filename_list_t *filename_list;
+ notmuch_string_list_t *filename_list;
char *author;
notmuch_message_file_t *message_file;
notmuch_message_list_t *replies;
INTERNAL_ERROR ("Message filename cannot be NULL.");
if (message->filename_list) {
- _notmuch_filename_list_destroy (message->filename_list);
+ talloc_free (message->filename_list);
message->filename_list = NULL;
}
Xapian::TermIterator i, last;
if (message->filename_list) {
- _notmuch_filename_list_destroy (message->filename_list);
+ talloc_free (message->filename_list);
message->filename_list = NULL;
}
if (message->filename_list)
return;
- message->filename_list = _notmuch_filename_list_create (message);
+ message->filename_list = _notmuch_string_list_create (message);
i = message->doc.termlist_begin ();
i.skip_to (prefix);
if (data == NULL)
INTERNAL_ERROR ("message with no filename");
- _notmuch_filename_list_add_filename (message->filename_list, data);
+ _notmuch_string_list_append (message->filename_list, data);
return;
}
filename = talloc_asprintf (message, "%s/%s",
db_path, basename);
- _notmuch_filename_list_add_filename (message->filename_list,
- filename);
+ _notmuch_string_list_append (message->filename_list, filename);
talloc_free (local);
}
return NULL;
if (message->filename_list->head == NULL ||
- message->filename_list->head->filename == NULL)
+ message->filename_list->head->string == NULL)
{
INTERNAL_ERROR ("message with no filename");
}
- return message->filename_list->head->filename;
+ return message->filename_list->head->string;
}
notmuch_filenames_t *
notmuch_message_get_tags (notmuch_message_t *message)
{
Xapian::TermIterator i, end;
+ notmuch_string_list_t *tags;
i = message->doc.termlist_begin();
end = message->doc.termlist_end();
- return _notmuch_convert_tags(message, i, end);
+ tags = _notmuch_database_get_terms_with_prefix (message, i, end,
+ _find_prefix ("tag"));
+ _notmuch_string_list_sort (tags);
+ return _notmuch_tags_create (message, tags);
}
const char *