mutt stable branch with some hacks
1/*
2 * Copyright (C) 1996-1998 Michael R. Elkins <me@mutt.org>
3 * Copyright (C) 2000-2007 Brendan Cully <brendan@kublai.com>
4 *
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.
9 *
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.
14 *
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.
18 */
19
20#ifndef _IMAP_H
21#define _IMAP_H 1
22
23#include "account.h"
24#include "browser.h"
25#include "mailbox.h"
26
27/* -- data structures -- */
28typedef struct
29{
30 ACCOUNT account;
31 char* mbox;
32} IMAP_MBOX;
33
34/* imap.c */
35int imap_access (const char*, int);
36int imap_check_mailbox (CONTEXT *ctx, int *index_hint, int force);
37int imap_delete_mailbox (CONTEXT* idata, IMAP_MBOX mx);
38int imap_sync_mailbox (CONTEXT *ctx, int expunge, int *index_hint);
39int imap_close_mailbox (CONTEXT *ctx);
40int imap_buffy_check (int force, int check_stats);
41int imap_status (char *path, int queue);
42int imap_search (CONTEXT* ctx, const pattern_t* pat);
43int imap_subscribe (char *path, int subscribe);
44int imap_complete (char* dest, size_t dlen, char* path);
45int imap_fast_trash (CONTEXT* ctx, char* dest);
46
47void imap_allow_reopen (CONTEXT *ctx);
48void imap_disallow_reopen (CONTEXT *ctx);
49
50extern struct mx_ops mx_imap_ops;
51
52/* browse.c */
53int imap_browse (char* path, struct browser_state* state);
54int imap_mailbox_create (const char* folder);
55int imap_mailbox_rename (const char* mailbox);
56
57/* message.c */
58int imap_append_message (CONTEXT* ctx, MESSAGE* msg);
59int imap_copy_messages (CONTEXT* ctx, HEADER* h, char* dest, int delete);
60
61/* socket.c */
62void imap_logout_all (void);
63
64/* util.c */
65int imap_expand_path (char* path, size_t len);
66int imap_parse_path (const char* path, IMAP_MBOX* mx);
67void imap_pretty_mailbox (char* path);
68
69int imap_wait_keepalive (pid_t pid);
70void imap_keepalive (void);
71
72int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2);
73
74#endif