notmuch/lib
Jan Janak c3c52e464b notmuch: New function to retrieve all tags from the database.
This patch adds a new function called notmuch_database_get_all_tags
which can be used to obtain a list of all tags from the database
(in other words, the list contains all tags from all messages). The
function produces an alphabetically sorted list.

To add support for the new function, we rip the guts off of
notmuch_message_get_tags and put them in a new generic function
called _notmuch_convert_tags. The generic function takes a
Xapian::TermIterator as argument and uses the iterator to find tags.
This makes the function usable with different Xapian objects.

Function notmuch_message_get_tags is then reimplemented to call the
generic function with message->doc.termlist_begin() as argument.

Similarly, we implement notmuch_message_database_get_all_tags, the
function calls the generic function with db->xapian_db->allterms_begin()
as argument.

Finally, notmuch_database_get_all_tags is exported through
lib/notmuch.h

Signed-off-by: Jan Janak <jan@ryngle.com>
2009-11-26 07:01:52 -08:00
..
database-private.h notmuch: New function to retrieve all tags from the database. 2009-11-26 07:01:52 -08:00
database.cc notmuch: New function to retrieve all tags from the database. 2009-11-26 07:01:52 -08:00
index.cc Typsos 2009-11-18 03:21:36 -08:00
libsha1.c libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00
libsha1.h libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00
Makefile Use $(MAKE) when invoking make from make. 2009-11-12 22:00:51 -08:00
Makefile.local Makefile: Magic silent rules. 2009-11-22 04:29:29 +01:00
message-file.c message_file_get_header: Use break where more clear than continue. 2009-11-17 18:37:45 -08:00
message.cc notmuch: New function to retrieve all tags from the database. 2009-11-26 07:01:52 -08:00
messages.c lib/messages.c: Make message searches stream as well. 2009-11-24 11:33:09 -08:00
notmuch-private.h lib/messages.c: Make message searches stream as well. 2009-11-24 11:33:09 -08:00
notmuch.h notmuch: New function to retrieve all tags from the database. 2009-11-26 07:01:52 -08:00
query.cc lib/messages.c: Make message searches stream as well. 2009-11-24 11:33:09 -08:00
sha1.c Typsos 2009-11-18 03:21:36 -08:00
tags.c notmuch_tags_advance: Make safe against excessive calls. 2009-11-14 23:02:55 -08:00
thread.cc lib/query: Drop the first and max_messages arguments from search_messages. 2009-11-23 20:25:13 -08:00
xutil.c libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00
xutil.h libify: Move library sources down into lib directory. 2009-11-09 16:24:03 -08:00