23#ifndef MUTT_NOTMUCH_PRIVATE_H
24#define MUTT_NOTMUCH_PRIVATE_H
32#ifdef LIBNOTMUCH_CHECK_VERSION
33#undef LIBNOTMUCH_CHECK_VERSION
36#ifndef HAVE_NOTMUCH_DATABASE_INDEX_FILE
37#define HAVE_NOTMUCH_DATABASE_INDEX_FILE 0
40#ifndef HAVE_NOTMUCH_DATABASE_OPEN_WITH_CONFIG
41#define HAVE_NOTMUCH_DATABASE_OPEN_WITH_CONFIG 0
51#define LIBNOTMUCH_CHECK_VERSION(major, minor, micro) \
52 (major == 5 && minor == 4 && HAVE_NOTMUCH_DATABASE_OPEN_WITH_CONFIG) || \
53 (major == 5 && minor == 1 && HAVE_NOTMUCH_DATABASE_INDEX_FILE) || \
54 ((LIBNOTMUCH_MAJOR_VERSION > (major) || \
55 (LIBNOTMUCH_MAJOR_VERSION == (major) && LIBNOTMUCH_MINOR_VERSION > (minor)) || \
56 (LIBNOTMUCH_MAJOR_VERSION == (major) && \
57 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.
struct timespec mtime
Time Mailbox was last changed.
bool verbose
Display status messages?