From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 02/10] lib: deprecate notmuch_query_search_{threads, messages}
Date: Sun, 7 Jun 2015 17:01:55 +0200 [thread overview]
Message-ID: <1433689323-7520-3-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1433689323-7520-1-git-send-email-david@tethera.net>
The CLI (and bindings) code should really be updated to use the new
status-code-returning versions. Here are some warnings to prod us (and
other clients) to do so.
---
lib/notmuch.h | 41 ++++++++++++++++++++++++++---------------
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/lib/notmuch.h b/lib/notmuch.h
index 6a69f31..c2ada4b 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -809,20 +809,25 @@ 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
* messages object is owned by the query and as such, will only be
@@ -860,17 +865,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.
--
2.1.4
next prev parent reply other threads:[~2015-06-07 15:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-07 15:01 update cli/lib to use new notmuch_query_search_* api David Bremner
2015-06-07 15:01 ` [PATCH 01/10] lib: define NOTMUCH_DEPRECATED macro, document its use David Bremner
2015-06-07 15:01 ` David Bremner [this message]
2015-06-07 15:01 ` [PATCH 03/10] lib: add public accessor for database from query David Bremner
2015-06-07 15:01 ` [PATCH 04/10] lib: remove use of notmuch_query_search_messages from query.cc David Bremner
2015-06-07 15:01 ` [PATCH 05/10] lib: note remaining uses of deprecated message search API David Bremner
2015-06-07 15:01 ` [PATCH 06/10] test: move backup_database and restore_database to library David Bremner
2015-06-07 15:02 ` [PATCH 07/10] lib: constify argument to notmuch_database_status_string David Bremner
2015-09-04 11:28 ` David Bremner
2015-06-07 15:02 ` [PATCH 08/10] cli: add utility routine to print error status David Bremner
2015-06-07 15:02 ` [PATCH 09/10] cli/count: update to use notmuch_query_search_messages_st David Bremner
2015-06-07 15:02 ` [PATCH 10/10] cli: convert remainder of CLI to n_q_search_{messages,threads}_st David Bremner
2015-08-04 7:14 ` update cli/lib to use new notmuch_query_search_* api David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433689323-7520-3-git-send-email-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).