NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
40 #ifndef MUTT_NOTMUCH_LIB_H
41 #define MUTT_NOTMUCH_LIB_H
42 
43 #include <stddef.h>
44 #include <stdbool.h>
45 #include "core/lib.h"
46 
47 struct Email;
48 struct stat;
49 
50 extern struct MxOps MxNotmuchOps;
51 
52 void nm_init (void);
53 void nm_db_debug_check (struct Mailbox *m);
54 void nm_db_longrun_done (struct Mailbox *m);
55 void nm_db_longrun_init (struct Mailbox *m, bool writable);
56 char *nm_email_get_folder (struct Email *e);
57 char *nm_email_get_folder_rel_db (struct Mailbox *m, struct Email *e);
58 int nm_get_all_tags (struct Mailbox *m, char **tag_list, int *tag_count);
59 bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e);
60 enum MailboxType nm_path_probe (const char *path, const struct stat *st);
61 bool nm_query_window_available (void);
62 void nm_query_window_backward (void);
63 void nm_query_window_forward (void);
64 void nm_query_window_reset (void);
65 int nm_read_entire_thread (struct Mailbox *m, struct Email *e);
66 int nm_record_message (struct Mailbox *m, char *path, struct Email *e);
67 int nm_update_filename (struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e);
68 char *nm_url_from_query (struct Mailbox *m, char *buf, size_t buflen);
69 
70 #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:1894
void nm_query_window_forward(void)
Function to move the current search window forward in time.
Definition: notmuch.c:1640
The envelope/body of an email.
Definition: email.h:37
bool nm_query_window_available(void)
Are windowed queries enabled for use?
Definition: notmuch.c:1621
void nm_query_window_backward(void)
Function to move the current search window backward in time.
Definition: notmuch.c:1661
int nm_update_filename(struct Mailbox *m, const char *old_file, const char *new_file, struct Email *e)
Change the filename.
Definition: notmuch.c:1747
bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e)
Is a message still visible in the query?
Definition: notmuch.c:1685
Convenience wrapper for the core headers.
void nm_init(void)
Setup feature commands.
Definition: notmuch.c:99
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:1497
char * nm_email_get_folder(struct Email *e)
Get the folder for a Email.
Definition: notmuch.c:1458
int nm_get_all_tags(struct Mailbox *m, char **tag_list, int *tag_count)
Fill a list with all notmuch tags.
Definition: notmuch.c:1977
void nm_db_debug_check(struct Mailbox *m)
Check if the database is open.
Definition: db.c:347
struct MxOps MxNotmuchOps
Notmuch Mailbox - Implements MxOps -.
Definition: notmuch.c:2496
enum MailboxType nm_path_probe(const char *path, const struct stat *st)
Is this a Notmuch Mailbox? - Implements MxOps::path_probe() -.
Definition: notmuch.c:2458
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
void nm_db_longrun_done(struct Mailbox *m)
Finish a long transaction.
Definition: db.c:329
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:1477
void nm_query_window_reset(void)
Resets the vfolder window position to the present.
Definition: notmuch.c:1673
void nm_db_longrun_init(struct Mailbox *m, bool writable)
Start a long transaction.
Definition: db.c:314
Definition: mxapi.h:103
char * nm_url_from_query(struct Mailbox *m, char *buf, size_t buflen)
Turn a query into a URL.
Definition: notmuch.c:1564