Maildir local mailbox type. More...
Go to the source code of this file.
Functions | |
int | maildir_check_empty (const char *path) |
Is the mailbox empty. More... | |
void | maildir_gen_flags (char *dest, size_t destlen, struct Email *e) |
Generate the Maildir flags for an email. More... | |
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() -. More... | |
FILE * | maildir_open_find_message (const char *folder, const char *msg, char **newname) |
Find a message by name. More... | |
void | maildir_parse_flags (struct Email *e, const char *path) |
Parse Maildir file flags. More... | |
struct Email * | maildir_parse_message (enum MailboxType type, const char *fname, bool is_old, struct Email *e) |
Actually parse a maildir message. More... | |
struct Email * | maildir_parse_stream (enum MailboxType type, FILE *fp, const char *fname, bool is_old, struct Email *e) |
Parse a Maildir message. More... | |
bool | maildir_sync_mailbox_message (struct Mailbox *m, int msgno, struct HeaderCache *hc) |
Save changes to the mailbox. More... | |
bool | maildir_update_flags (struct Mailbox *m, struct Email *e_old, struct Email *e_new) |
Update the mailbox flags. More... | |
int | mh_check_empty (const char *path) |
Is mailbox empty. More... | |
int | mh_sync_mailbox_message (struct Mailbox *m, int msgno, struct HeaderCache *hc) |
Save changes to the mailbox. More... | |
Variables | |
struct MxOps | MxMaildirOps |
Maildir Mailbox - Implements MxOps -. More... | |
struct MxOps | MxMhOps |
MH Mailbox - Implements MxOps -. More... | |
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 | ( | const char * | path | ) |
Is the mailbox empty.
path | Mailbox to check |
Definition at line 1043 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 186 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 996 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 810 of file maildir.c.
struct Email * 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 (OPTIONAL) |
ptr | Populated Email |
This may also be used to fill out a fake header structure generated by lazy maildir parsing.
Definition at line 929 of file maildir.c.
struct Email * 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 |
ptr | Populated Email |
NULL | on error |
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 882 of file maildir.c.
bool maildir_sync_mailbox_message | ( | struct Mailbox * | m, |
int | msgno, | ||
struct HeaderCache * | hc | ||
) |
Save changes to the mailbox.
m | Mailbox |
msgno | Index number |
hc | Header cache handle |
true | Success |
false | Error |
Definition at line 949 of file maildir.c.
Update the mailbox flags.
true | The flags changed |
false | Otherwise |
Definition at line 122 of file shared.c.
int mh_check_empty | ( | const char * | path | ) |
Is mailbox empty.
path | Mailbox to check |
Definition at line 166 of file mh.c.
int mh_sync_mailbox_message | ( | struct Mailbox * | m, |
int | msgno, | ||
struct HeaderCache * | hc | ||
) |
Save changes to the mailbox.
m | Mailbox |
msgno | Index number |
hc | Header cache handle |
0 | Success |
-1 | Error |
Definition at line 757 of file mh.c.