NeoMutt  2020-04-24
Teaching an old dog new tricks
Go to the documentation of this file.
37 #include <stddef.h>
38 #include <stdbool.h>
39 #include "core/lib.h"
40 #include "mx.h"
42 struct Email;
43 struct NmMboxData;
44 struct stat;
46 /* These Config Variables are only used in notmuch/mutt_notmuch.c */
47 extern int C_NmDbLimit;
48 extern char *C_NmDefaultUrl;
49 extern char *C_NmExcludeTags;
50 extern int C_NmOpenTimeout;
51 extern char *C_NmQueryType;
53 extern char *C_NmQueryWindowTimebase;
54 extern char *C_NmRecordTags;
55 extern char *C_NmUnreadTag;
56 extern char *C_NmFlaggedTag;
57 extern char *C_NmRepliedTag;
59 extern struct MxOps MxNotmuchOps;
61 void nm_db_debug_check (struct Mailbox *m);
62 void nm_db_longrun_done (struct Mailbox *m);
63 void nm_db_longrun_init (struct Mailbox *m, bool writable);
64 char *nm_email_get_folder (struct Email *e);
65 int nm_get_all_tags (struct Mailbox *m, char **tag_list, int *tag_count);
66 bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e);
67 void nm_parse_type_from_query (struct NmMboxData *mdata, char *buf);
68 enum MailboxType nm_path_probe (const char *path, const struct stat *st);
69 void nm_query_window_backward (void);
70 void nm_query_window_forward (void);
71 int nm_read_entire_thread (struct Mailbox *m, struct Email *e);
72 int nm_record_message (struct Mailbox *m, char *path, struct Email *e);
73 int nm_update_filename (struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e);
74 char *nm_url_from_query (struct Mailbox *m, char *buf, size_t buflen);
76 #endif /* MUTT_NOTMUCH_LIB_H */
int nm_record_message(struct Mailbox *m, char *path, struct Email *e)
Add a message to the Notmuch database.
void nm_query_window_forward(void)
Function to move the current search window forward in time.
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.
struct MxOps MxNotmuchOps
Notmuch Mailbox - Implements MxOps.
char * C_NmFlaggedTag
Config: (notmuch) Tag to use for flagged messages.
Definition: mutt_notmuch.c:86
char * C_NmDefaultUrl
Config: (notmuch) Path to the Notmuch database.
Definition: mutt_notmuch.c:78
char * C_NmRecordTags
Config: (notmuch) Tags to apply to the &#39;record&#39; mailbox (sent mail)
Definition: mutt_notmuch.c:84
char * C_NmUnreadTag
Config: (notmuch) Tag to use for unread messages.
Definition: mutt_notmuch.c:85
int C_NmDbLimit
Config: (notmuch) Default limit for Notmuch queries.
Definition: mutt_notmuch.c:77
int nm_update_filename(struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e)
Change the filename.
API for mailboxes.
Notmuch-specific Mailbox data -.
bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e)
Is a message still visible in the query?
Convenience wrapper for the core headers.
A mailbox.
Definition: mailbox.h:81
char * C_NmQueryWindowTimebase
Config: (notmuch) Units for the time duration.
Definition: mutt_notmuch.c:83
int C_NmQueryWindowCurrentPosition
Config: (notmuch) Position of current search window.
Definition: mutt_notmuch.c:82
int nm_read_entire_thread(struct Mailbox *m, struct Email *e)
Get the entire thread of an email.
char * nm_email_get_folder(struct Email *e)
Get the folder for a Email.
char * C_NmRepliedTag
Config: (notmuch) Tag to use for replied messages.
Definition: mutt_notmuch.c:87
int nm_get_all_tags(struct Mailbox *m, char **tag_list, int *tag_count)
Fill a list with all notmuch tags.
void nm_parse_type_from_query(struct NmMboxData *mdata, char *buf)
Parse a query type out of a query.
void nm_db_debug_check(struct Mailbox *m)
Check if the database is open.
Definition: nm_db.c:322
enum MailboxType nm_path_probe(const char *path, const struct stat *st)
Is this a Notmuch Mailbox? - Implements MxOps::path_probe()
char * C_NmQueryType
Config: (notmuch) Default query type: &#39;threads&#39; or &#39;messages&#39;.
Definition: mutt_notmuch.c:81
Supported mailbox formats.
Definition: mailbox.h:43
void nm_db_longrun_done(struct Mailbox *m)
Finish a long transaction.
Definition: nm_db.c:304
char * C_NmExcludeTags
Config: (notmuch) Exclude messages with these tags.
Definition: mutt_notmuch.c:79
void nm_db_longrun_init(struct Mailbox *m, bool writable)
Start a long transaction.
Definition: nm_db.c:289
int C_NmOpenTimeout
Config: (notmuch) Database timeout.
Definition: mutt_notmuch.c:80
The Mailbox API.
Definition: mx.h:105
char * nm_url_from_query(struct Mailbox *m, char *buf, size_t buflen)
Turn a query into a URL.