NeoMutt  2020-08-07-1-gab41a1
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
36 #ifndef MUTT_MAILDIR_LIB_H
37 #define MUTT_MAILDIR_LIB_H
38 
39 #include <stdbool.h>
40 #include <stdio.h>
41 #include "core/lib.h"
42 #include "hcache/lib.h"
43 #include "mx.h"
44 
45 struct ConfigSet;
46 struct Email;
47 
48 extern bool C_MaildirTrash;
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 int maildir_msg_open_new (struct Mailbox *m, struct Message *msg, 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_update_flags (struct Mailbox *m, struct Email *e_old, struct Email *e_new);
61 int mh_check_empty (const char *path);
62 int mh_sync_mailbox_message (struct Mailbox *m, int msgno, struct HeaderCache *hc);
63 
64 void maildir_edata_free(void **ptr);
65 struct MaildirEmailData *maildir_edata_get (struct Email *e);
66 struct MaildirEmailData *maildir_edata_new (void);
67 
68 #endif /* MUTT_MAILDIR_LIB_H */
int maildir_msg_open_new(struct Mailbox *m, struct Message *msg, struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new()
Definition: maildir.c:592
void maildir_edata_free(void **ptr)
Free the private Email data - Implements Email::edata_free()
Definition: shared.c:69
Container for lots of config items.
Definition: set.h:227
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:1475
struct MxOps MxMhOps
MH Mailbox - Implements MxOps.
Definition: mh.c:810
struct Email * maildir_parse_message(enum MailboxType type, const char *fname, bool is_old, struct Email *e)
Actually parse a maildir message.
Definition: shared.c:1362
header cache structure
Definition: lib.h:85
struct MxOps MxMaildirOps
Maildir Mailbox - Implements MxOps.
Definition: maildir.c:711
int mh_sync_mailbox_message(struct Mailbox *m, int msgno, struct HeaderCache *hc)
Save changes to the mailbox.
Definition: shared.c:1382
Maildir-specific Email data -.
Definition: private.h:42
struct MaildirEmailData * maildir_edata_get(struct Email *e)
Get the private data for this Email.
Definition: shared.c:95
void maildir_parse_flags(struct Email *e, const char *path)
Parse Maildir file flags.
Definition: shared.c:1250
Header cache multiplexor.
API for mailboxes.
FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname)
Find a new.
Definition: shared.c:1521
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: shared.c:1318
A local copy of an email.
Definition: mx.h:83
A mailbox.
Definition: mailbox.h:81
int maildir_check_empty(const char *path)
Is the mailbox empty.
Definition: shared.c:1604
void maildir_gen_flags(char *dest, size_t destlen, struct Email *e)
Generate the Maildir flags for an email.
Definition: maildir.c:170
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
char * path
Path of Email (for local Mailboxes)
Definition: email.h:92
bool C_MaildirTrash
Config: Use the maildir &#39;trashed&#39; flag, rather than deleting.
Definition: config.c:38
struct MaildirEmailData * maildir_edata_new(void)
Create a new MaildirEmailData object.
Definition: shared.c:84
The Mailbox API.
Definition: mx.h:105
int msgno
Number displayed to the user.
Definition: email.h:87
int mh_check_empty(const char *path)
Is mailbox empty.
Definition: shared.c:1644