X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fnotmuch.h;h=421c19ddbecd8b4251064b0a6c804b8825c92aa7;hb=af3eba97fde00d6bc922df87732b3d28f717f120;hp=9b5046b423c43963882d7af3c3cfb043786033e9;hpb=7e2d0ef10588b37922a6b48ca18005ce51bc0669;p=notmuch diff --git a/lib/notmuch.h b/lib/notmuch.h index 9b5046b4..421c19dd 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -712,6 +712,12 @@ typedef enum { const char * notmuch_query_get_query_string (notmuch_query_t *query); +/** + * Return the notmuch database of this query. See notmuch_query_create. + */ +notmuch_database_t * +notmuch_query_get_database (notmuch_query_t *query); + /** * Exclude values for notmuch_query_set_omit_excluded. The strange * order is to maintain backward compatibility: the old FALSE/TRUE @@ -814,19 +820,24 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag); * 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. - * For better error reporting, use the _st variant. - */ -notmuch_threads_t * -notmuch_query_search_threads (notmuch_query_t *query); - -/** - * Like notmuch_query_search_threads, but with a status return. */ notmuch_status_t notmuch_query_search_threads_st (notmuch_query_t *query, notmuch_threads_t **out); +/** + * Like notmuch_query_search_threads_st, but without a status return. + * + * If a Xapian exception occurs this function will return NULL. + * + * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please + * use notmuch_query_search_threads_st instead. + * + */ +NOTMUCH_DEPRECATED(4,3) +notmuch_threads_t * +notmuch_query_search_threads (notmuch_query_t *query); + /** * Execute a query for messages, returning a notmuch_messages_t object * which can be used to iterate over the results. The returned @@ -865,17 +876,23 @@ notmuch_query_search_threads_st (notmuch_query_t *query, * reason to call it if the query is about to be destroyed). * * If a Xapian exception occurs this function will return NULL. - * For better error reporting, use the _st variant. - */ -notmuch_messages_t * -notmuch_query_search_messages (notmuch_query_t *query); - -/** - * Like notmuch_query_search_messages, but with a status return. + * */ notmuch_status_t notmuch_query_search_messages_st (notmuch_query_t *query, notmuch_messages_t **out); +/** + * Like notmuch_query_search_messages, but without a status return. + * + * If a Xapian exception occurs this function will return NULL. + * + * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please use + * notmuch_query_search_messages_st instead. + * + */ +NOTMUCH_DEPRECATED(4,3) +notmuch_messages_t * +notmuch_query_search_messages (notmuch_query_t *query); /** * Destroy a notmuch_query_t along with any associated resources.