]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-client.h
lib/config: add notmuch_config_key_{get,set}
[notmuch] / notmuch-client.h
index 6cb8182090241b43d11749d3e45aab3fcbc286c8..f59b39657897b3765e1d9d6edc62efe60eddf192 100644 (file)
@@ -253,14 +253,16 @@ 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_COMMAND_CONFIG_OPEN                = 1 << 0,
+    NOTMUCH_COMMAND_CONFIG_CREATE      = 1 << 1,
+    NOTMUCH_COMMAND_DATABASE_EARLY     = 1 << 2,
+    NOTMUCH_COMMAND_DATABASE_WRITE     = 1 << 3,
+} notmuch_command_mode_t;
 
 notmuch_config_t *
 notmuch_config_open (void *ctx,
                     const char *filename,
-                    notmuch_config_mode_t config_mode);
+                    notmuch_command_mode_t config_mode);
 
 void
 notmuch_config_close (notmuch_config_t *config);
@@ -500,6 +502,7 @@ print_status_gzbytes (const char *loc,
 /* the __location__ macro is defined in talloc.h */
 #define ASSERT_GZBYTES(file, bytes) ((print_status_gzbytes (__location__, file, bytes)) ? exit (1) : 0)
 #define GZPRINTF(file, fmt, ...) ASSERT_GZBYTES (file, gzprintf (file, fmt, ##__VA_ARGS__));
+#define GZPUTS(file, str) ASSERT_GZBYTES(file, gzputs (file, str));
 
 #include "command-line-arguments.h"