X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lib%2Fnotmuch-private.h;h=6063262a1e3a5e0f67b7d35844ba08b730c6a3e5;hb=cf09631a45d276826255d197c1d5c913a29c79f4;hp=5dd4770e96190276c3e5077d977cb200aa6f6b82;hpb=33c8777a967ece2dd4bbda7e83a4e07c195abf51;p=notmuch diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 5dd4770e..6063262a 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -158,8 +158,8 @@ typedef enum _notmuch_private_status { ((private_status >= (notmuch_private_status_t) NOTMUCH_STATUS_LAST_STATUS)\ ? \ _internal_error (format " (%s).\n", \ - ##__VA_ARGS__, \ - __location__), \ + ##__VA_ARGS__, \ + __location__), \ (notmuch_status_t) NOTMUCH_PRIVATE_STATUS_SUCCESS \ : \ (notmuch_status_t) private_status) @@ -279,6 +279,12 @@ _notmuch_message_remove_term (notmuch_message_t *message, const char *prefix_name, const char *value); +notmuch_private_status_t +_notmuch_message_has_term (notmuch_message_t *message, + const char *prefix_name, + const char *value, + notmuch_bool_t *result); + notmuch_private_status_t _notmuch_message_gen_terms (notmuch_message_t *message, const char *prefix_name, @@ -471,11 +477,22 @@ _notmuch_mset_messages_move_to_next (notmuch_messages_t *messages); notmuch_bool_t _notmuch_doc_id_set_contains (notmuch_doc_id_set_t *doc_ids, - unsigned int doc_id); + unsigned int doc_id); void _notmuch_doc_id_set_remove (notmuch_doc_id_set_t *doc_ids, - unsigned int doc_id); + unsigned int doc_id); + +/* querying xapian documents by type (e.g. "mail" or "ghost"): */ +notmuch_status_t +_notmuch_query_search_documents (notmuch_query_t *query, + const char *type, + notmuch_messages_t **out); + +notmuch_status_t +_notmuch_query_count_documents (notmuch_query_t *query, + const char *type, + unsigned *count_out); /* message.cc */