NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
mutt_notmuch.h
Go to the documentation of this file.
1 
34 #ifndef MUTT_NOTMUCH_MUTT_NOTMUCH_H
35 #define MUTT_NOTMUCH_MUTT_NOTMUCH_H
36 
37 #include <stddef.h>
38 #include <stdbool.h>
39 #include "core/lib.h"
40 #include "mx.h"
41 
42 struct Email;
43 struct NmMboxData;
44 struct stat;
45 
46 /* These Config Variables are only used in notmuch/mutt_notmuch.c */
47 extern int C_NmDbLimit;
48 extern char *C_NmDefaultUri;
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;
58 
59 extern struct MxOps MxNotmuchOps;
60 
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_uri_from_query (struct Mailbox *m, char *buf, size_t buflen);
75 
76 #endif /* MUTT_NOTMUCH_MUTT_NOTMUCH_H */
char * nm_uri_from_query(struct Mailbox *m, char *buf, size_t buflen)
Turn a query into a URI.
The envelope/body of an email.
Definition: email.h:39
int C_NmQueryWindowCurrentPosition
Config: (notmuch) Position of current search window.
Definition: mutt_notmuch.c:79
char * nm_email_get_folder(struct Email *e)
Get the folder for a Email.
char * C_NmRecordTags
Config: (notmuch) Tags to apply to the &#39;record&#39; mailbox (sent mail)
Definition: mutt_notmuch.c:81
char * C_NmQueryWindowTimebase
Config: (notmuch) Units for the time duration.
Definition: mutt_notmuch.c:80
API for mailboxes.
Notmuch-specific Mailbox data -.
struct MxOps MxNotmuchOps
Notmuch Mailbox - Implements MxOps.
char * C_NmDefaultUri
Config: (notmuch) Path to the Notmuch database.
Definition: mutt_notmuch.c:75
Convenience wrapper for the core headers.
void nm_parse_type_from_query(struct NmMboxData *mdata, char *buf)
Parse a query type out of a query.
int nm_read_entire_thread(struct Mailbox *m, struct Email *e)
Get the entire thread of an email.
int nm_get_all_tags(struct Mailbox *m, char **tag_list, int *tag_count)
Fill a list with all notmuch tags.
char * C_NmFlaggedTag
Config: (notmuch) Tag to use for flagged messages.
Definition: mutt_notmuch.c:83
int nm_update_filename(struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e)
Change the filename.
void nm_db_longrun_done(struct Mailbox *m)
Finish a long transaction.
Definition: nm_db.c:300
A mailbox.
Definition: mailbox.h:92
char * C_NmExcludeTags
Config: (notmuch) Exclude messages with these tags.
Definition: mutt_notmuch.c:76
bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e)
Is a message still visible in the query?
void nm_query_window_backward(void)
Function to move the current search window backward in time.
char * C_NmQueryType
Config: (notmuch) Default query type: &#39;threads&#39; or &#39;messages&#39;.
Definition: mutt_notmuch.c:78
int C_NmOpenTimeout
Config: (notmuch) Database timeout.
Definition: mutt_notmuch.c:77
MailboxType
Supported mailbox formats.
Definition: mailbox.h:42
char * C_NmRepliedTag
Config: (notmuch) Tag to use for replied messages.
Definition: mutt_notmuch.c:84
int C_NmDbLimit
Config: (notmuch) Default limit for Notmuch queries.
Definition: mutt_notmuch.c:74
void nm_db_longrun_init(struct Mailbox *m, bool writable)
Start a long transaction.
Definition: nm_db.c:285
char * C_NmUnreadTag
Config: (notmuch) Tag to use for unread messages.
Definition: mutt_notmuch.c:82
enum MailboxType nm_path_probe(const char *path, const struct stat *st)
Is this a Notmuch Mailbox? - Implements MxOps::path_probe()
int nm_record_message(struct Mailbox *m, char *path, struct Email *e)
Add a message to the Notmuch database.
The Mailbox API.
Definition: mx.h:103
void nm_db_debug_check(struct Mailbox *m)
Check if the database is open.
Definition: nm_db.c:318
void nm_query_window_forward(void)
Function to move the current search window forward in time.