From d87db8843266caf6b11c1f2f1874328830b23878 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 10 Nov 2010 23:26:31 -0800 Subject: lib: Add new implementation of notmuch_filenames_t The new implementation is simply a talloc-based list of strings. The former support (a list of database terms with a common prefix) is implemented by simply pre-iterating over the terms and populating the list. This should provide no performance disadvantage as callers of thigns like notmuch_directory_get_child_files are very likely to always iterate over all filenames anyway. This new implementation of notmuch_filenames_t is in preparation for adding API to query all of the filenames for a single message. --- lib/notmuch-private.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/notmuch-private.h') diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 4c3d3eb8..6a9d5ddd 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -448,6 +448,18 @@ _notmuch_tags_add_tag (notmuch_tags_t *tags, const char *tag); void _notmuch_tags_prepare_iterator (notmuch_tags_t *tags); +/* filenames.c */ + +notmuch_filenames_t * +_notmuch_filenames_create (const void *ctx); + +void +_notmuch_filenames_add_filename (notmuch_filenames_t *filenames, + const char *filename); + +void +_notmuch_filenames_move_to_first (notmuch_filenames_t *filenames); + #pragma GCC visibility pop NOTMUCH_END_DECLS -- cgit v1.2.3