remove mx_{pop,nntp,imap}.[hc]
[apps/madmutt.git] / imap / imap.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-8 Michael R. Elkins <me@mutt.org>
4  * Copyright (C) 2000-3 Brendan Cully <brendan@kublai.com>
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 #ifndef _IMAP_H
12 #define _IMAP_H 1
13
14 #include "account.h"
15 #include "browser.h"
16 #include "mx.h"
17
18 extern mx_t const imap_mx;
19
20 /* -- data structures -- */
21 typedef struct {
22   ACCOUNT account;
23   char *mbox;
24 } IMAP_MBOX;
25
26 /* imap.c */
27 int imap_is_magic(const char*, struct stat*);
28
29 int imap_check_mailbox (CONTEXT * ctx, int *index_hint, int force);
30 int imap_delete_mailbox (CONTEXT * idata, IMAP_MBOX mx);
31 int imap_open_mailbox_append (CONTEXT * ctx);
32 int imap_sync_mailbox (CONTEXT * ctx, int expunge, int *index_hint);
33 int imap_mailbox_check (char *path, int new);
34 int imap_search (CONTEXT* ctx, const pattern_t* pat);
35 int imap_subscribe (char *path, int subscribe);
36 int imap_complete (char *dest, size_t dlen, char *path);
37
38 void imap_allow_reopen (CONTEXT * ctx);
39 void imap_disallow_reopen (CONTEXT * ctx);
40
41 /* browse.c */
42 int imap_browse (char *path, struct browser_state *state);
43 int imap_mailbox_create (const char *folder);
44 int imap_mailbox_rename (const char *mailbox);
45
46 /* message.c */
47 int imap_append_message (CONTEXT * ctx, MESSAGE * msg);
48 int imap_copy_messages (CONTEXT * ctx, HEADER * h, char *dest, int delete);
49 int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno);
50
51 /* socket.c */
52 void imap_logout_all (void);
53
54 /* util.c */
55 int imap_parse_path (const char *path, IMAP_MBOX * mx);
56 void imap_pretty_mailbox (char *path);
57
58 int imap_wait_keepalive (pid_t pid);
59 void imap_keepalive (void);
60
61 #endif