NeoMutt  2020-11-20
Teaching an old dog new tricks
Go to the documentation of this file.
38 #include <stddef.h>
39 #include <stdbool.h>
40 #include "core/lib.h"
41 #include "mx.h"
43 struct ConfigSet;
44 struct Email;
45 struct NmMboxData;
46 struct stat;
48 extern struct MxOps MxNotmuchOps;
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;
56 void nm_init (void);
57 void nm_db_debug_check (struct Mailbox *m);
58 void nm_db_longrun_done (struct Mailbox *m);
59 void nm_db_longrun_init (struct Mailbox *m, bool writable);
60 char *nm_email_get_folder (struct Email *e);
61 char *nm_email_get_folder_rel_db (struct Mailbox *m, struct Email *e);
62 int nm_get_all_tags (struct Mailbox *m, char **tag_list, int *tag_count);
63 bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e);
64 void nm_parse_type_from_query (struct NmMboxData *mdata, char *buf);
65 enum MailboxType nm_path_probe (const char *path, const struct stat *st);
66 void nm_query_window_backward (void);
67 void nm_query_window_forward (void);
68 int nm_read_entire_thread (struct Mailbox *m, struct Email *e);
69 int nm_record_message (struct Mailbox *m, char *path, struct Email *e);
70 int nm_update_filename (struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e);
71 char *nm_url_from_query (struct Mailbox *m, char *buf, size_t buflen);
72 bool config_init_notmuch(struct ConfigSet *cs);
74 #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:2076
void nm_query_window_forward(void)
Function to move the current search window forward in time.
Definition: notmuch.c:1868
Container for lots of config items.
Definition: set.h:228
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:1884
struct MxOps MxNotmuchOps
Notmuch Mailbox - Implements MxOps.
Definition: notmuch.c:2655
int nm_update_filename(struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e)
Change the filename.
Definition: notmuch.c:1957
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:1896
Convenience wrapper for the core headers.
void nm_init(void)
Setup feature commands.
Definition: notmuch.c:88
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:1708
char * nm_email_get_folder(struct Email *e)
Get the folder for a Email.
Definition: notmuch.c:1669
char * C_VfolderFormat
Config: (notmuch) printf-like format string for the browser&#39;s display of virtual folders.
Definition: config.c:50
int nm_get_all_tags(struct Mailbox *m, char **tag_list, int *tag_count)
Fill a list with all notmuch tags.
Definition: notmuch.c:2141
void nm_parse_type_from_query(struct NmMboxData *mdata, char *buf)
Parse a query type out of a query.
Definition: notmuch.c:1776
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:2617
Supported mailbox formats.
Definition: mailbox.h:43
void nm_db_longrun_done(struct Mailbox *m)
Finish a long transaction.
Definition: db.c:304
bool config_init_notmuch(struct ConfigSet *cs)
Register notmuch config variables - Implements module_init_config_t.
Definition: config.c:110
char * nm_email_get_folder_rel_db(struct Mailbox *m, struct Email *e)
Get the folder for a Email from the same level as the notmuch database.
Definition: notmuch.c:1688
bool C_VirtualSpoolfile
Config: (notmuch) Use the first virtual mailbox as a spool file.
Definition: config.c:51
int C_NmQueryWindowDuration
Config: (notmuch) Time duration of the current search window.
Definition: config.c:45
void nm_db_longrun_init(struct Mailbox *m, bool writable)
Start a long transaction.
Definition: db.c:289
The Mailbox API.
Definition: mx.h:104
char * C_NmQueryWindowCurrentSearch
Config: (notmuch) Current search parameters.
Definition: config.c:44
char * nm_url_from_query(struct Mailbox *m, char *buf, size_t buflen)
Turn a query into a URL.
Definition: notmuch.c:1807