Rocco Rutte:
[apps/madmutt.git] / mbox.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
4  * Copyright (C) 1999-2002 Thomas Roessler <roessler@does-not-exist.org>
5  *
6  * This file is part of mutt-ng, see http://www.muttng.org/.
7  * It's licensed under the GNU General Public License,
8  * please see the file GPL in the top level source directory.
9  */
10
11 /*
12  * functions for dealing with mbox/mmdf style mailboxes
13  */
14
15 #ifndef _MBOX_H
16 #define _MBOX_H
17
18 #include <sys/stat.h>
19
20 #include "mx.h"
21
22 #define MMDF_SEP "\001\001\001\001\n"
23
24 int mbox_sync_mailbox (CONTEXT *, int *);
25 int mbox_open_mailbox (CONTEXT *);
26 int mbox_check_mailbox (CONTEXT *, int *);
27 int mbox_close_mailbox (CONTEXT *);
28 int mbox_lock_mailbox (CONTEXT *, int, int);
29 int mbox_parse_mailbox (CONTEXT *);
30 int mmdf_parse_mailbox (CONTEXT *);
31 void mbox_unlock_mailbox (CONTEXT *);
32 int mbox_check_empty (const char *);
33 /* this is still here for compressed folders support... */
34 int mbox_is_magic (const char*, struct stat*);
35
36 int mbox_strict_cmp_headers (const HEADER *, const HEADER *);
37 int mbox_reopen_mailbox (CONTEXT *, int *);
38
39 int mbox_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr);
40
41 mx_t* mbox_reg_mx (void);
42 mx_t* mmdf_reg_mx (void);
43
44 #endif