aboutsummaryrefslogtreecommitdiff
path: root/lib/notmuch.h
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-06-04 09:32:34 -0300
committerDavid Bremner <david@tethera.net>2017-08-01 21:17:47 -0400
commit5b93fa6e70c905e3c5f2a8109683db29ccfd5bcf (patch)
tree6a2c7cf743dad6a5f436c9b6796e34ecb3190767 /lib/notmuch.h
parent34d77539925f8e743830a2c8df0a079956ae8be3 (diff)
lib: add notmuch_message_reindex
This new function asks the database to reindex a given message. The parameter `indexopts` is currently ignored, but is intended to provide an extensible API to support e.g. changing the encryption or filtering status (e.g. whether and how certain non-plaintext parts are indexed).
Diffstat (limited to 'lib/notmuch.h')
-rw-r--r--lib/notmuch.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h
index 4c03a893..f78b3473 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -219,6 +219,7 @@ typedef struct _notmuch_tags notmuch_tags_t;
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__ */
/**
@@ -1394,6 +1395,20 @@ 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.
*/
typedef enum _notmuch_message_flag {