X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fnotmuch.h;h=bd0880f3a232df162e90db66daac6b70e0f47394;hb=087e292d1198b16e35fe705c85a355e48b033cf2;hp=505ad19fe90470c958fa9d59805af929b588af8e;hpb=138fd38afe6c6d44179952dd17c4b07e9223ad37;p=notmuch diff --git a/lib/notmuch.h b/lib/notmuch.h index 505ad19f..bd0880f3 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -361,10 +361,18 @@ typedef enum { NOTMUCH_SORT_UNSORTED } notmuch_sort_t; +/* Return the query_string of this query. See notmuch_query_create. */ +const char * +notmuch_query_get_query_string (notmuch_query_t *query); + /* Specify the sorting desired for this query. */ void notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort); +/* Return the sort specified for this query. See notmuch_query_set_sort. */ +notmuch_sort_t +notmuch_query_get_sort (notmuch_query_t *query); + /* 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 @@ -400,6 +408,8 @@ notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort); * notmuch_threads_t object. (For consistency, we do provide a * notmuch_threads_destroy function, but there's no good reason * to call it if the query is about to be destroyed). + * + * If a Xapian exception occurs this function will return NULL. */ notmuch_threads_t * notmuch_query_search_threads (notmuch_query_t *query);