NeoMutt  2023-11-03-107-g582dc1
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
37#ifndef MUTT_MAILDIR_LIB_H
38#define MUTT_MAILDIR_LIB_H
39
40#include <stdbool.h>
41#include <stdio.h>
42#include "core/lib.h"
43
44struct Buffer;
45struct Email;
46struct HeaderCache;
47
48extern const struct MxOps MxMaildirOps;
49
50int maildir_check_empty (struct Buffer *path);
51struct Email *maildir_email_new (void);
52void maildir_gen_flags (char *dest, size_t destlen, struct Email *e);
53bool maildir_msg_open_new (struct Mailbox *m, struct Message *msg, const struct Email *e);
54FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname);
55void maildir_parse_flags (struct Email *e, const char *path);
56bool maildir_parse_message (const char *fname, bool is_old, struct Email *e);
57bool maildir_parse_stream (FILE *fp, const char *fname, bool is_old, struct Email *e);
58bool maildir_sync_mailbox_message(struct Mailbox *m, struct Email *e, struct HeaderCache *hc);
59bool maildir_update_flags (struct Mailbox *m, struct Email *e_old, struct Email *e_new);
60
61#endif /* MUTT_MAILDIR_LIB_H */
Convenience wrapper for the core headers.
const struct MxOps MxMaildirOps
Maildir Mailbox - Implements MxOps -.
Definition: maildir.c:1763
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() -.
Definition: maildir.c:1631
int maildir_check_empty(struct Buffer *path)
Is the mailbox empty.
Definition: maildir.c:1138
bool maildir_parse_message(const char *fname, bool is_old, struct Email *e)
Actually parse a maildir message.
Definition: maildir.c:1023
FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname)
Find a message by name.
Definition: maildir.c:1091
bool maildir_update_flags(struct Mailbox *m, struct Email *e_old, struct Email *e_new)
Update the mailbox flags.
Definition: maildir.c:1261
struct Email * maildir_email_new(void)
Create a Maildir Email.
Definition: maildir.c:119
bool maildir_sync_mailbox_message(struct Mailbox *m, struct Email *e, struct HeaderCache *hc)
Save changes to the mailbox.
Definition: maildir.c:1045
bool maildir_parse_stream(FILE *fp, const char *fname, bool is_old, struct Email *e)
Parse a Maildir message.
Definition: maildir.c:986
void maildir_gen_flags(char *dest, size_t destlen, struct Email *e)
Generate the Maildir flags for an email.
Definition: maildir.c:240
void maildir_parse_flags(struct Email *e, const char *path)
Parse Maildir file flags.
Definition: maildir.c:915
String manipulation buffer.
Definition: buffer.h:34
The envelope/body of an email.
Definition: email.h:37
char * path
Path of Email (for local Mailboxes)
Definition: email.h:68
Header Cache.
Definition: lib.h:88
A mailbox.
Definition: mailbox.h:79
A local copy of an email.
Definition: message.h:34
Definition: mxapi.h:91