Rocco Rutte:
[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 /* -- data structures -- */
19 typedef struct {
20   ACCOUNT account;
21   char *mbox;
22 } IMAP_MBOX;
23
24 /* imap.c */
25 int imap_access (const char *, int);
26 int imap_check_mailbox (CONTEXT * ctx, int *index_hint, int force);
27 int imap_delete_mailbox (CONTEXT * idata, IMAP_MBOX mx);
28 int imap_open_mailbox (CONTEXT * ctx);
29 int imap_open_mailbox_append (CONTEXT * ctx);
30 int imap_sync_mailbox (CONTEXT * ctx, int expunge, int *index_hint);
31 void imap_close_mailbox (CONTEXT * ctx);
32 int imap_buffy_check (char *path);
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_expand_path (char *path, size_t len);
56 int imap_parse_path (const char *path, IMAP_MBOX * mx);
57 void imap_pretty_mailbox (char *path);
58
59 int imap_wait_keepalive (pid_t pid);
60 void imap_keepalive (void);
61
62 #endif