24#ifndef MUTT_NOTMUCH_PRIVATE_H
25#define MUTT_NOTMUCH_PRIVATE_H
33#ifdef LIBNOTMUCH_CHECK_VERSION
34#undef LIBNOTMUCH_CHECK_VERSION
37#ifndef HAVE_NOTMUCH_DATABASE_INDEX_FILE
38#define HAVE_NOTMUCH_DATABASE_INDEX_FILE 0
41#ifndef HAVE_NOTMUCH_DATABASE_OPEN_WITH_CONFIG
42#define HAVE_NOTMUCH_DATABASE_OPEN_WITH_CONFIG 0
52#define LIBNOTMUCH_CHECK_VERSION(major, minor, micro) \
53 (major == 5 && minor == 4 && HAVE_NOTMUCH_DATABASE_OPEN_WITH_CONFIG) || \
54 (major == 5 && minor == 1 && HAVE_NOTMUCH_DATABASE_INDEX_FILE) || \
55 ((LIBNOTMUCH_MAJOR_VERSION > (major) || \
56 (LIBNOTMUCH_MAJOR_VERSION == (major) && LIBNOTMUCH_MINOR_VERSION > (minor)) || \
57 (LIBNOTMUCH_MAJOR_VERSION == (major) && \
58 LIBNOTMUCH_MINOR_VERSION == (minor) && LIBNOTMUCH_MICRO_VERSION >= (micro))))
notmuch_database_t * nm_db_get(struct Mailbox *m, bool writable)
Get the Notmuch database.
int nm_db_trans_begin(struct Mailbox *m)
Start a Notmuch database transaction.
notmuch_database_t * nm_db_do_open(const char *filename, bool writable, bool verbose)
Open a Notmuch database.
const char * nm_db_get_filename(struct Mailbox *m)
Get the filename of the Notmuch database.
int nm_db_get_mtime(struct Mailbox *m, time_t *mtime)
Get the database modification time.
const int NmUrlProtocolLen
Length of NmUrlProtocol string.
int nm_db_release(struct Mailbox *m)
Close the Notmuch database.
bool nm_db_is_longrun(struct Mailbox *m)
Is Notmuch in the middle of a long-running transaction.
void nm_db_free(notmuch_database_t *db)
Decoupled way to close a Notmuch database.
const char NmUrlProtocol[]
Protocol string for Notmuch URLs.
int nm_db_trans_end(struct Mailbox *m)
End a database transaction.
bool verbose
Display status messages?