Maildir local mailbox type. More...
Go to the source code of this file.
Functions | |
int | maildir_check_empty (struct Buffer *path) |
Is the mailbox empty. | |
struct Email * | maildir_email_new (void) |
Create a Maildir Email. | |
void | maildir_gen_flags (char *dest, size_t destlen, struct Email *e) |
Generate the Maildir flags for an email. | |
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() -. | |
FILE * | maildir_open_find_message (const char *folder, const char *msg, char **newname) |
Find a message by name. | |
void | maildir_parse_flags (struct Email *e, const char *path) |
Parse Maildir file flags. | |
bool | maildir_parse_message (enum MailboxType type, const char *fname, bool is_old, struct Email *e) |
Actually parse a maildir message. | |
bool | maildir_parse_stream (enum MailboxType type, FILE *fp, const char *fname, bool is_old, struct Email *e) |
Parse a Maildir message. | |
bool | maildir_sync_mailbox_message (struct Mailbox *m, struct Email *e, struct HeaderCache *hc) |
Save changes to the mailbox. | |
bool | maildir_update_flags (struct Mailbox *m, struct Email *e_old, struct Email *e_new) |
Update the mailbox flags. | |
int | mh_check_empty (struct Buffer *path) |
Is mailbox empty. | |
int | mh_sync_mailbox_message (struct Mailbox *m, struct Email *e, struct HeaderCache *hc) |
Save changes to the mailbox. | |
Variables | |
const struct MxOps | MxMaildirOps |
Maildir Mailbox - Implements MxOps -. | |
const struct MxOps | MxMhOps |
MH Mailbox - Implements MxOps -. | |
Maildir local mailbox type.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file lib.h.
int maildir_check_empty | ( | struct Buffer * | path | ) |
Is the mailbox empty.
path | Mailbox to check |
Definition at line 1070 of file maildir.c.
struct Email * maildir_email_new | ( | void | ) |
Create a Maildir Email.
ptr | Newly created Email |
Create a new Email and attach MaildirEmailData.
Definition at line 85 of file maildir.c.
void maildir_gen_flags | ( | char * | dest, |
size_t | destlen, | ||
struct Email * | e | ||
) |
Generate the Maildir flags for an email.
Definition at line 206 of file maildir.c.
FILE * maildir_open_find_message | ( | const char * | folder, |
const char * | msg, | ||
char ** | newname | ||
) |
Find a message by name.
[in] | folder | Maildir path |
[in] | msg | Email path |
[out] | newname | New name, if it has moved |
ptr | File handle |
Definition at line 1023 of file maildir.c.
void maildir_parse_flags | ( | struct Email * | e, |
const char * | path | ||
) |
Parse Maildir file flags.
e | |
path | Path to email file |
Definition at line 840 of file maildir.c.
bool maildir_parse_message | ( | enum MailboxType | type, |
const char * | fname, | ||
bool | is_old, | ||
struct Email * | e | ||
) |
Actually parse a maildir message.
type | Mailbox type, e.g. MUTT_MAILDIR |
fname | Message filename |
is_old | true, if the email is old (read) |
e | Email to populate |
true | Success |
This may also be used to fill out a fake header structure generated by lazy maildir parsing.
Definition at line 954 of file maildir.c.
bool maildir_parse_stream | ( | enum MailboxType | type, |
FILE * | fp, | ||
const char * | fname, | ||
bool | is_old, | ||
struct Email * | e | ||
) |
Parse a Maildir message.
type | Mailbox type, e.g. MUTT_MAILDIR |
fp | Message file handle |
fname | Message filename |
is_old | true, if the email is old (read) |
e |
true | Success |
Actually parse a maildir message. This may also be used to fill out a fake header structure generated by lazy maildir parsing.
Definition at line 912 of file maildir.c.
bool maildir_sync_mailbox_message | ( | struct Mailbox * | m, |
struct Email * | e, | ||
struct HeaderCache * | hc | ||
) |
Save changes to the mailbox.
true | Success |
false | Error |
Definition at line 977 of file maildir.c.
Update the mailbox flags.
true | The flags changed |
false | Otherwise |
Definition at line 120 of file shared.c.
int mh_check_empty | ( | struct Buffer * | path | ) |
Is mailbox empty.
path | Mailbox to check |
Definition at line 166 of file mh.c.
int mh_sync_mailbox_message | ( | struct Mailbox * | m, |
struct Email * | e, | ||
struct HeaderCache * | hc | ||
) |
Save changes to the mailbox.
0 | Success |
-1 | Error |
Definition at line 746 of file mh.c.