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_MAILDIR_LIB_H
41 #define MUTT_MAILDIR_LIB_H
42 
43 #include <stdbool.h>
44 #include <stdio.h>
45 #include "core/lib.h"
46 
47 struct Email;
48 struct HeaderCache;
49 
50 extern struct MxOps MxMaildirOps;
51 extern struct MxOps MxMhOps;
52 
53 int maildir_check_empty (const char *path);
54 void maildir_gen_flags (char *dest, size_t destlen, struct Email *e);
55 bool maildir_msg_open_new (struct Mailbox *m, struct Message *msg, const struct Email *e);
56 FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname);
57 void maildir_parse_flags (struct Email *e, const char *path);
58 struct Email *maildir_parse_message (enum MailboxType type, const char *fname, bool is_old, struct Email *e);
59 struct Email *maildir_parse_stream (enum MailboxType type, FILE *fp, const char *fname, bool is_old, struct Email *e);
60 bool maildir_sync_mailbox_message(struct Mailbox *m, int msgno, struct HeaderCache *hc);
61 bool maildir_update_flags (struct Mailbox *m, struct Email *e_old, struct Email *e_new);
62 int mh_check_empty (const char *path);
63 int mh_sync_mailbox_message (struct Mailbox *m, int msgno, struct HeaderCache *hc);
64 
65 #endif /* MUTT_MAILDIR_LIB_H */
The envelope/body of an email.
Definition: email.h:37
bool maildir_update_flags(struct Mailbox *m, struct Email *e_old, struct Email *e_new)
Update the mailbox flags.
Definition: shared.c:122
struct Email * maildir_parse_message(enum MailboxType type, const char *fname, bool is_old, struct Email *e)
Actually parse a maildir message.
Definition: maildir.c:926
struct MxOps MxMhOps
MH Mailbox - Implements MxOps -.
Definition: mh.c:1248
bool maildir_sync_mailbox_message(struct Mailbox *m, int msgno, struct HeaderCache *hc)
Save changes to the mailbox.
Definition: maildir.c:946
header cache structure
Definition: lib.h:84
int mh_sync_mailbox_message(struct Mailbox *m, int msgno, struct HeaderCache *hc)
Save changes to the mailbox.
Definition: mh.c:751
bool maildir_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -Open a new (temporary) message in...
Definition: maildir.c:1488
void maildir_parse_flags(struct Email *e, const char *path)
Parse Maildir file flags.
Definition: maildir.c:811
FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname)
Find a new.
Definition: maildir.c:993
Convenience wrapper for the core headers.
struct Email * maildir_parse_stream(enum MailboxType type, FILE *fp, const char *fname, bool is_old, struct Email *e)
Parse a Maildir message.
Definition: maildir.c:882
A local copy of an email.
Definition: mxapi.h:41
A mailbox.
Definition: mailbox.h:81
int maildir_check_empty(const char *path)
Is the mailbox empty.
Definition: maildir.c:1040
struct MxOps MxMaildirOps
Maildir Mailbox - Implements MxOps -.
Definition: maildir.c:1648
void maildir_gen_flags(char *dest, size_t destlen, struct Email *e)
Generate the Maildir flags for an email.
Definition: maildir.c:186
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
char * path
Path of Email (for local Mailboxes)
Definition: email.h:92
Definition: mxapi.h:103
int msgno
Number displayed to the user.
Definition: email.h:87
int mh_check_empty(const char *path)
Is mailbox empty.
Definition: mh.c:165