summaryrefslogtreecommitdiffstats
path: root/notmuch-client.h
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-10-20 22:25:44 -0400
committerDavid Bremner <david@tethera.net>2017-10-21 19:58:11 -0300
commit5bdb8549f619bbcd9fcd6161749dabbb1710dab9 (patch)
tree8ebb672c31e4e4184570ec323c466856f496fd3c /notmuch-client.h
parentd0da7a0a1c24b937eb754e8f73e5cf7e3857f24a (diff)
cli: set up shared command-line arguments for indexing
We have an indexopts structure for manipulating indexing in different ways, but we also have three command-line invocations that can trigger indexing: new, insert, and reindex. This changeset prepares a common parser that these subcommands can share. Note: if the deprecated crypto.gpg_path configuration option is set to anything other than "gpg", we ignore it (and print a warning on stderr, if built against gmime < 3.0). At the moment, it's just --try-decrypt, but others will likely follow.
Diffstat (limited to 'notmuch-client.h')
-rw-r--r--notmuch-client.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/notmuch-client.h b/notmuch-client.h
index d17cdf01..f7524e59 100644
--- a/notmuch-client.h
+++ b/notmuch-client.h
@@ -495,4 +495,18 @@ void notmuch_exit_if_unmatched_db_uuid (notmuch_database_t *notmuch);
void notmuch_process_shared_options (const char* subcommand_name);
int notmuch_minimal_options (const char* subcommand_name,
int argc, char **argv);
+
+
+/* the state chosen by the user invoking one of the notmuch
+ * subcommands that does indexing */
+struct _notmuch_client_indexing_cli_choices {
+ bool try_decrypt;
+ bool try_decrypt_set;
+ notmuch_indexopts_t * opts;
+};
+extern struct _notmuch_client_indexing_cli_choices indexing_cli_choices;
+extern const notmuch_opt_desc_t notmuch_shared_indexing_options [];
+notmuch_status_t
+notmuch_process_shared_indexing_options (notmuch_database_t *notmuch, notmuch_config_t *config);
+
#endif