aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-12-08 01:23:51 -0500
committerDavid Bremner <david@tethera.net>2017-12-08 08:06:03 -0400
commitb62045a18680720b407173140d79b459e45e6039 (patch)
treef17e98231e9dd5b704603b1f8cd87aba260dfcb2 /lib
parentd3964e81ac98825a025a6120c488ebd73de2a281 (diff)
indexopts: change _try_decrypt to _decrypt_policy
This terminology makes it clearer what's going on at the API layer, and paves the way for future changesets that offer more nuanced decryption policy.
Diffstat (limited to 'lib')
-rw-r--r--lib/index.cc2
-rw-r--r--lib/indexopts.c10
-rw-r--r--lib/notmuch.h8
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/index.cc b/lib/index.cc
index 6eb60f30..ff14e408 100644
--- a/lib/index.cc
+++ b/lib/index.cc
@@ -525,7 +525,7 @@ _index_encrypted_mime_part (notmuch_message_t *message,
notmuch_database_t * notmuch = NULL;
GMimeObject *clear = NULL;
- if (!indexopts || !notmuch_indexopts_get_try_decrypt (indexopts))
+ if (!indexopts || !notmuch_indexopts_get_decrypt_policy (indexopts))
return;
notmuch = _notmuch_message_database (message);
diff --git a/lib/indexopts.c b/lib/indexopts.c
index ca6bf6c9..0f65b97c 100644
--- a/lib/indexopts.c
+++ b/lib/indexopts.c
@@ -36,24 +36,24 @@ notmuch_database_get_default_indexopts (notmuch_database_t *db)
((!(strcasecmp(decrypt, "true"))) ||
(!(strcasecmp(decrypt, "yes"))) ||
(!(strcasecmp(decrypt, "1")))))
- notmuch_indexopts_set_try_decrypt (ret, true);
+ notmuch_indexopts_set_decrypt_policy (ret, true);
free (decrypt);
return ret;
}
notmuch_status_t
-notmuch_indexopts_set_try_decrypt (notmuch_indexopts_t *indexopts,
- notmuch_bool_t try_decrypt)
+notmuch_indexopts_set_decrypt_policy (notmuch_indexopts_t *indexopts,
+ notmuch_bool_t decrypt_policy)
{
if (!indexopts)
return NOTMUCH_STATUS_NULL_POINTER;
- indexopts->crypto.decrypt = try_decrypt;
+ indexopts->crypto.decrypt = decrypt_policy;
return NOTMUCH_STATUS_SUCCESS;
}
notmuch_bool_t
-notmuch_indexopts_get_try_decrypt (const notmuch_indexopts_t *indexopts)
+notmuch_indexopts_get_decrypt_policy (const notmuch_indexopts_t *indexopts)
{
if (!indexopts)
return false;
diff --git a/lib/notmuch.h b/lib/notmuch.h
index 2c5dcab5..ef463090 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -2244,17 +2244,17 @@ notmuch_database_get_default_indexopts (notmuch_database_t *db);
* @since libnotmuch 5.1 (notmuch 0.26)
*/
notmuch_status_t
-notmuch_indexopts_set_try_decrypt (notmuch_indexopts_t *indexopts,
- notmuch_bool_t try_decrypt);
+notmuch_indexopts_set_decrypt_policy (notmuch_indexopts_t *indexopts,
+ notmuch_bool_t decrypt_policy);
/**
* Return whether to decrypt encrypted parts while indexing.
- * see notmuch_indexopts_set_try_decrypt.
+ * see notmuch_indexopts_set_decrypt_policy.
*
* @since libnotmuch 5.1 (notmuch 0.26)
*/
notmuch_bool_t
-notmuch_indexopts_get_try_decrypt (const notmuch_indexopts_t *indexopts);
+notmuch_indexopts_get_decrypt_policy (const notmuch_indexopts_t *indexopts);
/**
* Destroy a notmuch_indexopts_t object.