aboutsummaryrefslogtreecommitdiff
path: root/lib/notmuch.h
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-12-08 01:23:52 -0500
committerDavid Bremner <david@tethera.net>2017-12-08 08:07:02 -0400
commit798aa789b5d117cf11697bc97dd982bd5a2c2ac8 (patch)
tree0424270f3f7c5c8764ce4301ee2b9c05ffa4531d /lib/notmuch.h
parentb62045a18680720b407173140d79b459e45e6039 (diff)
lib: convert notmuch decryption policy to an enum
Future patches in this series will introduce new policies; this merely readies the way for them. We also convert --try-decrypt to a keyword argument instead of a boolean.
Diffstat (limited to 'lib/notmuch.h')
-rw-r--r--lib/notmuch.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h
index ef463090..47633496 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -2234,6 +2234,16 @@ notmuch_indexopts_t *
notmuch_database_get_default_indexopts (notmuch_database_t *db);
/**
+ * Stating a policy about how to decrypt messages.
+ *
+ * See index.decrypt in notmuch-config(1) for more details.
+ */
+typedef enum {
+ NOTMUCH_DECRYPT_FALSE,
+ NOTMUCH_DECRYPT_TRUE,
+} notmuch_decryption_policy_t;
+
+/**
* Specify whether to decrypt encrypted parts while indexing.
*
* Be aware that the index is likely sufficient to reconstruct the
@@ -2245,7 +2255,7 @@ notmuch_database_get_default_indexopts (notmuch_database_t *db);
*/
notmuch_status_t
notmuch_indexopts_set_decrypt_policy (notmuch_indexopts_t *indexopts,
- notmuch_bool_t decrypt_policy);
+ notmuch_decryption_policy_t decrypt_policy);
/**
* Return whether to decrypt encrypted parts while indexing.
@@ -2253,7 +2263,7 @@ notmuch_indexopts_set_decrypt_policy (notmuch_indexopts_t *indexopts,
*
* @since libnotmuch 5.1 (notmuch 0.26)
*/
-notmuch_bool_t
+notmuch_decryption_policy_t
notmuch_indexopts_get_decrypt_policy (const notmuch_indexopts_t *indexopts);
/**