X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fnotmuch.h;h=3706fed9e940d88262d698a874a8b37c94e0ab86;hp=87756838d0727f77836e419a2e7f9d5384bb1033;hb=87ee9a53e36f395e73e16da12cb268a708147259;hpb=81bd41c7cb59a8d70932e6bdbee6e1e2cde5477f diff --git a/lib/notmuch.h b/lib/notmuch.h index 87756838..3706fed9 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -984,10 +984,26 @@ notmuch_threads_destroy (notmuch_threads_t *threads); * This function performs a search and returns the number of matching * messages. * - * If a Xapian exception occurs, this function may return 0 (after - * printing a message). + * @returns + * + * NOTMUCH_STATUS_SUCCESS: query completed successfully. + * + * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured. The + * value of *count is not defined. */ -unsigned +notmuch_status_t +notmuch_query_count_messages_st (notmuch_query_t *query, unsigned int *count); + +/** + * like notmuch_query_count_messages_st, but without a status return. + * + * May return 0 in the case of errors. + * + * @deprecated Deprecated since libnotmuch 4.3 (notmuch 0.21). Please + * use notmuch_query_count_messages_st instead. + */ +NOTMUCH_DEPRECATED(4,3) +unsigned int notmuch_query_count_messages (notmuch_query_t *query); /** @@ -998,11 +1014,31 @@ notmuch_query_count_messages (notmuch_query_t *query); * search. * * Note that this is a significantly heavier operation than - * notmuch_query_count_messages(). + * notmuch_query_count_messages{_st}(). + * + * @returns * - * If an error occurs, this function may return 0. + * NOTMUCH_STATUS_OUT_OF_MEMORY: Memory allocation failed. The value + * of *count is not defined + + * NOTMUCH_STATUS_SUCCESS: query completed successfully. + * + * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured. The + * value of *count is not defined. */ -unsigned +notmuch_status_t +notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count); + +/** + * like notmuch_query_count_threads, but without a status return. + * + * May return 0 in case of errors. + * + * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please + * use notmuch_query_count_threads_st instead. + */ +NOTMUCH_DEPRECATED(4,3) +unsigned int notmuch_query_count_threads (notmuch_query_t *query); /**