aboutsummaryrefslogtreecommitdiff
path: root/lib/notmuch.h
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-07-04 12:18:05 -0300
committerDavid Bremner <david@tethera.net>2020-07-18 09:52:27 -0300
commit2d04ed263121d970cd24a8c26ac924425a7ae3d2 (patch)
tree792bf0dc7d1c670d42f58b6d1a9eaa2c54cac502 /lib/notmuch.h
parent13116c5cedf58171d04b5f518b3d6f2fe8aea99d (diff)
lib: catch exceptions in n_m_get_flag, provide n_m_get_flag_st
It's not very nice to return FALSE for an error, so provide notmuch_message_get_flag_st as a migration path. Bump LIBNOTMUCH_MINOR_VERSION because the API is extended.
Diffstat (limited to 'lib/notmuch.h')
-rw-r--r--lib/notmuch.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h
index 693e5076..0491e8f8 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -58,7 +58,7 @@ NOTMUCH_BEGIN_DECLS
* version in Makefile.local.
*/
#define LIBNOTMUCH_MAJOR_VERSION 5
-#define LIBNOTMUCH_MINOR_VERSION 2
+#define LIBNOTMUCH_MINOR_VERSION 3
#define LIBNOTMUCH_MICRO_VERSION 0
@@ -1486,12 +1486,37 @@ typedef enum _notmuch_message_flag {
/**
* Get a value of a flag for the email corresponding to 'message'.
+ *
+ * returns FALSE in case of errors.
+ *
+ * @deprecated Deprecated as of libnotmuch 5.3 (notmuch 0.31). Please
+ * use notmuch_message_get_flag_st instead.
*/
+NOTMUCH_DEPRECATED(5,3)
notmuch_bool_t
notmuch_message_get_flag (notmuch_message_t *message,
notmuch_message_flag_t flag);
/**
+ * Get a value of a flag for the email corresponding to 'message'.
+ *
+ * @param message a message object
+ * @param flag flag to check
+ * @param is_set pointer to boolean to store flag value.
+ *
+ * @retval #NOTMUCH_STATUS_SUCCESS
+ * @retval #NOTMUCH_STATUS_NULL_POINTER is_set is NULL
+ * @retval #NOTMUCH_STATUS_XAPIAN_EXCEPTION Accessing the database
+ * triggered an exception.
+ *
+ * @since libnotmuch 5.3 (notmuch 0.31)
+ */
+notmuch_status_t
+notmuch_message_get_flag_st (notmuch_message_t *message,
+ notmuch_message_flag_t flag,
+ notmuch_bool_t *is_set);
+
+/**
* Set a value of a flag for the email corresponding to 'message'.
*/
void