#include <time.h>
+#pragma GCC visibility push(default)
+
#ifndef FALSE
#define FALSE 0
#endif
* passed to a function expecting an absolute path.
*/
NOTMUCH_STATUS_PATH_ERROR,
+ /**
+ * The requested operation was ignored. Depending on the function,
+ * this may not be an actual error.
+ */
+ NOTMUCH_STATUS_IGNORED,
/**
* One of the arguments violates the preconditions for the
* function, in a way not covered by a more specific argument.
typedef struct _notmuch_directory notmuch_directory_t;
typedef struct _notmuch_filenames notmuch_filenames_t;
typedef struct _notmuch_config_list notmuch_config_list_t;
+typedef struct _notmuch_param notmuch_param_t;
#endif /* __DOXYGEN__ */
/**
/**
* Add a tag that will be excluded from the query results by default.
- * This exclusion will be overridden if this tag appears explicitly in
+ * This exclusion will be ignored if this tag appears explicitly in
* the query.
+ *
+ * @returns
+ *
+ * NOTMUCH_STATUS_SUCCESS: excluded was added successfully.
+ *
+ * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured.
+ * Most likely a problem lazily parsing the query string.
+ *
+ * NOTMUCH_STATUS_IGNORED: tag is explicitly present in the query, so
+ * not excluded.
*/
-void
+notmuch_status_t
notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag);
/**
* NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured. The
* value of *count is not defined.
*
- * @since libnotmuch 4.3 (notmuch 0.21)
+ * @since libnotmuch 5 (notmuch 0.25)
*/
notmuch_status_t
-notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count);
+notmuch_query_count_threads (notmuch_query_t *query, unsigned *count);
/**
- * like notmuch_query_count_threads, but without a status return.
+ * Deprecated alias for notmuch_query_count_threads
*
- * May return 0 in case of errors.
- *
- * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please
+ * @deprecated Deprecated as of libnotmuch 5.0 (notmuch 0.25). Please
* use notmuch_query_count_threads_st instead.
*/
-NOTMUCH_DEPRECATED(4,3)
-unsigned int
-notmuch_query_count_threads (notmuch_query_t *query);
+NOTMUCH_DEPRECATED(5,0)
+notmuch_status_t
+notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count);
/**
* Get the thread ID of 'thread'.
int
notmuch_thread_get_total_messages (notmuch_thread_t *thread);
+/**
+ * Get the total number of files in 'thread'.
+ *
+ * This sums notmuch_message_count_files over all messages in the
+ * thread
+ * @returns Non-negative integer
+ * @since libnotmuch 5.0 (notmuch 0.25)
+ */
+
+int
+notmuch_thread_get_total_files (notmuch_thread_t *thread);
+
/**
* Get a notmuch_messages_t iterator for the top-level messages in
* 'thread' in oldest-first order.
notmuch_messages_t *
notmuch_message_get_replies (notmuch_message_t *message);
+/**
+ * Get the total number of files associated with a message.
+ * @returns Non-negative integer
+ * @since libnotmuch 5.0 (notmuch 0.25)
+ */
+int
+notmuch_message_count_files (notmuch_message_t *message);
+
/**
* Get a filename for the email corresponding to 'message'.
*
notmuch_filenames_t *
notmuch_message_get_filenames (notmuch_message_t *message);
+/**
+ * Re-index the e-mail corresponding to 'message' using the supplied index options
+ *
+ * Returns the status of the re-index operation. (see the return
+ * codes documented in notmuch_database_add_message)
+ *
+ * After reindexing, the user should discard the message object passed
+ * in here by calling notmuch_message_destroy, since it refers to the
+ * original message, not to the reindexed message.
+ */
+notmuch_status_t
+notmuch_message_reindex (notmuch_message_t *message,
+ notmuch_param_t *indexopts);
+
/**
* Message flags.
*/
* its filename ends with the sequence ":2," followed by zero or more
* of the following single-character flags (in ASCII order):
*
- * 'D' iff the message has the "draft" tag
- * 'F' iff the message has the "flagged" tag
- * 'P' iff the message has the "passed" tag
- * 'R' iff the message has the "replied" tag
- * 'S' iff the message does not have the "unread" tag
+ * * flag 'D' iff the message has the "draft" tag
+ * * flag 'F' iff the message has the "flagged" tag
+ * * flag 'P' iff the message has the "passed" tag
+ * * flag 'R' iff the message has the "replied" tag
+ * * flag 'S' iff the message does not have the "unread" tag
*
* Any existing flags unmentioned in the list above will be preserved
* in the renaming.
notmuch_built_with (const char *name);
/* @} */
+#pragma GCC visibility pop
+
NOTMUCH_END_DECLS
#endif