+typedef enum dump_formats {
+ DUMP_FORMAT_AUTO,
+ DUMP_FORMAT_BATCH_TAG,
+ DUMP_FORMAT_SUP
+} dump_format_t;
+
+typedef enum dump_includes {
+ DUMP_INCLUDE_TAGS = 1,
+ DUMP_INCLUDE_CONFIG = 2,
+ DUMP_INCLUDE_PROPERTIES = 4
+} dump_include_t;
+
+#define DUMP_INCLUDE_DEFAULT (DUMP_INCLUDE_TAGS | DUMP_INCLUDE_CONFIG | DUMP_INCLUDE_PROPERTIES)
+
+#define NOTMUCH_DUMP_VERSION 3
+
+int
+notmuch_database_dump (notmuch_database_t *notmuch,
+ const char *output_file_name,
+ const char *query_str,
+ dump_format_t output_format,
+ dump_include_t include,
+ notmuch_bool_t gzip_output);
+
+/* If status is non-zero (i.e. error) print appropriate
+ messages to stderr.
+*/
+
+notmuch_status_t
+print_status_query (const char *loc,
+ const notmuch_query_t *query,
+ notmuch_status_t status);
+
+notmuch_status_t
+print_status_database (const char *loc,
+ const notmuch_database_t *database,
+ notmuch_status_t status);
+
+int
+status_to_exit (notmuch_status_t status);
+