X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fnotmuch.h;h=7929fe7222ea0bc92d0842a2444d92373a0fc4c9;hp=c4330e4b3e620119b22790ba9a24163aac7bdf4f;hb=3b76adf9e2c026dd03b820f4c6eab50e25444113;hpb=520c9c3131b84e30e0d31084a94c55c265f2042f diff --git a/lib/notmuch.h b/lib/notmuch.h index c4330e4b..7929fe72 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -457,6 +457,12 @@ notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort); notmuch_sort_t notmuch_query_get_sort (notmuch_query_t *query); +/* Add a tag that will be excluded from the query results by default. + * This exclusion will be overridden if this tag appears explicitly in + * the query. */ +void +notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag); + /* Execute a query for threads, returning a notmuch_threads_t object * which can be used to iterate over the results. The returned threads * object is owned by the query and as such, will only be valid until @@ -609,6 +615,20 @@ notmuch_threads_destroy (notmuch_threads_t *threads); unsigned notmuch_query_count_messages (notmuch_query_t *query); +/* Return the number of threads matching a search. + * + * This function performs a search and returns the number of unique thread IDs + * in the matching messages. This is the same as number of threads matching a + * search. + * + * Note that this is a significantly heavier operation than + * notmuch_query_count_messages(). + * + * If an error occurs, this function may return 0. + */ +unsigned +notmuch_query_count_threads (notmuch_query_t *query); + /* Get the thread ID of 'thread'. * * The returned string belongs to 'thread' and as such, should not be