NeoMutt  2020-08-07-1-gab41a1
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
35 #ifndef MUTT_NOTMUCH_LIB_H
36 #define MUTT_NOTMUCH_LIB_H
37 
38 #include <stddef.h>
39 #include <stdbool.h>
40 #include "core/lib.h"
41 #include "mx.h"
42 
43 struct ConfigSet;
44 struct Email;
45 struct NmMboxData;
46 struct stat;
47 
48 extern struct MxOps MxNotmuchOps;
49 
50 // These Config Variables are used outside of libnotmuch
51 extern char *C_NmQueryWindowCurrentSearch;
52 extern int C_NmQueryWindowDuration;
53 extern char *C_VfolderFormat;
54 extern bool C_VirtualSpoolfile;
55 
56 void nm_db_debug_check (struct Mailbox *m);
57 void nm_db_longrun_done (struct Mailbox *m);
58 void nm_db_longrun_init (struct Mailbox *m, bool writable);
59 char *nm_email_get_folder (struct Email *e);
60 int nm_get_all_tags (struct Mailbox *m, char **tag_list, int *tag_count);
61 bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e);
62 void nm_parse_type_from_query (struct NmMboxData *mdata, char *buf);
63 enum MailboxType nm_path_probe (const char *path, const struct stat *st);
64 void nm_query_window_backward (void);
65 void nm_query_window_forward (void);
66 int nm_read_entire_thread (struct Mailbox *m, struct Email *e);
67 int nm_record_message (struct Mailbox *m, char *path, struct Email *e);
68 int nm_update_filename (struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e);
69 char *nm_url_from_query (struct Mailbox *m, char *buf, size_t buflen);
70 
71 #endif /* MUTT_NOTMUCH_LIB_H */
int nm_record_message(struct Mailbox *m, char *path, struct Email *e)
Add a message to the Notmuch database.
Definition: notmuch.c:2021
void nm_query_window_forward(void)
Function to move the current search window forward in time.
Definition: notmuch.c:1813
Container for lots of config items.
Definition: set.h:227
The envelope/body of an email.
Definition: email.h:37
void nm_query_window_backward(void)
Function to move the current search window backward in time.
Definition: notmuch.c:1829
struct MxOps MxNotmuchOps
Notmuch Mailbox - Implements MxOps.
Definition: notmuch.c:2591
int nm_update_filename(struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e)
Change the filename.
Definition: notmuch.c:1902
API for mailboxes.
Notmuch-specific Mailbox data -.
Definition: private.h:69
bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e)
Is a message still visible in the query?
Definition: notmuch.c:1841
Convenience wrapper for the core headers.
A mailbox.
Definition: mailbox.h:81
int nm_read_entire_thread(struct Mailbox *m, struct Email *e)
Get the entire thread of an email.
Definition: notmuch.c:1653
char * nm_email_get_folder(struct Email *e)
Get the folder for a Email.
Definition: notmuch.c:1637
char * C_VfolderFormat
Config: (notmuch) printf-like format string for the browser&#39;s display of virtual folders.
Definition: config.c:49
int nm_get_all_tags(struct Mailbox *m, char **tag_list, int *tag_count)
Fill a list with all notmuch tags.
Definition: notmuch.c:2086
void nm_parse_type_from_query(struct NmMboxData *mdata, char *buf)
Parse a query type out of a query.
Definition: notmuch.c:1721
void nm_db_debug_check(struct Mailbox *m)
Check if the database is open.
Definition: db.c:322
enum MailboxType nm_path_probe(const char *path, const struct stat *st)
Is this a Notmuch Mailbox? - Implements MxOps::path_probe()
Definition: notmuch.c:2550
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
void nm_db_longrun_done(struct Mailbox *m)
Finish a long transaction.
Definition: db.c:304
bool C_VirtualSpoolfile
Config: (notmuch) Use the first virtual mailbox as a spool file.
Definition: config.c:50
int C_NmQueryWindowDuration
Config: (notmuch) Time duration of the current search window.
Definition: config.c:44
void nm_db_longrun_init(struct Mailbox *m, bool writable)
Start a long transaction.
Definition: db.c:289
The Mailbox API.
Definition: mx.h:105
char * C_NmQueryWindowCurrentSearch
Config: (notmuch) Current search parameters.
Definition: config.c:43
char * nm_url_from_query(struct Mailbox *m, char *buf, size_t buflen)
Turn a query into a URL.
Definition: notmuch.c:1752