X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-client.h;h=1d3c0829530bff529528fbd3dd29f5d6f43533e5;hp=793f32ecc55a36d5b08d57a7ce99ebc5d4d72e80;hb=e5beec39d6021c7b8c21e6d84050660ad6c69a96;hpb=c970de6dc5378b05feb0b3da40f1fc3408f3d337 diff --git a/notmuch-client.h b/notmuch-client.h index 793f32ec..1d3c0829 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -29,7 +29,7 @@ #include "compat.h" -#include +#include "gmime-extra.h" typedef GMimeCryptoContext notmuch_crypto_context_t; /* This is automatically included only since gmime 2.6.10 */ @@ -72,21 +72,23 @@ typedef struct notmuch_show_format { } notmuch_show_format_t; typedef struct notmuch_crypto { - notmuch_crypto_context_t* gpgctx; - notmuch_crypto_context_t* pkcs7ctx; notmuch_bool_t verify; notmuch_bool_t decrypt; +#if (GMIME_MAJOR_VERSION < 3) + notmuch_crypto_context_t* gpgctx; + notmuch_crypto_context_t* pkcs7ctx; const char *gpgpath; +#endif } notmuch_crypto_t; typedef struct notmuch_show_params { notmuch_bool_t entire_thread; notmuch_bool_t omit_excluded; notmuch_bool_t output_body; - notmuch_bool_t raw; int part; notmuch_crypto_t crypto; notmuch_bool_t include_html; + GMimeStream *out_stream; } notmuch_show_params_t; /* There's no point in continuing when we've detected that we've done @@ -145,7 +147,7 @@ chomp_newline (char *str) * this. New (required) map fields can be added without increasing * this. */ -#define NOTMUCH_FORMAT_CUR 2 +#define NOTMUCH_FORMAT_CUR 4 /* The minimum supported structured output format version. Requests * for format versions below this will return an error. */ #define NOTMUCH_FORMAT_MIN 1 @@ -178,8 +180,10 @@ typedef struct _notmuch_config notmuch_config_t; void notmuch_exit_if_unsupported_format (void); +#if (GMIME_MAJOR_VERSION <3) notmuch_crypto_context_t * notmuch_crypto_get_context (notmuch_crypto_t *crypto, const char *protocol); +#endif int notmuch_crypto_cleanup (notmuch_crypto_t *crypto); @@ -196,6 +200,9 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[]); int notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[]); +int +notmuch_reindex_command (notmuch_config_t *config, int argc, char *argv[]); + int notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[]); @@ -263,10 +270,15 @@ json_quote_str (const void *ctx, const char *str); /* notmuch-config.c */ +typedef enum { + NOTMUCH_CONFIG_OPEN = 1 << 0, + NOTMUCH_CONFIG_CREATE = 1 << 1, +} notmuch_config_mode_t; + notmuch_config_t * notmuch_config_open (void *ctx, const char *filename, - notmuch_bool_t create_new); + notmuch_config_mode_t config_mode); void notmuch_config_close (notmuch_config_t *config); @@ -284,12 +296,14 @@ void notmuch_config_set_database_path (notmuch_config_t *config, const char *database_path); +#if (GMIME_MAJOR_VERSION < 3) const char * notmuch_config_get_crypto_gpg_path (notmuch_config_t *config); void notmuch_config_set_crypto_gpg_path (notmuch_config_t *config, const char *gpg_path); +#endif const char * notmuch_config_get_user_name (notmuch_config_t *config); @@ -465,7 +479,7 @@ typedef enum dump_includes { #define DUMP_INCLUDE_DEFAULT (DUMP_INCLUDE_TAGS | DUMP_INCLUDE_CONFIG | DUMP_INCLUDE_PROPERTIES) -#define NOTMUCH_DUMP_VERSION 2 +#define NOTMUCH_DUMP_VERSION 3 int notmuch_database_dump (notmuch_database_t *notmuch, @@ -489,6 +503,9 @@ print_status_database (const char *loc, const notmuch_database_t *database, notmuch_status_t status); +int +status_to_exit (notmuch_status_t status); + #include "command-line-arguments.h" extern char *notmuch_requested_db_uuid;