1 |
/* GNU Mailutils -- a suite of utilities for electronic mail |
/* GNU Mailutils -- a suite of utilities for electronic mail |
2 |
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. |
Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. |
3 |
|
|
4 |
GNU Mailutils is free software; you can redistribute it and/or modify |
GNU Mailutils is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
13 |
|
|
14 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
15 |
along with GNU Mailutils; if not, write to the Free Software |
along with GNU Mailutils; if not, write to the Free Software |
16 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
17 |
|
|
18 |
#ifndef _IMAP4D_H |
#ifndef _IMAP4D_H |
19 |
#define _IMAP4D_H 1 |
#define _IMAP4D_H 1 |
87 |
#include <mailutils/stream.h> |
#include <mailutils/stream.h> |
88 |
#include <mailutils/mu_auth.h> |
#include <mailutils/mu_auth.h> |
89 |
#include <mailutils/url.h> |
#include <mailutils/url.h> |
90 |
|
#include <mailutils/tls.h> |
91 |
#include <mailutils/nls.h> |
#include <mailutils/nls.h> |
92 |
|
|
93 |
#ifdef __cplusplus |
#ifdef __cplusplus |
127 |
#define ERR_NO_OFILE 2 |
#define ERR_NO_OFILE 2 |
128 |
#define ERR_TIMEOUT 3 |
#define ERR_TIMEOUT 3 |
129 |
#define ERR_SIGNAL 4 |
#define ERR_SIGNAL 4 |
130 |
|
#define ERR_TLS 5 |
131 |
|
|
132 |
/* Namespace numbers */ |
/* Namespace numbers */ |
133 |
#define NS_PRIVATE 0 |
#define NS_PRIVATE 0 |
134 |
#define NS_OTHER 1 |
#define NS_OTHER 1 |
141 |
#define WCARD_RECURSE_MATCH 2 |
#define WCARD_RECURSE_MATCH 2 |
142 |
|
|
143 |
extern struct imap4d_command imap4d_command_table[]; |
extern struct imap4d_command imap4d_command_table[]; |
|
extern FILE *ifile; |
|
|
extern FILE *ofile; |
|
144 |
extern mailbox_t mbox; |
extern mailbox_t mbox; |
145 |
extern char *homedir; |
extern char *homedir; |
146 |
extern char *rootdir; |
extern char *rootdir; |
149 |
extern int is_virtual; |
extern int is_virtual; |
150 |
extern struct daemon_param daemon_param; |
extern struct daemon_param daemon_param; |
151 |
extern struct mu_auth_data *auth_data; |
extern struct mu_auth_data *auth_data; |
152 |
|
|
153 |
|
#ifdef WITH_TLS |
154 |
|
extern int tls_available; |
155 |
|
extern int tls_done; |
156 |
|
#endif /* WITH_TLS */ |
157 |
|
|
158 |
#ifndef HAVE_STRTOK_R |
#ifndef HAVE_STRTOK_R |
159 |
extern char *strtok_r __P((char *s, const char *delim, char **save_ptr)); |
extern char *strtok_r __P((char *s, const char *delim, char **save_ptr)); |
160 |
#endif |
#endif |
186 |
extern int imap4d_select __P ((struct imap4d_command *, char *)); |
extern int imap4d_select __P ((struct imap4d_command *, char *)); |
187 |
extern int imap4d_select0 __P ((struct imap4d_command *, char *, int)); |
extern int imap4d_select0 __P ((struct imap4d_command *, char *, int)); |
188 |
extern int imap4d_select_status __P((void)); |
extern int imap4d_select_status __P((void)); |
189 |
|
#ifdef WITH_TLS |
190 |
|
extern int imap4d_starttls __P ((struct imap4d_command *, char *)); |
191 |
|
#endif /* WITH_TLS */ |
192 |
extern int imap4d_status __P ((struct imap4d_command *, char *)); |
extern int imap4d_status __P ((struct imap4d_command *, char *)); |
193 |
extern int imap4d_store __P ((struct imap4d_command *, char *)); |
extern int imap4d_store __P ((struct imap4d_command *, char *)); |
194 |
extern int imap4d_store0 __P ((char *, int, char *, size_t)); |
extern int imap4d_store0 __P ((char *, int, char *, size_t)); |
228 |
extern int util_finish __P ((struct imap4d_command *, int, const char *, ...)); |
extern int util_finish __P ((struct imap4d_command *, int, const char *, ...)); |
229 |
extern int util_getstate __P ((void)); |
extern int util_getstate __P ((void)); |
230 |
extern int util_do_command __P ((char *)); |
extern int util_do_command __P ((char *)); |
231 |
extern char *imap4d_readline __P ((FILE*)); |
extern char *imap4d_readline __P ((void)); |
232 |
extern char *imap4d_readline_ex __P ((FILE*)); |
extern char *imap4d_readline_ex __P ((void)); |
233 |
extern char *util_getword __P ((char *, char **)); |
extern char *util_getword __P ((char *, char **)); |
234 |
extern char *util_getitem __P ((char *, const char *, char **)); |
extern char *util_getitem __P ((char *, const char *, char **)); |
235 |
extern int util_token __P ((char *, size_t, char **)); |
extern int util_token __P ((char *, size_t, char **)); |
264 |
int util_type_to_attribute __P((int type, char **attr_str)); |
int util_type_to_attribute __P((int type, char **attr_str)); |
265 |
int util_attribute_matches_flag __P((attribute_t attr, const char *item)); |
int util_attribute_matches_flag __P((attribute_t attr, const char *item)); |
266 |
int util_uidvalidity __P((mailbox_t smbox, unsigned long *uidvp)); |
int util_uidvalidity __P((mailbox_t smbox, unsigned long *uidvp)); |
267 |
|
|
268 |
|
void util_setio __P((int, int)); |
269 |
|
void util_flush_output __P((void)); |
270 |
|
FILE *util_is_ofile __P((void)); |
271 |
|
#ifdef WITH_TLS |
272 |
|
int imap4d_init_tls_server __P((void)); |
273 |
|
void imap4d_deinit_tls_server __P((void)); |
274 |
|
#endif /* WITH_TLS */ |
275 |
|
|
276 |
#ifdef __cplusplus |
#ifdef __cplusplus |
277 |
} |
} |
278 |
#endif |
#endif |