X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fdatabase-private.h;h=c9bc712b46c1a0b51c8d93af9189111604b7dd7f;hb=763445beaec906440fbdd497755718ef860b88e4;hp=763590079f129c9bf84f363ead8c2cb150fcbdce;hpb=b90d852a2fb377d5b7db4ab2ac389964f8c0c3b3;p=notmuch diff --git a/lib/database-private.h b/lib/database-private.h index 76359007..c9bc712b 100644 --- a/lib/database-private.h +++ b/lib/database-private.h @@ -32,6 +32,8 @@ #include "notmuch-private.h" +#define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0])) + #ifdef SILENCE_XAPIAN_DEPRECATION_WARNINGS #define XAPIAN_DEPRECATED(D) D #endif @@ -189,12 +191,12 @@ struct _notmuch_database { char *path; - notmuch_database_mode_t mode; int atomic_nesting; /* true if changes have been made in this atomic section */ bool atomic_dirty; Xapian::Database *xapian_db; - + Xapian::WritableDatabase *writable_xapian_db; + bool open; /* Bit mask of features used by this database. This is a * bitwise-OR of NOTMUCH_FEATURE_* values (above). */ enum _notmuch_features features; @@ -263,4 +265,23 @@ _notmuch_database_find_doc_ids (notmuch_database_t *notmuch, const char *value, Xapian::PostingIterator *begin, Xapian::PostingIterator *end); + +#define NOTMUCH_DATABASE_VERSION 3 + +/* features.cc */ + +_notmuch_features +_notmuch_database_parse_features (const void *ctx, const char *features, unsigned int version, + char mode, char **incompat_out); + +char * +_notmuch_database_print_features (const void *ctx, unsigned int features); + +/* prefix.cc */ +notmuch_status_t +_notmuch_database_setup_standard_query_fields (notmuch_database_t *notmuch); + +notmuch_status_t +_notmuch_database_setup_user_query_fields (notmuch_database_t *notmuch); + #endif