NeoMutt  2022-04-29-178-g3b62e6
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
47struct Email;
48struct HeaderCache;
49
50extern struct MxOps MxMaildirOps;
51extern struct MxOps MxMhOps;
52
53int maildir_check_empty (const char *path);
54void maildir_gen_flags (char *dest, size_t destlen, struct Email *e);
55bool maildir_msg_open_new (struct Mailbox *m, struct Message *msg, const struct Email *e);
56FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname);
57void maildir_parse_flags (struct Email *e, const char *path);
58struct Email *maildir_parse_message (enum MailboxType type, const char *fname, bool is_old, struct Email *e);
59struct Email *maildir_parse_stream (enum MailboxType type, FILE *fp, const char *fname, bool is_old, struct Email *e);
60bool maildir_sync_mailbox_message(struct Mailbox *m, int msgno, struct HeaderCache *hc);
61bool maildir_update_flags (struct Mailbox *m, struct Email *e_old, struct Email *e_new);
62int mh_check_empty (const char *path);
63int mh_sync_mailbox_message (struct Mailbox *m, int msgno, struct HeaderCache *hc);
64
65#endif /* MUTT_MAILDIR_LIB_H */
Convenience wrapper for the core headers.
struct MxOps MxMaildirOps
Maildir Mailbox - Implements MxOps -.
Definition: maildir.c:1645
struct MxOps MxMhOps
MH Mailbox - Implements MxOps -.
Definition: mh.c:1254
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:1487
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
int mh_check_empty(const char *path)
Is mailbox empty.
Definition: mh.c:166
int mh_sync_mailbox_message(struct Mailbox *m, int msgno, struct HeaderCache *hc)
Save changes to the mailbox.
Definition: mh.c:756
FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname)
Find a new.
Definition: maildir.c:995
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:928
int maildir_check_empty(const char *path)
Is the mailbox empty.
Definition: maildir.c:1042
void maildir_gen_flags(char *dest, size_t destlen, struct Email *e)
Generate the Maildir flags for an email.
Definition: maildir.c:186
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:881
bool maildir_sync_mailbox_message(struct Mailbox *m, int msgno, struct HeaderCache *hc)
Save changes to the mailbox.
Definition: maildir.c:948
void maildir_parse_flags(struct Email *e, const char *path)
Parse Maildir file flags.
Definition: maildir.c:809
The envelope/body of an email.
Definition: email.h:37
int msgno
Number displayed to the user.
Definition: email.h:111
char * path
Path of Email (for local Mailboxes)
Definition: email.h:68
Header cache structure.
Definition: lib.h:87
A mailbox.
Definition: mailbox.h:79
A local copy of an email.
Definition: mxapi.h:43
Definition: mxapi.h:112