]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch.h
lib: add new status reporting API for notmuch_query_search_{m,t}
[notmuch] / lib / notmuch.h
index 220839b732a94ee95a37e3958d8acffb9d59162e..3e326bfc4da9a1ef844033878566b3e1bc509c28 100644 (file)
@@ -780,10 +780,18 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag);
  * 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);
+
 /**
  * Execute a query for messages, returning a notmuch_messages_t object
  * which can be used to iterate over the results. The returned
@@ -822,10 +830,18 @@ notmuch_query_search_threads (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);
+
 /**
  * Destroy a notmuch_query_t along with any associated resources.
  *