2 * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
3 * Copyright (C) 1999-2002 Thomas Roessler <roessler@does-not-exist.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * This header file contains prototypes for internal functions used by the
22 * generic mailbox api. None of these functions should be called directly.
30 /* supported mailbox formats */
45 WHERE short DefaultMagic INITVAL (M_MBOX);
47 #define MMDF_SEP "\001\001\001\001\n"
48 #define MAXLOCKATTEMPT 5
50 int mbox_sync_mailbox (CONTEXT *, int *);
51 int mbox_open_mailbox (CONTEXT *);
52 int mbox_check_mailbox (CONTEXT *, int *);
53 int mbox_close_mailbox (CONTEXT *);
54 int mbox_lock_mailbox (CONTEXT *, int, int);
55 int mbox_parse_mailbox (CONTEXT *);
56 int mmdf_parse_mailbox (CONTEXT *);
57 void mbox_unlock_mailbox (CONTEXT *);
58 int mbox_check_empty (const char *);
60 int mh_read_dir (CONTEXT *, const char *);
61 int mh_sync_mailbox (CONTEXT *, int *);
62 int mh_check_mailbox (CONTEXT *, int *);
63 int mh_buffy (const char *);
64 int mh_check_empty (const char *);
66 int maildir_read_dir (CONTEXT *);
67 int maildir_check_mailbox (CONTEXT *, int *);
68 int maildir_check_empty (const char *);
70 int maildir_commit_message (CONTEXT *, MESSAGE *, HEADER *);
71 int mh_commit_message (CONTEXT *, MESSAGE *, HEADER *);
73 int maildir_open_new_message (MESSAGE *, CONTEXT *, HEADER *);
74 int mh_open_new_message (MESSAGE *, CONTEXT *, HEADER *);
76 FILE *maildir_open_find_message (const char *, const char *);
78 int mbox_strict_cmp_headers (const HEADER *, const HEADER *);
79 int mutt_reopen_mailbox (CONTEXT *, int *);
81 void mx_alloc_memory (CONTEXT *);
82 void mx_update_context (CONTEXT *, int);
83 void mx_update_tables (CONTEXT *, int);
86 int mx_lock_file (const char *, int, int, int, int);
87 int mx_unlock_file (const char *path, int fd, int dot);