Revert "we use glibc, and gconv. Don't need our own transcoding stuff, glibc does"
[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 <lib-mx/mx.h>
15 #include <lib-ui/browser.h>
16
17 #include "account.h"
18
19 extern mx_t const imap_mx;
20
21 /* -- data structures -- */
22 typedef struct {
23   ACCOUNT account;
24   char *mbox;
25 } IMAP_MBOX;
26
27 /* imap.c */
28 int imap_is_magic(const char*, struct stat*);
29
30 int imap_check_mailbox (CONTEXT * ctx, int *index_hint, int force);
31 int imap_delete_mailbox (CONTEXT * idata, IMAP_MBOX mx);
32 int imap_open_mailbox_append (CONTEXT * ctx);
33 int imap_sync_mailbox (CONTEXT * ctx, int expunge, int *index_hint);
34 int imap_mailbox_check (char *path, int new);
35 int imap_search (CONTEXT* ctx, const pattern_t* pat);
36 int imap_subscribe (char *path, int subscribe);
37 int imap_complete (char *dest, size_t dlen, char *path);
38
39 void imap_allow_reopen (CONTEXT * ctx);
40 void imap_disallow_reopen (CONTEXT * ctx);
41
42 /* browse.c */
43 int imap_browse (char *path, struct browser_state *state);
44 int imap_mailbox_create (const char *folder);
45 int imap_mailbox_rename (const char *mailbox);
46
47 /* message.c */
48 int imap_append_message (CONTEXT * ctx, MESSAGE * msg);
49 int imap_copy_messages (CONTEXT * ctx, HEADER * h, char *dest, int delete);
50 int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno);
51
52 /* socket.c */
53 void imap_logout_all (void);
54
55 /* util.c */
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