annotate src/c-client/mail.h @ 1:28a55bc1110c imapext-2007-1

[mq]: imapext
author yuuji@gentei.org
date Mon, 14 Sep 2009 19:23:11 +0900
parents ada5e610ab86
children 2366b362676d 20c025a380ab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1 /* ========================================================================
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
2 * Copyright 1988-2008 University of Washington
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
3 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
4 * Licensed under the Apache License, Version 2.0 (the "License");
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
5 * you may not use this file except in compliance with the License.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
6 * You may obtain a copy of the License at
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
7 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
8 * http://www.apache.org/licenses/LICENSE-2.0
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
9 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
10 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
11 * ========================================================================
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
12 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
13
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
14 /*
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
15 * Program: Mailbox Access routines
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
16 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
17 * Author: Mark Crispin
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
18 * UW Technology
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
19 * University of Washington
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
20 * Seattle, WA 98195
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
21 * Internet: MRC@Washington.EDU
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
22 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
23 * Date: 22 November 1989
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
24 * Last Edited: 16 December 2008
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
25 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
26
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
27 /* The Version */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
28
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
29 #define CCLIENTVERSION "2007e"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
30
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
31 /* Build parameters */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
32
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
33 #define CACHEINCREMENT 250 /* cache growth increments */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
34 #define MAILTMPLEN 1024 /* size of a temporary buffer */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
35 #define SENDBUFLEN 16385 /* size of temporary sending buffer, also
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
36 * used for SMTP commands and NETMBX generation
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
37 * buffer so shouldn't be made smaller than
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
38 * MAILTMPLEN. Note that there's a guard byte,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
39 * so this is actually len+1. */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
40 #define MAXAUTHENTICATORS 8 /* maximum number of SASL authenticators */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
41 /* maximum number of messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
42 #define MAXMESSAGES (unsigned long) 1000000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
43 #define MAXLOGINTRIALS 3 /* maximum number of client login attempts */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
44 #define MAXWILDCARDS 10 /* maximum wildcards allowed in LIST/LSUB */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
45
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
46
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
47 /* These can't be changed without changing code */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
48
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
49 #define NUSERFLAGS 30 /* maximum number of user flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
50 #define MAXUSERFLAG 50 /* maximum length of a user flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
51 #define BASEYEAR 1970 /* the year time began on Unix DON'T CHANGE */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
52 /* default for unqualified addresses */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
53 #define BADHOST ".MISSING-HOST-NAME."
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
54 /* default for syntax errors in addresses */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
55 #define ERRHOST ".SYNTAX-ERROR."
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
56
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
57
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
58 /* Coddle certain compilers' 6-character symbol limitation */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
59
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
60 #ifdef __COMPILER_KCC__
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
61 #include "shortsym.h"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
62 #endif
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
63
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
64
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
65 /* Function status code */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
66
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
67 #define NIL 0 /* convenient name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
68 #define T 1 /* opposite of NIL */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
69 #define LONGT (long) 1 /* long T to pacify some compilers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
70 #define VOIDT (void *) "" /* void T ditto */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
71
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
72 /* Global and Driver Parameters */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
73
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
74 /* 0xx: driver and authenticator flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
75 #define ENABLE_DRIVER (long) 1
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
76 #define DISABLE_DRIVER (long) 2
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
77 #define ENABLE_AUTHENTICATOR (long) 3
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
78 #define DISABLE_AUTHENTICATOR (long) 4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
79 #define ENABLE_DEBUG (long) 5
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
80 #define DISABLE_DEBUG (long) 6
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
81 #define HIDE_AUTHENTICATOR (long) 7
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
82 #define UNHIDE_AUTHENTICATOR (long) 8
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
83 /* 1xx: c-client globals */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
84 #define GET_DRIVERS (long) 101
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
85 #define SET_DRIVERS (long) 102
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
86 #define GET_GETS (long) 103
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
87 #define SET_GETS (long) 104
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
88 #define GET_CACHE (long) 105
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
89 #define SET_CACHE (long) 106
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
90 #define GET_SMTPVERBOSE (long) 107
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
91 #define SET_SMTPVERBOSE (long) 108
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
92 #define GET_RFC822OUTPUT (long) 109
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
93 #define SET_RFC822OUTPUT (long) 110
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
94 #define GET_READPROGRESS (long) 111
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
95 #define SET_READPROGRESS (long) 112
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
96 #define GET_THREADERS (long) 113
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
97 #define SET_THREADERS (long) 114
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
98 #define GET_NAMESPACE (long) 115
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
99 #define SET_NAMESPACE (long) 116
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
100 #define GET_MAILPROXYCOPY (long) 117
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
101 #define SET_MAILPROXYCOPY (long) 118
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
102 #define GET_SERVICENAME (long) 119
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
103 #define SET_SERVICENAME (long) 120
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
104 #define GET_DRIVER (long) 121
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
105 #define SET_DRIVER (long) 122
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
106 #define GET_EXPUNGEATPING (long) 123
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
107 #define SET_EXPUNGEATPING (long) 124
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
108 #define GET_PARSEPHRASE (long) 125
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
109 #define SET_PARSEPHRASE (long) 126
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
110 #define GET_SSLDRIVER (long) 127
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
111 #define SET_SSLDRIVER (long) 128
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
112 #define GET_TRYSSLFIRST (long) 129
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
113 #define SET_TRYSSLFIRST (long) 130
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
114 #define GET_BLOCKNOTIFY (long) 131
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
115 #define SET_BLOCKNOTIFY (long) 132
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
116 #define GET_SORTRESULTS (long) 133
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
117 #define SET_SORTRESULTS (long) 134
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
118 #define GET_THREADRESULTS (long) 135
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
119 #define SET_THREADRESULTS (long) 136
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
120 #define GET_PARSELINE (long) 137
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
121 #define SET_PARSELINE (long) 138
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
122 #define GET_NEWSRCQUERY (long) 139
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
123 #define SET_NEWSRCQUERY (long) 140
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
124 #define GET_FREEENVELOPESPAREP (long) 141
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
125 #define SET_FREEENVELOPESPAREP (long) 142
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
126 #define GET_FREEELTSPAREP (long) 143
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
127 #define SET_FREEELTSPAREP (long) 144
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
128 #define GET_SSLSTART (long) 145
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
129 #define SET_SSLSTART (long) 146
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
130 #define GET_DEBUGSENSITIVE (long) 147
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
131 #define SET_DEBUGSENSITIVE (long) 148
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
132 #define GET_TCPDEBUG (long) 149
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
133 #define SET_TCPDEBUG (long) 150
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
134 #define GET_FREESTREAMSPAREP (long) 151
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
135 #define SET_FREESTREAMSPAREP (long) 152
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
136 #define GET_FREEBODYSPAREP (long) 153
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
137 #define SET_FREEBODYSPAREP (long) 154
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
138 #define GET_COPYUID (long) 155
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
139 #define SET_COPYUID (long) 156
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
140 #define GET_APPENDUID (long) 157
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
141 #define SET_APPENDUID (long) 158
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
142 #define GET_RFC822OUTPUTFULL (long) 159
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
143 #define SET_RFC822OUTPUTFULL (long) 160
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
144 #define GET_BLOCKENVINIT (long) 161
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
145 #define SET_BLOCKENVINIT (long) 162
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
146
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
147 /* 2xx: environment */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
148 #define GET_USERNAME (long) 201
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
149 #define SET_USERNAME (long) 202
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
150 #define GET_HOMEDIR (long) 203
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
151 #define SET_HOMEDIR (long) 204
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
152 #define GET_LOCALHOST (long) 205
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
153 #define SET_LOCALHOST (long) 206
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
154 #define GET_SYSINBOX (long) 207
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
155 #define SET_SYSINBOX (long) 208
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
156 #define GET_USERPROMPT (long) 209
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
157 #define SET_USERPROMPT (long) 210
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
158 #define GET_DISABLEPLAINTEXT (long) 211
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
159 #define SET_DISABLEPLAINTEXT (long) 212
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
160 #define GET_CHROOTSERVER (long) 213
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
161 #define SET_CHROOTSERVER (long) 214
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
162 #define GET_ADVERTISETHEWORLD (long) 215
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
163 #define SET_ADVERTISETHEWORLD (long) 216
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
164 #define GET_DISABLEAUTOSHAREDNS (long) 217
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
165 #define SET_DISABLEAUTOSHAREDNS (long) 218
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
166 #define GET_MAILSUBDIR 219
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
167 #define SET_MAILSUBDIR 220
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
168 #define GET_DISABLE822TZTEXT 221
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
169 #define SET_DISABLE822TZTEXT 222
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
170 #define GET_LIMITEDADVERTISE (long) 223
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
171 #define SET_LIMITEDADVERTISE (long) 224
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
172 #define GET_LOGOUTHOOK (long) 225
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
173 #define SET_LOGOUTHOOK (long) 226
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
174 #define GET_LOGOUTDATA (long) 227
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
175 #define SET_LOGOUTDATA (long) 228
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
176 #define GET_EXTERNALAUTHID (long) 229
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
177 #define SET_EXTERNALAUTHID (long) 230
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
178 #define GET_SSLCAPATH (long) 231
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
179 #define SET_SSLCAPATH (long) 232
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
180
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
181 /* 3xx: TCP/IP */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
182 #define GET_OPENTIMEOUT (long) 300
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
183 #define SET_OPENTIMEOUT (long) 301
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
184 #define GET_READTIMEOUT (long) 302
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
185 #define SET_READTIMEOUT (long) 303
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
186 #define GET_WRITETIMEOUT (long) 304
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
187 #define SET_WRITETIMEOUT (long) 305
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
188 #define GET_CLOSETIMEOUT (long) 306
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
189 #define SET_CLOSETIMEOUT (long) 307
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
190 #define GET_TIMEOUT (long) 308
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
191 #define SET_TIMEOUT (long) 309
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
192 #define GET_RSHTIMEOUT (long) 310
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
193 #define SET_RSHTIMEOUT (long) 311
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
194 #define GET_ALLOWREVERSEDNS (long) 312
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
195 #define SET_ALLOWREVERSEDNS (long) 313
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
196 #define GET_RSHCOMMAND (long) 314
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
197 #define SET_RSHCOMMAND (long) 315
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
198 #define GET_RSHPATH (long) 316
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
199 #define SET_RSHPATH (long) 317
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
200 #define GET_SSHTIMEOUT (long) 318
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
201 #define SET_SSHTIMEOUT (long) 319
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
202 #define GET_SSHCOMMAND (long) 320
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
203 #define SET_SSHCOMMAND (long) 321
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
204 #define GET_SSHPATH (long) 322
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
205 #define SET_SSHPATH (long) 323
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
206 #define GET_SSLCERTIFICATEQUERY (long) 324
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
207 #define SET_SSLCERTIFICATEQUERY (long) 325
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
208 #define GET_SSLFAILURE (long) 326
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
209 #define SET_SSLFAILURE (long) 327
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
210 #define GET_NEWSRCCANONHOST (long) 328
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
211 #define SET_NEWSRCCANONHOST (long) 329
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
212 #define GET_KINIT (long) 330
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
213 #define SET_KINIT (long) 331
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
214 #define GET_SSLCLIENTCERT (long) 332
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
215 #define SET_SSLCLIENTCERT (long) 333
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
216 #define GET_SSLCLIENTKEY (long) 334
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
217 #define SET_SSLCLIENTKEY (long) 335
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
218 #define GET_KERBEROS_CP_SVR_NAME (long) 336
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
219 #define SET_KERBEROS_CP_SVR_NAME (long) 337
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
220
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
221 /* 4xx: network drivers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
222 #define GET_MAXLOGINTRIALS (long) 400
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
223 #define SET_MAXLOGINTRIALS (long) 401
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
224 #define GET_LOOKAHEAD (long) 402
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
225 #define SET_LOOKAHEAD (long) 403
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
226 #define GET_IMAPPORT (long) 404
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
227 #define SET_IMAPPORT (long) 405
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
228 #define GET_PREFETCH (long) 406
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
229 #define SET_PREFETCH (long) 407
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
230 #define GET_CLOSEONERROR (long) 408
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
231 #define SET_CLOSEONERROR (long) 409
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
232 #define GET_POP3PORT (long) 410
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
233 #define SET_POP3PORT (long) 411
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
234 #define GET_UIDLOOKAHEAD (long) 412
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
235 #define SET_UIDLOOKAHEAD (long) 413
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
236 #define GET_NNTPPORT (long) 414
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
237 #define SET_NNTPPORT (long) 415
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
238 #define GET_IMAPENVELOPE (long) 416
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
239 #define SET_IMAPENVELOPE (long) 417
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
240 #define GET_IMAPREFERRAL (long) 418
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
241 #define SET_IMAPREFERRAL (long) 419
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
242 #define GET_SSLIMAPPORT (long) 420
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
243 #define SET_SSLIMAPPORT (long) 421
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
244 #define GET_SSLPOPPORT (long) 422
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
245 #define SET_SSLPOPPORT (long) 423
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
246 #define GET_SSLNNTPPORT (long) 424
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
247 #define SET_SSLNNTPPORT (long) 425
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
248 #define GET_SSLSMTPPORT (long) 426
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
249 #define SET_SSLSMTPPORT (long) 427
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
250 #define GET_SMTPPORT (long) 428
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
251 #define SET_SMTPPORT (long) 429
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
252 #define GET_IMAPEXTRAHEADERS (long) 430
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
253 #define SET_IMAPEXTRAHEADERS (long) 431
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
254 #define GET_ACL (long) 432
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
255 #define SET_ACL (long) 433
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
256 #define GET_LISTRIGHTS (long) 434
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
257 #define SET_LISTRIGHTS (long) 435
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
258 #define GET_MYRIGHTS (long) 436
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
259 #define SET_MYRIGHTS (long) 437
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
260 #define GET_QUOTA (long) 438
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
261 #define SET_QUOTA (long) 439
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
262 #define GET_QUOTAROOT (long) 440
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
263 #define SET_QUOTAROOT (long) 441
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
264 #define GET_IMAPTRYSSL (long) 442
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
265 #define SET_IMAPTRYSSL (long) 443
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
266 #define GET_FETCHLOOKAHEAD (long) 444
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
267 #define SET_FETCHLOOKAHEAD (long) 445
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
268 #define GET_NNTPRANGE (long) 446
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
269 #define SET_NNTPRANGE (long) 447
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
270 #define GET_NNTPHIDEPATH (long) 448
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
271 #define SET_NNTPHIDEPATH (long) 449
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
272 #define GET_SENDCOMMAND (long) 450
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
273 #define SET_SENDCOMMAND (long) 451
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
274 #define GET_IDLETIMEOUT (long) 452
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
275 #define SET_IDLETIMEOUT (long) 453
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
276 #define GET_FETCHLOOKAHEADLIMIT (long) 454
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
277 #define SET_FETCHLOOKAHEADLIMIT (long) 455
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
278
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
279 /* 5xx: local file drivers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
280 #define GET_MBXPROTECTION (long) 500
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
281 #define SET_MBXPROTECTION (long) 501
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
282 #define GET_DIRPROTECTION (long) 502
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
283 #define SET_DIRPROTECTION (long) 503
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
284 #define GET_LOCKPROTECTION (long) 504
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
285 #define SET_LOCKPROTECTION (long) 505
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
286 #define GET_FROMWIDGET (long) 506
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
287 #define SET_FROMWIDGET (long) 507
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
288 #define GET_NEWSACTIVE (long) 508
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
289 #define SET_NEWSACTIVE (long) 509
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
290 #define GET_NEWSSPOOL (long) 510
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
291 #define SET_NEWSSPOOL (long) 511
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
292 #define GET_NEWSRC (long) 512
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
293 #define SET_NEWSRC (long) 513
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
294 #define GET_EXTENSION (long) 514
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
295 #define SET_EXTENSION (long) 515
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
296 #define GET_DISABLEFCNTLLOCK (long) 516
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
297 #define SET_DISABLEFCNTLLOCK (long) 517
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
298 #define GET_LOCKEACCESERROR (long) 518
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
299 #define SET_LOCKEACCESERROR (long) 519
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
300 #define GET_LISTMAXLEVEL (long) 520
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
301 #define SET_LISTMAXLEVEL (long) 521
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
302 #define GET_ANONYMOUSHOME (long) 522
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
303 #define SET_ANONYMOUSHOME (long) 523
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
304 #define GET_FTPHOME (long) 524
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
305 #define SET_FTPHOME (long) 525
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
306 #define GET_PUBLICHOME (long) 526
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
307 #define SET_PUBLICHOME (long) 527
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
308 #define GET_SHAREDHOME (long) 528
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
309 #define SET_SHAREDHOME (long) 529
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
310 #define GET_MHPROFILE (long) 530
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
311 #define SET_MHPROFILE (long) 531
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
312 #define GET_MHPATH (long) 532
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
313 #define SET_MHPATH (long) 533
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
314 #define GET_ONETIMEEXPUNGEATPING (long) 534
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
315 #define SET_ONETIMEEXPUNGEATPING (long) 535
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
316 #define GET_USERHASNOLIFE (long) 536
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
317 #define SET_USERHASNOLIFE (long) 537
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
318 #define GET_FTPPROTECTION (long) 538
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
319 #define SET_FTPPROTECTION (long) 539
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
320 #define GET_PUBLICPROTECTION (long) 540
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
321 #define SET_PUBLICPROTECTION (long) 541
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
322 #define GET_SHAREDPROTECTION (long) 542
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
323 #define SET_SHAREDPROTECTION (long) 543
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
324 #define GET_LOCKTIMEOUT (long) 544
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
325 #define SET_LOCKTIMEOUT (long) 545
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
326 #define GET_NOTIMEZONES (long) 546
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
327 #define SET_NOTIMEZONES (long) 547
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
328 #define GET_HIDEDOTFILES (long) 548
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
329 #define SET_HIDEDOTFILES (long) 549
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
330 #define GET_FTPDIRPROTECTION (long) 550
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
331 #define SET_FTPDIRPROTECTION (long) 551
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
332 #define GET_PUBLICDIRPROTECTION (long) 552
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
333 #define SET_PUBLICDIRPROTECTION (long) 553
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
334 #define GET_SHAREDDIRPROTECTION (long) 554
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
335 #define SET_SHAREDDIRPROTECTION (long) 555
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
336 #define GET_TRUSTDNS (long) 556
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
337 #define SET_TRUSTDNS (long) 557
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
338 #define GET_SASLUSESPTRNAME (long) 558
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
339 #define SET_SASLUSESPTRNAME (long) 559
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
340 #define GET_NETFSSTATBUG (long) 560
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
341 #define SET_NETFSSTATBUG (long) 561
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
342 #define GET_SNARFMAILBOXNAME (long) 562
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
343 #define SET_SNARFMAILBOXNAME (long) 563
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
344 #define GET_SNARFINTERVAL (long) 564
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
345 #define SET_SNARFINTERVAL (long) 565
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
346 #define GET_SNARFPRESERVE (long) 566
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
347 #define SET_SNARFPRESERVE (long) 567
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
348 #define GET_INBOXPATH (long) 568
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
349 #define SET_INBOXPATH (long) 569
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
350 #define GET_DIRFMTTEST (long) 570
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
351 #define SET_DIRFMTTEST (long) 571
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
352 #define GET_SCANCONTENTS (long) 572
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
353 #define SET_SCANCONTENTS (long) 573
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
354 #define GET_MHALLOWINBOX (long) 574
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
355 #define SET_MHALLOWINBOX (long) 575
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
356
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
357 /* Driver flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
358
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
359 #define DR_DISABLE (long) 0x1 /* driver is disabled */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
360 #define DR_LOCAL (long) 0x2 /* local file driver */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
361 #define DR_MAIL (long) 0x4 /* supports mail */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
362 #define DR_NEWS (long) 0x8 /* supports news */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
363 #define DR_READONLY (long) 0x10 /* driver only allows readonly access */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
364 #define DR_NOFAST (long) 0x20 /* "fast" data is slow (whole msg fetch) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
365 #define DR_NAMESPACE (long) 0x40/* driver has a special namespace */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
366 #define DR_LOWMEM (long) 0x80 /* low amounts of memory available */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
367 #define DR_LOCKING (long) 0x100 /* driver does locking */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
368 #define DR_CRLF (long) 0x200 /* driver internal form uses CRLF newlines */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
369 #define DR_NOSTICKY (long) 0x400/* driver does not support sticky UIDs */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
370 #define DR_RECYCLE (long) 0x800 /* driver does stream recycling */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
371 #define DR_XPOINT (long) 0x1000 /* needs to be checkpointed */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
372 /* driver has no real internal date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
373 #define DR_NOINTDATE (long) 0x2000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
374 /* driver does not announce new mail */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
375 #define DR_NONEWMAIL (long) 0x4000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
376 /* driver does not announce new mail when RO */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
377 #define DR_NONEWMAILRONLY (long) 0x8000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
378 /* driver can be halfopen */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
379 #define DR_HALFOPEN (long) 0x10000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
380 #define DR_DIRFMT (long) 0x20000/* driver is a directory-format */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
381 #define DR_MODSEQ (long) 0x40000/* driver supports modseqs */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
382
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
383
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
384 /* Cache management function codes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
385
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
386 #define CH_INIT (long) 10 /* initialize cache */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
387 #define CH_SIZE (long) 11 /* (re-)size the cache */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
388 #define CH_MAKEELT (long) 30 /* return elt, make if needed */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
389 #define CH_ELT (long) 31 /* return elt if exists */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
390 #define CH_SORTCACHE (long) 35 /* return sortcache entry, make if needed */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
391 #define CH_FREE (long) 40 /* free space used by elt */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
392 /* free space used by sortcache */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
393 #define CH_FREESORTCACHE (long) 43
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
394 #define CH_EXPUNGE (long) 45 /* delete elt pointer from list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
395
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
396
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
397 /* Mailbox open options
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
398 * For compatibility with the past, OP_DEBUG must always be 1.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
399 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
400
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
401 #define OP_DEBUG (long) 0x1 /* debug protocol negotiations */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
402 #define OP_READONLY (long) 0x2 /* read-only open */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
403 #define OP_ANONYMOUS (long) 0x4 /* anonymous open of newsgroup */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
404 #define OP_SHORTCACHE (long) 0x8/* short (elt-only) caching */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
405 #define OP_SILENT (long) 0x10 /* don't pass up events (internal use) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
406 #define OP_PROTOTYPE (long) 0x20/* return driver prototype */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
407 #define OP_HALFOPEN (long) 0x40 /* half-open (IMAP connect but no select) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
408 #define OP_EXPUNGE (long) 0x80 /* silently expunge recycle stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
409 #define OP_SECURE (long) 0x100 /* don't do non-secure authentication */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
410 #define OP_TRYSSL (long) 0x200 /* try SSL first */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
411 /* use multiple newsrc files */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
412 #define OP_MULNEWSRC (long) 0x400
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
413 #define OP_NOKOD (long) 0x800 /* suppress kiss-of-death */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
414 #define OP_SNIFF (long) 0x1000 /* metadata only open */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
415 /* reserved for application use */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
416 #define OP_RESERVED (unsigned long) 0xff000000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
417
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
418
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
419 /* Net open options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
420
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
421 /* no error messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
422 #define NET_SILENT ((unsigned long) 0x80000000)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
423 /* no validation of SSL certificates */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
424 #define NET_NOVALIDATECERT ((unsigned long) 0x40000000)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
425 /* no open timeout */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
426 #define NET_NOOPENTIMEOUT ((unsigned long) 0x20000000)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
427 /* TLS not SSL */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
428 #define NET_TLSCLIENT ((unsigned long) 0x10000000)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
429 /* try SSL mode */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
430 #define NET_TRYSSL ((unsigned long) 0x8000000)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
431
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
432 /* Close options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
433
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
434 #define CL_EXPUNGE (long) 1 /* expunge silently */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
435
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
436
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
437 /* Fetch options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
438
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
439 #define FT_UID (long) 0x1 /* argument is a UID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
440 #define FT_PEEK (long) 0x2 /* peek at data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
441 #define FT_NOT (long) 0x4 /* NOT flag for header lines fetch */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
442 #define FT_INTERNAL (long) 0x8 /* text can be internal strings */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
443 /* IMAP prefetch text when fetching header */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
444 #define FT_PREFETCHTEXT (long) 0x20
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
445 #define FT_NOHDRS (long) 0x40 /* suppress fetching extra headers (note that
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
446 this breaks news handling) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
447 #define FT_NEEDENV (long) 0x80 /* (internal use) include envelope */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
448 #define FT_NEEDBODY (long) 0x100/* (internal use) include body structure */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
449 /* no fetch lookahead */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
450 #define FT_NOLOOKAHEAD (long) 0x200
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
451 /* (internal use) lookahead in hdr searching */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
452 #define FT_SEARCHLOOKAHEAD (long) 0x400
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
453 /* stringstruct return hack */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
454 #define FT_RETURNSTRINGSTRUCT (long) 0x800
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
455
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
456
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
457 /* Flagging options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
458
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
459 #define ST_UID (long) 0x1 /* argument is a UID sequence */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
460 #define ST_SILENT (long) 0x2 /* don't return results */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
461 #define ST_SET (long) 0x4 /* set vs. clear */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
462
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
463
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
464 /* Expunge options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
465
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
466 #define EX_UID (long) 0x1 /* argument is a UID sequence */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
467
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
468
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
469 /* Copy options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
470
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
471 #define CP_UID (long) 0x1 /* argument is a UID sequence */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
472 #define CP_MOVE (long) 0x2 /* delete from source after copying */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
473 /* set debug in any created stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
474 #define CP_DEBUG (long) 0x20000000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
475
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
476 /* Search/sort/thread options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
477
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
478 #define SE_UID (long) 0x1 /* return UID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
479 #define SE_FREE (long) 0x2 /* free search program after finished */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
480 #define SE_NOPREFETCH (long) 0x4/* no search prefetching */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
481 #define SO_FREE (long) 0x8 /* free sort program after finished */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
482 #define SE_NOSERVER (long) 0x10 /* don't do server-based search/sort/thread */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
483 #define SE_RETAIN (long) 0x20 /* retain previous search results */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
484 #define SO_OVERVIEW (long) 0x40 /* use overviews in searching (NNTP only) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
485 #define SE_NEEDBODY (long) 0x80 /* include body structure in prefetch */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
486 #define SE_NOHDRS (long) 0x100 /* suppress prefetching extra headers (note
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
487 that this breaks news handling) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
488 #define SE_NOLOCAL (long) 0x200 /* no local retry (IMAP only) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
489
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
490 #define SO_NOSERVER SE_NOSERVER /* compatibility name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
491 #define SE_SILLYOK (long) 0x400 /* allow silly searches */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
492
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
493
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
494 /* Status options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
495
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
496 #define SA_MESSAGES (long) 0x1 /* number of messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
497 #define SA_RECENT (long) 0x2 /* number of recent messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
498 #define SA_UNSEEN (long) 0x4 /* number of unseen messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
499 #define SA_UIDNEXT (long) 0x8 /* next UID to be assigned */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
500 /* UID validity value */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
501 #define SA_UIDVALIDITY (long) 0x10
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
502 /* set OP_DEBUG on any created stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
503 #define SA_DEBUG (long) 0x10000000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
504 /* use multiple newsrcs */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
505 #define SA_MULNEWSRC (long) 0x20000000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
506
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
507 /* Mailgets flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
508
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
509 #define MG_UID (long) 0x1 /* message number is a UID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
510 #define MG_COPY (long) 0x2 /* must return copy of argument */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
511
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
512 /* SASL authenticator categories */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
513
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
514 #define AU_SECURE (long) 0x1 /* /secure allowed */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
515 #define AU_AUTHUSER (long) 0x2 /* /authuser=xxx allowed */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
516 /* authenticator hidden */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
517 #define AU_HIDE (long) 0x10000000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
518 /* authenticator disabled */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
519 #define AU_DISABLE (long) 0x20000000
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
520
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
521
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
522 /* Garbage collection flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
523
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
524 #define GC_ELT (long) 0x1 /* message cache elements */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
525 #define GC_ENV (long) 0x2 /* envelopes and bodies */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
526 #define GC_TEXTS (long) 0x4 /* cached texts */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
527
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
528
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
529 /* mm_log()/mm_notify() condition codes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
530
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
531 #define WARN (long) 1 /* mm_log warning type */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
532 #define ERROR (long) 2 /* mm_log error type */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
533 #define PARSE (long) 3 /* mm_log parse error type */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
534 #define BYE (long) 4 /* mm_notify stream dying */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
535 #define TCPDEBUG (long) 5 /* mm_log TCP debug babble */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
536
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
537
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
538 /* Bits from mail_parse_flags(). Don't change these, since the header format
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
539 * used by tenex, mtx, and mbx corresponds to these bits.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
540 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
541
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
542 #define fSEEN 0x1
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
543 #define fDELETED 0x2
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
544 #define fFLAGGED 0x4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
545 #define fANSWERED 0x8
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
546 #define fOLD 0x10
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
547 #define fDRAFT 0x20
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
548
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
549 #define fEXPUNGED 0x8000 /* internal flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
550
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
551 /* Bits for mm_list() and mm_lsub() */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
552
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
553 /* Note that (LATT_NOINFERIORS LATT_HASCHILDREN LATT_HASNOCHILDREN) and
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
554 * (LATT_NOSELECT LATT_MARKED LATT_UNMARKED) each have eight possible states,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
555 * but only four of these are valid. The other four are silly states which
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
556 * while invalid can unfortunately be expressed in the IMAP protocol.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
557 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
558
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
559 /* terminal node in hierarchy */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
560 #define LATT_NOINFERIORS (long) 0x1
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
561 /* name can not be selected */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
562 #define LATT_NOSELECT (long) 0x2
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
563 /* changed since last accessed */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
564 #define LATT_MARKED (long) 0x4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
565 /* accessed since last changed */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
566 #define LATT_UNMARKED (long) 0x8
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
567 /* name has referral to remote mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
568 #define LATT_REFERRAL (long) 0x10
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
569 /* has selectable inferiors */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
570 #define LATT_HASCHILDREN (long) 0x20
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
571 /* has no selectable inferiors */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
572 #define LATT_HASNOCHILDREN (long) 0x40
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
573
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
574
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
575 /* Sort functions */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
576
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
577 #define SORTDATE 0 /* date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
578 #define SORTARRIVAL 1 /* arrival date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
579 #define SORTFROM 2 /* from */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
580 #define SORTSUBJECT 3 /* subject */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
581 #define SORTTO 4 /* to */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
582 #define SORTCC 5 /* cc */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
583 #define SORTSIZE 6 /* size */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
584
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
585
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
586 /* imapreferral_t codes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
587
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
588 #define REFAUTHFAILED (long) 0 /* authentication referral -- not logged in */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
589 #define REFAUTH (long) 1 /* authentication referral -- logged in */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
590 #define REFSELECT (long) 2 /* select referral */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
591 #define REFCREATE (long) 3
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
592 #define REFDELETE (long) 4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
593 #define REFRENAME (long) 5
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
594 #define REFSUBSCRIBE (long) 6
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
595 #define REFUNSUBSCRIBE (long) 7
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
596 #define REFSTATUS (long) 8
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
597 #define REFCOPY (long) 9
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
598 #define REFAPPEND (long) 10
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
599
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
600
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
601 /* sendcommand_t codes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
602
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
603 /* expunge response deferred */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
604 #define SC_EXPUNGEDEFERRED (long) 1
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
605
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
606 /* Block notification codes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
607
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
608 #define BLOCK_NONE 0 /* not blocked */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
609 #define BLOCK_SENSITIVE 1 /* sensitive code, disallow alarms */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
610 #define BLOCK_NONSENSITIVE 2 /* non-sensitive code, allow alarms */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
611 #define BLOCK_DNSLOOKUP 10 /* blocked on DNS lookup */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
612 #define BLOCK_TCPOPEN 11 /* blocked on TCP open */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
613 #define BLOCK_TCPREAD 12 /* blocked on TCP read */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
614 #define BLOCK_TCPWRITE 13 /* blocked on TCP write */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
615 #define BLOCK_TCPCLOSE 14 /* blocked on TCP close */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
616 #define BLOCK_FILELOCK 20 /* blocked on file locking */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
617
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
618
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
619 /* In-memory sized-text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
620
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
621 #define SIZEDTEXT struct mail_sizedtext
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
622
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
623 SIZEDTEXT {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
624 unsigned char *data; /* text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
625 unsigned long size; /* size of text in octets */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
626 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
627
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
628
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
629 /* String list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
630
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
631 #define STRINGLIST struct string_list
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
632
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
633 STRINGLIST {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
634 SIZEDTEXT text; /* string text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
635 STRINGLIST *next;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
636 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
637
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
638
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
639 /* Parse results from mail_valid_net_parse */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
640
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
641 #define NETMAXHOST 256
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
642 #define NETMAXUSER 65
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
643 #define NETMAXMBX (MAILTMPLEN/4)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
644 #define NETMAXSRV 21
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
645 typedef struct net_mailbox {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
646 char host[NETMAXHOST]; /* host name (may be canonicalized) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
647 char orighost[NETMAXHOST]; /* host name before canonicalization */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
648 char user[NETMAXUSER]; /* user name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
649 char authuser[NETMAXUSER]; /* authentication user name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
650 char mailbox[NETMAXMBX]; /* mailbox name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
651 char service[NETMAXSRV]; /* service name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
652 unsigned long port; /* TCP port number */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
653 unsigned int anoflag : 1; /* anonymous */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
654 unsigned int dbgflag : 1; /* debug flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
655 unsigned int secflag : 1; /* secure flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
656 unsigned int sslflag : 1; /* SSL driver flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
657 unsigned int trysslflag : 1; /* try SSL driver first flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
658 unsigned int novalidate : 1; /* don't validate certificates */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
659 unsigned int tlsflag : 1; /* TLS flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
660 unsigned int notlsflag : 1; /* do not do TLS flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
661 unsigned int readonlyflag : 1;/* want readonly */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
662 unsigned int norsh : 1; /* don't use rsh/ssh */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
663 unsigned int loser : 1; /* server is a loser */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
664 unsigned int tlssslv23 : 1; /* force SSLv23 client method over TLS */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
665 } NETMBX;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
666
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
667 /* Item in an address list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
668
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
669 #define ADDRESS struct mail_address
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
670
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
671 ADDRESS {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
672 char *personal; /* personal name phrase */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
673 char *adl; /* at-domain-list source route */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
674 char *mailbox; /* mailbox name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
675 char *host; /* domain name of mailbox's host */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
676 char *error; /* error in address from SMTP module */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
677 struct {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
678 char *type; /* address type (default "rfc822") */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
679 char *addr; /* address as xtext */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
680 } orcpt;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
681 ADDRESS *next; /* pointer to next address in list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
682 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
683
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
684
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
685 /* Message envelope */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
686
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
687 typedef struct mail_envelope {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
688 unsigned int incomplete : 1; /* envelope may be incomplete */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
689 unsigned int imapenvonly : 1; /* envelope only has IMAP envelope */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
690 char *remail; /* remail header if any */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
691 ADDRESS *return_path; /* error return address */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
692 unsigned char *date; /* message composition date string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
693 ADDRESS *from; /* originator address list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
694 ADDRESS *sender; /* sender address list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
695 ADDRESS *reply_to; /* reply address list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
696 char *subject; /* message subject string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
697 ADDRESS *to; /* primary recipient list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
698 ADDRESS *cc; /* secondary recipient list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
699 ADDRESS *bcc; /* blind secondary recipient list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
700 char *in_reply_to; /* replied message ID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
701 char *message_id; /* message ID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
702 char *newsgroups; /* USENET newsgroups */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
703 char *followup_to; /* USENET reply newsgroups */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
704 char *references; /* USENET references */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
705 void *sparep; /* spare pointer reserved for main program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
706 } ENVELOPE;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
707
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
708 /* Primary body types */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
709 /* If you change any of these you must also change body_types in rfc822.c */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
710
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
711 #define TYPETEXT 0 /* unformatted text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
712 #define TYPEMULTIPART 1 /* multiple part */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
713 #define TYPEMESSAGE 2 /* encapsulated message */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
714 #define TYPEAPPLICATION 3 /* application data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
715 #define TYPEAUDIO 4 /* audio */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
716 #define TYPEIMAGE 5 /* static image */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
717 #define TYPEVIDEO 6 /* video */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
718 #define TYPEMODEL 7 /* model */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
719 #define TYPEOTHER 8 /* unknown */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
720 #define TYPEMAX 15 /* maximum type code */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
721
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
722
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
723 /* Body encodings */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
724 /* If you change any of these you must also change body_encodings in rfc822.c
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
725 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
726
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
727 #define ENC7BIT 0 /* 7 bit SMTP semantic data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
728 #define ENC8BIT 1 /* 8 bit SMTP semantic data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
729 #define ENCBINARY 2 /* 8 bit binary data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
730 #define ENCBASE64 3 /* base-64 encoded data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
731 #define ENCQUOTEDPRINTABLE 4 /* human-readable 8-as-7 bit data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
732 #define ENCOTHER 5 /* unknown */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
733 #define ENCMAX 10 /* maximum encoding code */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
734
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
735
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
736 /* Body contents */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
737
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
738 #define BODY struct mail_bodystruct
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
739 #define MESSAGE struct mail_body_message
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
740 #define PARAMETER struct mail_body_parameter
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
741 #define PART struct mail_body_part
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
742 #define PARTTEXT struct mail_body_text
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
743
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
744 /* Message body text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
745
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
746 PARTTEXT {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
747 unsigned long offset; /* offset from body origin */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
748 SIZEDTEXT text; /* text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
749 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
750
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
751
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
752 /* Message body structure */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
753
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
754 BODY {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
755 unsigned short type; /* body primary type */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
756 unsigned short encoding; /* body transfer encoding */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
757 char *subtype; /* subtype string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
758 PARAMETER *parameter; /* parameter list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
759 char *id; /* body identifier */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
760 char *description; /* body description */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
761 struct { /* body disposition */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
762 char *type; /* disposition type */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
763 PARAMETER *parameter; /* disposition parameters */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
764 } disposition;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
765 STRINGLIST *language; /* body language */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
766 char *location; /* body content URI */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
767 PARTTEXT mime; /* MIME header */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
768 PARTTEXT contents; /* body part contents */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
769 union { /* different ways of accessing contents */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
770 PART *part; /* body part list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
771 MESSAGE *msg; /* body encapsulated message */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
772 } nested;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
773 struct {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
774 unsigned long lines; /* size of text in lines */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
775 unsigned long bytes; /* size of text in octets */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
776 } size;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
777 char *md5; /* MD5 checksum */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
778 void *sparep; /* spare pointer reserved for main program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
779 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
780
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
781
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
782 /* Parameter list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
783
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
784 PARAMETER {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
785 char *attribute; /* parameter attribute name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
786 char *value; /* parameter value */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
787 PARAMETER *next; /* next parameter in list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
788 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
789
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
790
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
791 /* Multipart content list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
792
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
793 PART {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
794 BODY body; /* body information for this part */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
795 PART *next; /* next body part */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
796 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
797
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
798
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
799 /* RFC-822 Message */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
800
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
801 MESSAGE {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
802 ENVELOPE *env; /* message envelope */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
803 BODY *body; /* message body */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
804 PARTTEXT full; /* full message */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
805 STRINGLIST *lines; /* lines used to filter header */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
806 PARTTEXT header; /* header text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
807 PARTTEXT text; /* body text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
808 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
809
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
810 /* Entry in the message cache array */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
811
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
812 typedef struct message_cache {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
813 unsigned long msgno; /* message number */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
814 unsigned int lockcount : 8; /* non-zero if multiple references */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
815 unsigned long rfc822_size; /* # of bytes of message as raw RFC822 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
816 struct { /* c-client internal use only */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
817 unsigned long uid; /* message unique ID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
818 unsigned long mod; /* modseq */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
819 PARTTEXT special; /* special text pointers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
820 MESSAGE msg; /* internal message pointers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
821 union { /* driver internal use */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
822 unsigned long data;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
823 void *ptr;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
824 } spare;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
825 unsigned int sequence : 1; /* saved sequence bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
826 unsigned int dirty : 1; /* driver internal use */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
827 unsigned int filter : 1; /* driver internal use */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
828 unsigned int ghost : 1; /* driver internal use */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
829 } private;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
830 /* internal date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
831 unsigned int day : 5; /* day of month (1-31) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
832 unsigned int month : 4; /* month of year (1-12) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
833 unsigned int year : 7; /* year since BASEYEAR (expires in 127 yrs) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
834 unsigned int hours: 5; /* hours (0-23) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
835 unsigned int minutes: 6; /* minutes (0-59) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
836 unsigned int seconds: 6; /* seconds (0-59) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
837 unsigned int zoccident : 1; /* non-zero if west of UTC */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
838 unsigned int zhours : 4; /* hours from UTC (0-12) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
839 unsigned int zminutes: 6; /* minutes (0-59) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
840 /* system flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
841 unsigned int seen : 1; /* system Seen flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
842 unsigned int deleted : 1; /* system Deleted flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
843 unsigned int flagged : 1; /* system Flagged flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
844 unsigned int answered : 1; /* system Answered flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
845 unsigned int draft : 1; /* system Draft flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
846 unsigned int recent : 1; /* system Recent flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
847 /* message status */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
848 unsigned int valid : 1; /* elt has valid flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
849 unsigned int searched : 1; /* message was searched */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
850 unsigned int sequence : 1; /* message is in sequence */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
851 /* reserved for use by main program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
852 unsigned int spare : 1; /* first spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
853 unsigned int spare2 : 1; /* second spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
854 unsigned int spare3 : 1; /* third spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
855 unsigned int spare4 : 1; /* fourth spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
856 unsigned int spare5 : 1; /* fifth spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
857 unsigned int spare6 : 1; /* sixth spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
858 unsigned int spare7 : 1; /* seventh spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
859 unsigned int spare8 : 1; /* eighth spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
860 void *sparep; /* spare pointer */
1
28a55bc1110c [mq]: imapext
yuuji@gentei.org
parents: 0
diff changeset
861 void *maildirp; /* for the Maildir driver */
0
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
862 unsigned long user_flags; /* user-assignable flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
863 } MESSAGECACHE;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
864
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
865 /* String structure */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
866
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
867 #define STRINGDRIVER struct string_driver
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
868
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
869 typedef struct mailstring {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
870 void *data; /* driver-dependent data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
871 unsigned long data1; /* driver-dependent data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
872 unsigned long size; /* total length of string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
873 char *chunk; /* base address of chunk */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
874 unsigned long chunksize; /* size of chunk */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
875 unsigned long offset; /* offset of this chunk in base */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
876 char *curpos; /* current position in chunk */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
877 unsigned long cursize; /* number of bytes remaining in chunk */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
878 STRINGDRIVER *dtb; /* driver that handles this type of string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
879 } STRING;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
880
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
881
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
882 /* Dispatch table for string driver */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
883
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
884 STRINGDRIVER {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
885 /* initialize string driver */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
886 void (*init) (STRING *s,void *data,unsigned long size);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
887 /* get next character in string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
888 char (*next) (STRING *s);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
889 /* set position in string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
890 void (*setpos) (STRING *s,unsigned long i);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
891 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
892
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
893
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
894 /* Stringstruct access routines */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
895
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
896 #define INIT(s,d,data,size) ((*((s)->dtb = &d)->init) (s,data,size))
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
897 #define SIZE(s) ((s)->size - GETPOS (s))
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
898 #define CHR(s) (*(s)->curpos)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
899 #define SNX(s) (--(s)->cursize ? *(s)->curpos++ : (*(s)->dtb->next) (s))
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
900 #define GETPOS(s) ((s)->offset + ((s)->curpos - (s)->chunk))
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
901 #define SETPOS(s,i) (*(s)->dtb->setpos) (s,i)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
902
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
903 /* Search program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
904
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
905 #define SEARCHPGM struct search_program
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
906 #define SEARCHHEADER struct search_header
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
907 #define SEARCHSET struct search_set
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
908 #define SEARCHOR struct search_or
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
909 #define SEARCHPGMLIST struct search_pgm_list
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
910
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
911
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
912 SEARCHHEADER { /* header search */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
913 SIZEDTEXT line; /* header line */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
914 SIZEDTEXT text; /* text in header */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
915 SEARCHHEADER *next; /* next in list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
916 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
917
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
918
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
919 SEARCHSET { /* message set */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
920 unsigned long first; /* sequence number */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
921 unsigned long last; /* last value, if a range */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
922 SEARCHSET *next; /* next in list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
923 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
924
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
925
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
926 SEARCHOR {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
927 SEARCHPGM *first; /* first program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
928 SEARCHPGM *second; /* second program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
929 SEARCHOR *next; /* next in list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
930 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
931
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
932
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
933 SEARCHPGMLIST {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
934 SEARCHPGM *pgm; /* search program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
935 SEARCHPGMLIST *next; /* next in list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
936 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
937
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
938 SEARCHPGM { /* search program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
939 SEARCHSET *msgno; /* message numbers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
940 SEARCHSET *uid; /* unique identifiers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
941 SEARCHOR *or; /* or'ed in programs */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
942 SEARCHPGMLIST *not; /* and'ed not program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
943 SEARCHHEADER *header; /* list of headers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
944 STRINGLIST *bcc; /* bcc recipients */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
945 STRINGLIST *body; /* text in message body */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
946 STRINGLIST *cc; /* cc recipients */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
947 STRINGLIST *from; /* originator */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
948 STRINGLIST *keyword; /* keywords */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
949 STRINGLIST *unkeyword; /* unkeywords */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
950 STRINGLIST *subject; /* text in subject */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
951 STRINGLIST *text; /* text in headers and body */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
952 STRINGLIST *to; /* to recipients */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
953 unsigned long larger; /* larger than this size */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
954 unsigned long smaller; /* smaller than this size */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
955 unsigned long older; /* older than this interval */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
956 unsigned long younger; /* younger than this interval */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
957 unsigned short sentbefore; /* sent before this date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
958 unsigned short senton; /* sent on this date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
959 unsigned short sentsince; /* sent since this date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
960 unsigned short before; /* before this date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
961 unsigned short on; /* on this date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
962 unsigned short since; /* since this date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
963 unsigned int answered : 1; /* answered messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
964 unsigned int unanswered : 1; /* unanswered messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
965 unsigned int deleted : 1; /* deleted messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
966 unsigned int undeleted : 1; /* undeleted messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
967 unsigned int draft : 1; /* message draft */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
968 unsigned int undraft : 1; /* message undraft */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
969 unsigned int flagged : 1; /* flagged messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
970 unsigned int unflagged : 1; /* unflagged messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
971 unsigned int recent : 1; /* recent messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
972 unsigned int old : 1; /* old messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
973 unsigned int seen : 1; /* seen messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
974 unsigned int unseen : 1; /* unseen messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
975 /* These must be simulated in IMAP */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
976 STRINGLIST *return_path; /* error return address */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
977 STRINGLIST *sender; /* sender address list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
978 STRINGLIST *reply_to; /* reply address list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
979 STRINGLIST *in_reply_to; /* replied message ID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
980 STRINGLIST *message_id; /* message ID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
981 STRINGLIST *newsgroups; /* USENET newsgroups */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
982 STRINGLIST *followup_to; /* USENET reply newsgroups */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
983 STRINGLIST *references; /* USENET references */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
984 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
985
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
986
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
987 /* Mailbox status */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
988
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
989 typedef struct mbx_status {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
990 long flags; /* validity flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
991 unsigned long messages; /* number of messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
992 unsigned long recent; /* number of recent messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
993 unsigned long unseen; /* number of unseen messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
994 unsigned long uidnext; /* next UID to be assigned */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
995 unsigned long uidvalidity; /* UID validity value */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
996 } MAILSTATUS;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
997
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
998 /* Sort program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
999
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1000 typedef void (*postsort_t) (void *sc);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1001
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1002 #define SORTPGM struct sort_program
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1003
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1004 SORTPGM {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1005 unsigned int reverse : 1; /* sort function is to be reversed */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1006 unsigned int abort : 1; /* abort sorting */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1007 short function; /* sort function */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1008 unsigned long nmsgs; /* number of messages being sorted */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1009 struct {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1010 unsigned long cached; /* number of messages cached so far */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1011 unsigned long sorted; /* number of messages sorted so far */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1012 unsigned long postsorted; /* number of postsorted messages so far */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1013 } progress;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1014 postsort_t postsort; /* post sorter */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1015 SORTPGM *next; /* next function */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1016 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1017
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1018
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1019 /* Sort cache */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1020
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1021 #define SORTCACHE struct sort_cache
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1022
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1023 SORTCACHE {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1024 unsigned int sorted : 1; /* message has been sorted */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1025 unsigned int postsorted : 1; /* message has been postsorted */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1026 unsigned int refwd : 1; /* subject is a re or fwd */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1027 unsigned int dirty : 1; /* has data not written to backup */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1028 SORTPGM *pgm; /* sort program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1029 unsigned long num; /* message number (sequence or UID) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1030 unsigned long date; /* sent date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1031 unsigned long arrival; /* arrival date */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1032 unsigned long size; /* message size */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1033 char *from; /* from string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1034 char *to; /* to string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1035 char *cc; /* cc string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1036 char *subject; /* extracted subject string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1037 char *message_id; /* message-id string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1038 char *unique; /* unique string, normally message-id */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1039 STRINGLIST *references; /* references string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1040 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1041
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1042 /* ACL list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1043
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1044 #define ACLLIST struct acl_list
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1045
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1046 ACLLIST {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1047 char *identifier; /* authentication identifier */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1048 char *rights; /* access rights */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1049 ACLLIST *next;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1050 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1051
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1052 /* Quota resource list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1053
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1054 #define QUOTALIST struct quota_list
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1055
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1056 QUOTALIST {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1057 char *name; /* resource name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1058 unsigned long usage; /* resource usage */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1059 unsigned long limit; /* resource limit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1060 QUOTALIST *next; /* next resource */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1061 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1062
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1063 /* Mail Access I/O stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1064
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1065
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1066 /* Structure for mail driver dispatch */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1067
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1068 #define DRIVER struct driver
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1069
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1070
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1071 /* Mail I/O stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1072
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1073 typedef struct mail_stream {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1074 DRIVER *dtb; /* dispatch table for this driver */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1075 void *local; /* pointer to driver local data */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1076 char *mailbox; /* mailbox name (canonicalized) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1077 char *original_mailbox; /* mailbox name (non-canonicalized) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1078 unsigned short use; /* stream use count */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1079 unsigned short sequence; /* stream sequence */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1080 unsigned int inbox : 1; /* stream open on an INBOX */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1081 unsigned int lock : 1; /* stream lock flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1082 unsigned int debug : 1; /* stream debug flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1083 unsigned int silent : 1; /* don't pass events to main program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1084 unsigned int rdonly : 1; /* stream read-only flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1085 unsigned int anonymous : 1; /* stream anonymous access flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1086 unsigned int scache : 1; /* stream short cache flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1087 unsigned int halfopen : 1; /* stream half-open flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1088 unsigned int secure : 1; /* stream secure flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1089 unsigned int tryssl : 1; /* stream tryssl flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1090 unsigned int mulnewsrc : 1; /* stream use multiple newsrc files */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1091 unsigned int perm_seen : 1; /* permanent Seen flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1092 unsigned int perm_deleted : 1;/* permanent Deleted flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1093 unsigned int perm_flagged : 1;/* permanent Flagged flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1094 unsigned int perm_answered :1;/* permanent Answered flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1095 unsigned int perm_draft : 1; /* permanent Draft flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1096 unsigned int kwd_create : 1; /* can create new keywords */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1097 unsigned int uid_nosticky : 1;/* UIDs are not preserved */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1098 unsigned int unhealthy : 1; /* unhealthy protocol negotiations */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1099 unsigned int nokod : 1; /* suppress kiss-of-death */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1100 unsigned int sniff : 1; /* metadata only */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1101 unsigned long perm_user_flags;/* mask of permanent user flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1102 unsigned long gensym; /* generated tag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1103 unsigned long nmsgs; /* # of associated msgs */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1104 unsigned long recent; /* # of recent msgs */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1105 unsigned long uid_validity; /* UID validity sequence */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1106 unsigned long uid_last; /* last assigned UID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1107 char *user_flags[NUSERFLAGS]; /* pointers to user flags in bit order */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1108 unsigned long cachesize; /* size of message cache */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1109 MESSAGECACHE **cache; /* message cache array */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1110 SORTCACHE **sc; /* sort cache array */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1111 unsigned long msgno; /* message number of `current' message */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1112 ENVELOPE *env; /* scratch buffer for envelope */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1113 BODY *body; /* scratch buffer for body */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1114 SIZEDTEXT text; /* scratch buffer for text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1115 struct {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1116 char *name; /* mailbox name to snarf from */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1117 unsigned long time; /* last snarf time */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1118 long options; /* snarf open options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1119 } snarf;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1120 struct { /* internal use only */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1121 struct { /* search temporaries */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1122 STRINGLIST *string; /* string(s) to search */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1123 long result; /* search result */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1124 char *text; /* cache of fetched text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1125 } search;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1126 STRING string; /* stringstruct return hack */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1127 } private;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1128 /* reserved for use by main program */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1129 void *sparep; /* spare pointer */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1130 unsigned int spare : 1; /* first spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1131 unsigned int spare2 : 1; /* second spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1132 unsigned int spare3 : 1; /* third spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1133 unsigned int spare4 : 1; /* fourth spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1134 unsigned int spare5 : 1; /* fifth spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1135 unsigned int spare6 : 1; /* sixth spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1136 unsigned int spare7 : 1; /* seventh spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1137 unsigned int spare8 : 1; /* eighth spare bit */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1138 } MAILSTREAM;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1139
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1140 /* Mail I/O stream handle */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1141
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1142 typedef struct mail_stream_handle {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1143 MAILSTREAM *stream; /* pointer to mail stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1144 unsigned short sequence; /* sequence of what we expect stream to be */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1145 } MAILHANDLE;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1146
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1147
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1148 /* Message overview */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1149
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1150 typedef struct mail_overview {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1151 char *subject; /* message subject string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1152 ADDRESS *from; /* originator address list */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1153 char *date; /* message composition date string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1154 char *message_id; /* message ID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1155 char *references; /* USENET references */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1156 struct { /* may be 0 or NUL if unknown/undefined */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1157 unsigned long octets; /* message octets (probably LF-newline form) */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1158 unsigned long lines; /* message lines */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1159 char *xref; /* cross references */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1160 } optional;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1161 } OVERVIEW;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1162
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1163 /* Network access I/O stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1164
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1165
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1166 /* Structure for network driver dispatch */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1167
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1168 #define NETDRIVER struct net_driver
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1169
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1170
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1171 /* Network transport I/O stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1172
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1173 typedef struct net_stream {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1174 void *stream; /* driver's I/O stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1175 NETDRIVER *dtb; /* network driver */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1176 } NETSTREAM;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1177
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1178
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1179 /* Network transport driver dispatch */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1180
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1181 NETDRIVER {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1182 void *(*open) (char *host,char *service,unsigned long port);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1183 void *(*aopen) (NETMBX *mb,char *service,char *usrbuf);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1184 char *(*getline) (void *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1185 long (*getbuffer) (void *stream,unsigned long size,char *buffer);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1186 long (*soutr) (void *stream,char *string);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1187 long (*sout) (void *stream,char *string,unsigned long size);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1188 void (*close) (void *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1189 char *(*host) (void *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1190 char *(*remotehost) (void *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1191 unsigned long (*port) (void *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1192 char *(*localhost) (void *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1193 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1194
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1195
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1196 /* Mailgets data identifier */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1197
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1198 typedef struct getsdata {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1199 MAILSTREAM *stream;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1200 unsigned long msgno;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1201 char *what;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1202 STRINGLIST *stl;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1203 unsigned long first;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1204 unsigned long last;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1205 long flags;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1206 } GETS_DATA;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1207
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1208
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1209 #define INIT_GETS(md,s,m,w,f,l) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1210 md.stream = s, md.msgno = m, md.what = w, md.first = f, md.last = l, \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1211 md.stl = NIL, md.flags = NIL;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1212
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1213 /* Mail delivery I/O stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1214
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1215 typedef struct send_stream {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1216 NETSTREAM *netstream; /* network I/O stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1217 char *host; /* SMTP service host */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1218 char *reply; /* last reply string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1219 long replycode; /* last reply code */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1220 unsigned int debug : 1; /* stream debug flag */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1221 unsigned int sensitive : 1; /* sensitive data in progress */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1222 unsigned int loser : 1; /* server is a loser */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1223 unsigned int saslcancel : 1; /* SASL cancelled by protocol */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1224 union { /* protocol specific */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1225 struct { /* SMTP specific */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1226 unsigned int ok : 1; /* supports ESMTP */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1227 struct { /* service extensions */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1228 unsigned int send : 1; /* supports SEND */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1229 unsigned int soml : 1; /* supports SOML */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1230 unsigned int saml : 1; /* supports SAML */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1231 unsigned int expn : 1; /* supports EXPN */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1232 unsigned int help : 1; /* supports HELP */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1233 unsigned int turn : 1; /* supports TURN */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1234 unsigned int etrn : 1; /* supports ETRN */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1235 unsigned int starttls:1;/* supports STARTTLS */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1236 unsigned int relay : 1; /* supports relaying */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1237 unsigned int pipe : 1; /* supports pipelining */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1238 unsigned int ensc : 1; /* supports enhanced status codes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1239 unsigned int bmime : 1; /* supports BINARYMIME */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1240 unsigned int chunk : 1; /* supports CHUNKING */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1241 } service;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1242 struct { /* 8-bit MIME transport */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1243 unsigned int ok : 1; /* supports 8-bit MIME */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1244 unsigned int want : 1; /* want 8-bit MIME */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1245 } eightbit;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1246 struct { /* delivery status notification */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1247 unsigned int ok : 1; /* supports DSN */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1248 unsigned int want : 1; /* want DSN */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1249 struct { /* notification options */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1250 /* notify on failure */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1251 unsigned int failure : 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1252 /* notify on delay */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1253 unsigned int delay : 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1254 /* notify on success */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1255 unsigned int success : 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1256 } notify;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1257 unsigned int full : 1; /* return full headers */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1258 char *envid; /* envelope identifier as xtext */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1259 } dsn;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1260 struct { /* size declaration */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1261 unsigned int ok : 1; /* supports SIZE */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1262 unsigned long limit; /* maximum size supported */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1263 } size;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1264 struct { /* deliverby declaration */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1265 unsigned int ok : 1; /* supports DELIVERBY */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1266 unsigned long minby; /* minimum by-time */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1267 } deliverby;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1268 struct { /* authenticated turn */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1269 unsigned int ok : 1; /* supports ATRN */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1270 char *domains; /* domains */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1271 } atrn;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1272 /* supported SASL authenticators */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1273 unsigned int auth : MAXAUTHENTICATORS;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1274 } esmtp;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1275 struct { /* NNTP specific */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1276 unsigned int post : 1; /* supports POST */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1277 struct { /* NNTP extensions */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1278 unsigned int ok : 1; /* supports extensions */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1279 /* supports LISTGROUP */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1280 unsigned int listgroup : 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1281 unsigned int over : 1; /* supports OVER */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1282 unsigned int hdr : 1; /* supports HDR */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1283 unsigned int pat : 1; /* supports PAT */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1284 /* supports STARTTLS */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1285 unsigned int starttls : 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1286 /* server has MULTIDOMAIN */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1287 unsigned int multidomain : 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1288 /* supports AUTHINFO USER */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1289 unsigned int authuser : 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1290 /* supported authenticators */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1291 unsigned int sasl : MAXAUTHENTICATORS;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1292 } ext;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1293 } nntp;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1294 } protocol;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1295 } SENDSTREAM;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1296
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1297 /* Jacket into external interfaces */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1298
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1299 typedef long (*readfn_t) (void *stream,unsigned long size,char *buffer);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1300 typedef char *(*mailgets_t) (readfn_t f,void *stream,unsigned long size,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1301 GETS_DATA *md);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1302 typedef char *(*readprogress_t) (GETS_DATA *md,unsigned long octets);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1303 typedef void *(*mailcache_t) (MAILSTREAM *stream,unsigned long msgno,long op);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1304 typedef long (*mailproxycopy_t) (MAILSTREAM *stream,char *sequence,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1305 char *mailbox,long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1306 typedef long (*tcptimeout_t) (long overall,long last);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1307 typedef void *(*authchallenge_t) (void *stream,unsigned long *len);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1308 typedef long (*authrespond_t) (void *stream,char *s,unsigned long size);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1309 typedef long (*authcheck_t) (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1310 typedef long (*authclient_t) (authchallenge_t challenger,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1311 authrespond_t responder,char *service,NETMBX *mb,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1312 void *s,unsigned long *trial,char *user);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1313 typedef char *(*authresponse_t) (void *challenge,unsigned long clen,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1314 unsigned long *rlen);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1315 typedef char *(*authserver_t) (authresponse_t responder,int argc,char *argv[]);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1316 typedef void (*smtpverbose_t) (char *buffer);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1317 typedef void (*imapenvelope_t) (MAILSTREAM *stream,unsigned long msgno,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1318 ENVELOPE *env);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1319 typedef char *(*imapreferral_t) (MAILSTREAM *stream,char *url,long code);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1320 typedef void (*overview_t) (MAILSTREAM *stream,unsigned long uid,OVERVIEW *ov,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1321 unsigned long msgno);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1322 typedef unsigned long *(*sorter_t) (MAILSTREAM *stream,char *charset,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1323 SEARCHPGM *spg,SORTPGM *pgm,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1324 typedef void (*parseline_t) (ENVELOPE *env,char *hdr,char *data,char *host);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1325 typedef ADDRESS *(*parsephrase_t) (char *phrase,char *end,char *host);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1326 typedef void *(*blocknotify_t) (int reason,void *data);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1327 typedef long (*kinit_t) (char *host,char *reason);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1328 typedef void (*sendcommand_t) (MAILSTREAM *stream,char *cmd,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1329 typedef char *(*newsrcquery_t) (MAILSTREAM *stream,char *mulname,char *name);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1330 typedef void (*getacl_t) (MAILSTREAM *stream,char *mailbox,ACLLIST *acl);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1331 typedef void (*listrights_t) (MAILSTREAM *stream,char *mailbox,char *id,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1332 char *alwaysrights,STRINGLIST *possiblerights);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1333 typedef void (*myrights_t) (MAILSTREAM *stream,char *mailbox,char *rights);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1334 typedef void (*quota_t) (MAILSTREAM *stream,char *qroot,QUOTALIST *qlist);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1335 typedef void (*quotaroot_t) (MAILSTREAM *stream,char *mbx,STRINGLIST *qroot);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1336 typedef void (*sortresults_t) (MAILSTREAM *stream,unsigned long *list,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1337 unsigned long size);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1338 typedef char *(*userprompt_t) (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1339 typedef long (*append_t) (MAILSTREAM *stream,void *data,char **flags,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1340 char **date,STRING **message);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1341 typedef void (*copyuid_t) (MAILSTREAM *stream,char *mailbox,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1342 unsigned long uidvalidity,SEARCHSET *sourceset,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1343 SEARCHSET *destset);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1344 typedef void (*appenduid_t) (char *mailbox,unsigned long uidvalidity,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1345 SEARCHSET *set);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1346 typedef long (*dirfmttest_t) (char *name);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1347 typedef long (*scancontents_t) (char *name,char *contents,unsigned long csiz,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1348 unsigned long fsiz);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1349
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1350 typedef void (*freeeltsparep_t) (void **sparep);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1351 typedef void (*freeenvelopesparep_t) (void **sparep);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1352 typedef void (*freebodysparep_t) (void **sparep);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1353 typedef void (*freestreamsparep_t) (void **sparep);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1354 typedef void *(*sslstart_t) (void *stream,char *host,unsigned long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1355 typedef long (*sslcertificatequery_t) (char *reason,char *host,char *cert);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1356 typedef void (*sslfailure_t) (char *host,char *reason,unsigned long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1357 typedef void (*logouthook_t) (void *data);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1358 typedef char *(*sslclientcert_t) (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1359 typedef char *(*sslclientkey_t) (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1360
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1361 /* Globals */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1362
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1363 extern char *body_types[]; /* defined body type strings */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1364 extern char *body_encodings[]; /* defined body encoding strings */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1365 extern const char *days[]; /* day name strings */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1366 extern const char *months[]; /* month name strings */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1367
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1368 /* Threading */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1369
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1370 /* Thread node */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1371
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1372 #define THREADNODE struct thread_node
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1373
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1374 THREADNODE {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1375 unsigned long num; /* message number */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1376 SORTCACHE *sc; /* (internal use) sortcache entry */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1377 THREADNODE *branch; /* branch at this point in tree */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1378 THREADNODE *next; /* next node */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1379 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1380
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1381 typedef void (*threadresults_t) (MAILSTREAM *stream,THREADNODE *tree);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1382
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1383
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1384 /* Thread dispatch */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1385
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1386 #define THREADER struct threader_list
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1387
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1388 THREADER {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1389 char *name; /* name of threader */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1390 THREADNODE *(*dispatch) (MAILSTREAM *stream,char *charset,SEARCHPGM *spg,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1391 long flags,sorter_t sorter);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1392 THREADER *next;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1393 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1394
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1395
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1396 /* Container for references threading */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1397
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1398 typedef void ** container_t;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1399
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1400 /* Namespaces */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1401
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1402 #define NAMESPACE struct mail_namespace
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1403
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1404 NAMESPACE {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1405 char *name; /* name of this namespace */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1406 int delimiter; /* hierarchy delimiter */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1407 PARAMETER *param; /* namespace parameters */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1408 NAMESPACE *next; /* next namespace */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1409 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1410
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1411
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1412 /* Authentication */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1413
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1414 #define AUTHENTICATOR struct mail_authenticator
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1415
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1416 AUTHENTICATOR {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1417 long flags; /* authenticator flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1418 char *name; /* name of this authenticator */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1419 authcheck_t valid; /* authenticator valid on this system */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1420 authclient_t client; /* client function that supports it */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1421 authserver_t server; /* server function that supports it */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1422 AUTHENTICATOR *next; /* next authenticator */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1423 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1424
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1425 /* Mail driver dispatch */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1426
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1427 DRIVER {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1428 char *name; /* driver name */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1429 unsigned long flags; /* driver flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1430 DRIVER *next; /* next driver */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1431 /* mailbox is valid for us */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1432 DRIVER *(*valid) (char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1433 /* manipulate driver parameters */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1434 void *(*parameters) (long function,void *value);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1435 /* scan mailboxes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1436 void (*scan) (MAILSTREAM *stream,char *ref,char *pat,char *contents);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1437 /* list mailboxes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1438 void (*list) (MAILSTREAM *stream,char *ref,char *pat);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1439 /* list subscribed mailboxes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1440 void (*lsub) (MAILSTREAM *stream,char *ref,char *pat);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1441 /* subscribe to mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1442 long (*subscribe) (MAILSTREAM *stream,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1443 /* unsubscribe from mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1444 long (*unsubscribe) (MAILSTREAM *stream,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1445 /* create mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1446 long (*create) (MAILSTREAM *stream,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1447 /* delete mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1448 long (*mbxdel) (MAILSTREAM *stream,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1449 /* rename mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1450 long (*mbxren) (MAILSTREAM *stream,char *old,char *newname);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1451 /* status of mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1452 long (*status) (MAILSTREAM *stream,char *mbx,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1453
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1454 /* open mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1455 MAILSTREAM *(*open) (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1456 /* close mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1457 void (*close) (MAILSTREAM *stream,long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1458 /* fetch message "fast" attributes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1459 void (*fast) (MAILSTREAM *stream,char *sequence,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1460 /* fetch message flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1461 void (*msgflags) (MAILSTREAM *stream,char *sequence,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1462 /* fetch message overview */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1463 long (*overview) (MAILSTREAM *stream,overview_t ofn);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1464 /* fetch message envelopes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1465 ENVELOPE *(*structure) (MAILSTREAM *stream,unsigned long msgno,BODY **body,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1466 long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1467 /* return RFC-822 header */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1468 char *(*header) (MAILSTREAM *stream,unsigned long msgno,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1469 unsigned long *length,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1470 /* return RFC-822 text */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1471 long (*text) (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1472 /* load cache */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1473 long (*msgdata) (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1474 unsigned long first,unsigned long last,STRINGLIST *lines,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1475 long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1476 /* return UID for message */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1477 unsigned long (*uid) (MAILSTREAM *stream,unsigned long msgno);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1478 /* return message number from UID */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1479 unsigned long (*msgno) (MAILSTREAM *stream,unsigned long uid);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1480 /* modify flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1481 void (*flag) (MAILSTREAM *stream,char *sequence,char *flag,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1482 /* per-message modify flags */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1483 void (*flagmsg) (MAILSTREAM *stream,MESSAGECACHE *elt);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1484 /* search for message based on criteria */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1485 long (*search) (MAILSTREAM *stream,char *charset,SEARCHPGM *pgm,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1486 /* sort messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1487 unsigned long *(*sort) (MAILSTREAM *stream,char *charset,SEARCHPGM *spg,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1488 SORTPGM *pgm,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1489 /* thread messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1490 THREADNODE *(*thread) (MAILSTREAM *stream,char *type,char *charset,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1491 SEARCHPGM *spg,long flag);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1492 /* ping mailbox to see if still alive */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1493 long (*ping) (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1494 /* check for new messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1495 void (*check) (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1496 /* expunge deleted messages */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1497 long (*expunge) (MAILSTREAM *stream,char *sequence,long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1498 /* copy messages to another mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1499 long (*copy) (MAILSTREAM *stream,char *sequence,char *mailbox,long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1500 /* append string message to mailbox */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1501 long (*append) (MAILSTREAM *stream,char *mailbox,append_t af,void *data);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1502 /* garbage collect stream */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1503 void (*gc) (MAILSTREAM *stream,long gcflags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1504 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1505
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1506
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1507 #include "linkage.h"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1508
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1509 /* Compatibility support names for old interfaces */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1510
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1511 #define GET_TRYALTFIRST GET_TRYSSLFIRST
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1512 #define SET_TRYALTFIRST SET_TRYSSLFIRST
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1513 #define GET_IMAPTRYALT GET_IMAPTRYSSL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1514 #define SET_IMAPTRYALT SET_IMAPTRYSSL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1515 #define OP_TRYALT OP_TRYSSL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1516 #define altflag sslflag
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1517
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1518 #define mail_close(stream) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1519 mail_close_full (stream,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1520 #define mail_fetchfast(stream,sequence) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1521 mail_fetch_fast (stream,sequence,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1522 #define mail_fetchfast_full mail_fetch_fast
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1523 #define mail_fetchflags(stream,sequence) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1524 mail_fetch_flags (stream,sequence,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1525 #define mail_fetchflags_full mail_fetch_flags
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1526 #define mail_fetchenvelope(stream,msgno) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1527 mail_fetch_structure (stream,msgno,NIL,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1528 #define mail_fetchstructure(stream,msgno,body) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1529 mail_fetch_structure (stream,msgno,body,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1530 #define mail_fetchstructure_full mail_fetch_structure
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1531 #define mail_fetchheader(stream,msgno) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1532 mail_fetch_header (stream,msgno,NIL,NIL,NIL,FT_PEEK)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1533 #define mail_fetchheader_full(stream,msgno,lines,len,flags) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1534 mail_fetch_header (stream,msgno,NIL,lines,len,FT_PEEK | (flags))
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1535 #define mail_fetchtext(stream,msgno) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1536 mail_fetch_text (stream,msgno,NIL,NIL,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1537 #define mail_fetchtext_full(stream,msgno,length,flags) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1538 mail_fetch_text (stream,msgno,NIL,length,flags)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1539 #define mail_fetchbody(stream,msgno,section,length) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1540 mail_fetch_body (stream,msgno,section,length,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1541 #define mail_fetchbody_full mail_fetch_body
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1542 #define mail_setflag(stream,sequence,flag) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1543 mail_flag (stream,sequence,flag,ST_SET)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1544 #define mail_setflag_full(stream,sequence,flag,flags) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1545 mail_flag (stream,sequence,flag,ST_SET | (flags))
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1546 #define mail_clearflag(stream,sequence,flag) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1547 mail_flag (stream,sequence,flag,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1548 #define mail_clearflag_full mail_flag
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1549 #define mail_search(stream,criteria) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1550 mail_search_full (stream,NIL,mail_criteria (criteria),SE_FREE);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1551 #define mail_expunge(stream) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1552 mail_expunge_full (stream,NIL,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1553 #define mail_copy(stream,sequence,mailbox) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1554 mail_copy_full (stream,sequence,mailbox,NIL)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1555 #define mail_move(stream,sequence,mailbox) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1556 mail_copy_full (stream,sequence,mailbox,CP_MOVE)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1557 #define mail_append(stream,mailbox,message) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1558 mail_append_full (stream,mailbox,NIL,NIL,message)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1559
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1560 /* Interfaces for SVR4 locking brain-damage workaround */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1561
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1562 /* Driver dispatching */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1563
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1564 #define SAFE_DELETE(dtb,stream,mailbox) (*dtb->mbxdel) (stream,mailbox)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1565 #define SAFE_RENAME(dtb,stream,old,newname) (*dtb->mbxren) (stream,old,newname)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1566 #define SAFE_STATUS(dtb,stream,mbx,flags) (*dtb->status) (stream,mbx,flags)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1567 #define SAFE_COPY(dtb,stream,sequence,mailbox,options) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1568 (*dtb->copy) (stream,sequence,mailbox,options)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1569 #define SAFE_APPEND(dtb,stream,mailbox,af,data) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1570 (*dtb->append) (stream,mailbox,af,data)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1571 #define SAFE_SCAN_CONTENTS(dtb,name,contents,csiz,fsiz) \
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1572 scan_contents (dtb,name,contents,csiz,fsiz)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1573
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1574
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1575 /* Driver callbacks */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1576
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1577 #define MM_EXISTS mm_exists
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1578 #define MM_EXPUNGED mm_expunged
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1579 #define MM_FLAGS mm_flags
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1580 #define MM_NOTIFY mm_notify
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1581 #define MM_STATUS mm_status
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1582 #define MM_LOG mm_log
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1583 #define MM_CRITICAL mm_critical
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1584 #define MM_NOCRITICAL mm_nocritical
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1585 #define MM_DISKERROR mm_diskerror
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1586 #define MM_FATAL mm_fatal
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1587 #define MM_APPEND(af) (*af)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1588
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1589 /* Function prototypes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1590
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1591 void mm_searched (MAILSTREAM *stream,unsigned long number);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1592 void mm_exists (MAILSTREAM *stream,unsigned long number);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1593 void mm_expunged (MAILSTREAM *stream,unsigned long number);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1594 void mm_flags (MAILSTREAM *stream,unsigned long number);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1595 void mm_notify (MAILSTREAM *stream,char *string,long errflg);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1596 void mm_list (MAILSTREAM *stream,int delimiter,char *name,long attributes);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1597 void mm_lsub (MAILSTREAM *stream,int delimiter,char *name,long attributes);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1598 void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1599 void mm_log (char *string,long errflg);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1600 void mm_dlog (char *string);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1601 void mm_login (NETMBX *mb,char *user,char *pwd,long trial);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1602 void mm_critical (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1603 void mm_nocritical (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1604 long mm_diskerror (MAILSTREAM *stream,long errcode,long serious);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1605 void mm_fatal (char *string);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1606 void *mm_cache (MAILSTREAM *stream,unsigned long msgno,long op);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1607
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1608 extern STRINGDRIVER mail_string;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1609 void mail_versioncheck (char *version);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1610 void mail_link (DRIVER *driver);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1611 void *mail_parameters (MAILSTREAM *stream,long function,void *value);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1612 DRIVER *mail_valid (MAILSTREAM *stream,char *mailbox,char *purpose);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1613 DRIVER *mail_valid_net (char *name,DRIVER *drv,char *host,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1614 long mail_valid_net_parse (char *name,NETMBX *mb);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1615 long mail_valid_net_parse_work (char *name,NETMBX *mb,char *service);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1616 void mail_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1617 void mail_list (MAILSTREAM *stream,char *ref,char *pat);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1618 void mail_lsub (MAILSTREAM *stream,char *ref,char *pat);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1619 long mail_subscribe (MAILSTREAM *stream,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1620 long mail_unsubscribe (MAILSTREAM *stream,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1621 long mail_create (MAILSTREAM *stream,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1622 long mail_delete (MAILSTREAM *stream,char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1623 long mail_rename (MAILSTREAM *stream,char *old,char *newname);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1624 char *mail_utf7_valid (char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1625 long mail_status (MAILSTREAM *stream,char *mbx,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1626 long mail_status_default (MAILSTREAM *stream,char *mbx,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1627 MAILSTREAM *mail_open (MAILSTREAM *stream,char *name,long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1628 MAILSTREAM *mail_open_work (DRIVER *d,MAILSTREAM *stream,char *name,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1629 long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1630 MAILSTREAM *mail_close_full (MAILSTREAM *stream,long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1631 MAILHANDLE *mail_makehandle (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1632 void mail_free_handle (MAILHANDLE **handle);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1633 MAILSTREAM *mail_stream (MAILHANDLE *handle);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1634
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1635 void mail_fetch_fast (MAILSTREAM *stream,char *sequence,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1636 void mail_fetch_flags (MAILSTREAM *stream,char *sequence,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1637 void mail_fetch_overview (MAILSTREAM *stream,char *sequence,overview_t ofn);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1638 void mail_fetch_overview_sequence (MAILSTREAM *stream,char *sequence,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1639 overview_t ofn);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1640 void mail_fetch_overview_default (MAILSTREAM *stream,overview_t ofn);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1641 ENVELOPE *mail_fetch_structure (MAILSTREAM *stream,unsigned long msgno,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1642 BODY **body,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1643 char *mail_fetch_message (MAILSTREAM *stream,unsigned long msgno,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1644 unsigned long *len,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1645 char *mail_fetch_header (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1646 STRINGLIST *lines,unsigned long *len,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1647 char *mail_fetch_text (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1648 unsigned long *len,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1649 char *mail_fetch_mime (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1650 unsigned long *len,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1651 char *mail_fetch_body (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1652 unsigned long *len,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1653 long mail_partial_text (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1654 unsigned long first,unsigned long last,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1655 long mail_partial_body (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1656 unsigned long first,unsigned long last,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1657 char *mail_fetch_text_return (GETS_DATA *md,SIZEDTEXT *t,unsigned long *len);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1658 char *mail_fetch_string_return (GETS_DATA *md,STRING *bs,unsigned long i,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1659 unsigned long *len,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1660 long mail_read (void *stream,unsigned long size,char *buffer);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1661 unsigned long mail_uid (MAILSTREAM *stream,unsigned long msgno);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1662 unsigned long mail_msgno (MAILSTREAM *stream,unsigned long uid);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1663 void mail_fetchfrom (char *s,MAILSTREAM *stream,unsigned long msgno,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1664 long length);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1665 void mail_fetchsubject (char *s,MAILSTREAM *stream,unsigned long msgno,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1666 long length);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1667 MESSAGECACHE *mail_elt (MAILSTREAM *stream,unsigned long msgno);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1668 void mail_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1669 long mail_search_full (MAILSTREAM *stream,char *charset,SEARCHPGM *pgm,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1670 long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1671 long mail_search_default (MAILSTREAM *stream,char *charset,SEARCHPGM *pgm,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1672 long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1673 long mail_ping (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1674 void mail_check (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1675 long mail_expunge_full (MAILSTREAM *stream,char *sequence,long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1676 long mail_copy_full (MAILSTREAM *stream,char *sequence,char *mailbox,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1677 long options);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1678 long mail_append_full (MAILSTREAM *stream,char *mailbox,char *flags,char *date,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1679 STRING *message);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1680 long mail_append_multiple (MAILSTREAM *stream,char *mailbox,append_t af,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1681 void *data);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1682 void mail_gc (MAILSTREAM *stream,long gcflags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1683 void mail_gc_msg (MESSAGE *msg,long gcflags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1684 void mail_gc_body (BODY *body);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1685
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1686 BODY *mail_body (MAILSTREAM *stream,unsigned long msgno,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1687 unsigned char *section);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1688 char *mail_date (char *string,MESSAGECACHE *elt);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1689 char *mail_cdate (char *string,MESSAGECACHE *elt);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1690 long mail_parse_date (MESSAGECACHE *elt,unsigned char *string);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1691 void mail_exists (MAILSTREAM *stream,unsigned long nmsgs);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1692 void mail_recent (MAILSTREAM *stream,unsigned long recent);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1693 void mail_expunged (MAILSTREAM *stream,unsigned long msgno);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1694 void mail_lock (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1695 void mail_unlock (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1696 void mail_debug (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1697 void mail_nodebug (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1698 void mail_dlog (char *string,long flag);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1699 long mail_match_lines (STRINGLIST *lines,STRINGLIST *msglines,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1700 unsigned long mail_filter (char *text,unsigned long len,STRINGLIST *lines,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1701 long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1702 long mail_search_msg (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1703 SEARCHPGM *pgm);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1704 long mail_search_header_text (char *s,STRINGLIST *st);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1705 long mail_search_header (SIZEDTEXT *hdr,STRINGLIST *st);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1706 long mail_search_text (MAILSTREAM *stream,unsigned long msgno,char *section,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1707 STRINGLIST *st,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1708 long mail_search_body (MAILSTREAM *stream,unsigned long msgno,BODY *body,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1709 char *prefix,unsigned long section,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1710 long mail_search_string (SIZEDTEXT *s,char *charset,STRINGLIST **st);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1711 long mail_search_string_work (SIZEDTEXT *s,STRINGLIST **st);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1712 long mail_search_keyword (MAILSTREAM *stream,MESSAGECACHE *elt,STRINGLIST *st,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1713 long flag);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1714 long mail_search_addr (ADDRESS *adr,STRINGLIST *st);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1715 char *mail_search_gets (readfn_t f,void *stream,unsigned long size,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1716 GETS_DATA *md);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1717 SEARCHPGM *mail_criteria (char *criteria);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1718 int mail_criteria_date (unsigned short *date,char **r);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1719 int mail_criteria_string (STRINGLIST **s,char **r);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1720 unsigned short mail_shortdate (unsigned int year,unsigned int month,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1721 unsigned int day);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1722 SEARCHSET *mail_parse_set (char *s,char **ret);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1723 SEARCHSET *mail_append_set (SEARCHSET *set,unsigned long msgno);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1724 unsigned long *mail_sort (MAILSTREAM *stream,char *charset,SEARCHPGM *spg,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1725 SORTPGM *pgm,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1726 unsigned long *mail_sort_cache (MAILSTREAM *stream,SORTPGM *pgm,SORTCACHE **sc,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1727 long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1728 unsigned long *mail_sort_msgs (MAILSTREAM *stream,char *charset,SEARCHPGM *spg,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1729 SORTPGM *pgm,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1730 SORTCACHE **mail_sort_loadcache (MAILSTREAM *stream,SORTPGM *pgm);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1731 unsigned int mail_strip_subject (char *t,char **ret);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1732 char *mail_strip_subject_wsp (char *s);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1733 char *mail_strip_subject_blob (char *s);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1734 int mail_sort_compare (const void *a1,const void *a2);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1735 unsigned long mail_longdate (MESSAGECACHE *elt);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1736 THREADNODE *mail_thread (MAILSTREAM *stream,char *type,char *charset,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1737 SEARCHPGM *spg,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1738 THREADNODE *mail_thread_msgs (MAILSTREAM *stream,char *type,char *charset,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1739 SEARCHPGM *spg,long flags,sorter_t sorter);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1740 THREADNODE *mail_thread_orderedsubject (MAILSTREAM *stream,char *charset,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1741 SEARCHPGM *spg,long flags,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1742 sorter_t sorter);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1743 THREADNODE *mail_thread_references (MAILSTREAM *stream,char *charset,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1744 SEARCHPGM *spg,long flags,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1745 sorter_t sorter);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1746 void mail_thread_loadcache (MAILSTREAM *stream,unsigned long uid,OVERVIEW *ov,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1747 unsigned long msgno);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1748 char *mail_thread_parse_msgid (char *s,char **ss);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1749 STRINGLIST *mail_thread_parse_references (char *s,long flag);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1750 long mail_thread_check_child (container_t mother,container_t daughter);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1751 container_t mail_thread_prune_dummy (container_t msg,container_t ane);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1752 container_t mail_thread_prune_dummy_work (container_t msg,container_t ane);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1753 THREADNODE *mail_thread_c2node (MAILSTREAM *stream,container_t con,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1754 THREADNODE *mail_thread_sort (THREADNODE *thr,THREADNODE **tc);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1755 int mail_thread_compare_date (const void *a1,const void *a2);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1756 long mail_sequence (MAILSTREAM *stream,unsigned char *sequence);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1757 long mail_uid_sequence (MAILSTREAM *stream,unsigned char *sequence);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1758 long mail_parse_flags (MAILSTREAM *stream,char *flag,unsigned long *uf);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1759 long mail_usable_network_stream (MAILSTREAM *stream,char *name);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1760
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1761 MESSAGECACHE *mail_new_cache_elt (unsigned long msgno);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1762 ENVELOPE *mail_newenvelope (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1763 ADDRESS *mail_newaddr (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1764 BODY *mail_newbody (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1765 BODY *mail_initbody (BODY *body);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1766 PARAMETER *mail_newbody_parameter (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1767 PART *mail_newbody_part (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1768 MESSAGE *mail_newmsg (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1769 STRINGLIST *mail_newstringlist (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1770 SEARCHPGM *mail_newsearchpgm (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1771 SEARCHHEADER *mail_newsearchheader (char *line,char *text);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1772 SEARCHSET *mail_newsearchset (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1773 SEARCHOR *mail_newsearchor (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1774 SEARCHPGMLIST *mail_newsearchpgmlist (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1775 SORTPGM *mail_newsortpgm (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1776 THREADNODE *mail_newthreadnode (SORTCACHE *sc);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1777 ACLLIST *mail_newacllist (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1778 QUOTALIST *mail_newquotalist (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1779 void mail_free_body (BODY **body);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1780 void mail_free_body_data (BODY *body);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1781 void mail_free_body_parameter (PARAMETER **parameter);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1782 void mail_free_body_part (PART **part);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1783 void mail_free_cache (MAILSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1784 void mail_free_elt (MESSAGECACHE **elt);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1785 void mail_free_envelope (ENVELOPE **env);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1786 void mail_free_address (ADDRESS **address);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1787 void mail_free_stringlist (STRINGLIST **string);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1788 void mail_free_searchpgm (SEARCHPGM **pgm);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1789 void mail_free_searchheader (SEARCHHEADER **hdr);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1790 void mail_free_searchset (SEARCHSET **set);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1791 void mail_free_searchor (SEARCHOR **orl);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1792 void mail_free_searchpgmlist (SEARCHPGMLIST **pgl);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1793 void mail_free_namespace (NAMESPACE **n);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1794 void mail_free_sortpgm (SORTPGM **pgm);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1795 void mail_free_threadnode (THREADNODE **thr);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1796 void mail_free_acllist (ACLLIST **al);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1797 void mail_free_quotalist (QUOTALIST **ql);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1798 void auth_link (AUTHENTICATOR *auth);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1799 char *mail_auth (char *mechanism,authresponse_t resp,int argc,char *argv[]);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1800 AUTHENTICATOR *mail_lookup_auth (unsigned long i);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1801 unsigned int mail_lookup_auth_name (char *mechanism,long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1802
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1803 NETSTREAM *net_open (NETMBX *mb,NETDRIVER *dv,unsigned long port,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1804 NETDRIVER *ssld,char *ssls,unsigned long sslp);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1805 NETSTREAM *net_open_work (NETDRIVER *dv,char *host,char *service,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1806 unsigned long port,unsigned long portoverride,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1807 unsigned long flags);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1808 NETSTREAM *net_aopen (NETDRIVER *dv,NETMBX *mb,char *service,char *usrbuf);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1809 char *net_getline (NETSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1810 /* stream must be void* for use as readfn_t */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1811 long net_getbuffer (void *stream,unsigned long size,char *buffer);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1812 long net_soutr (NETSTREAM *stream,char *string);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1813 long net_sout (NETSTREAM *stream,char *string,unsigned long size);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1814 void net_close (NETSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1815 char *net_host (NETSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1816 char *net_remotehost (NETSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1817 unsigned long net_port (NETSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1818 char *net_localhost (NETSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1819
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1820 long sm_subscribe (char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1821 long sm_unsubscribe (char *mailbox);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1822 char *sm_read (void **sdb);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1823
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1824 void ssl_onceonlyinit (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1825 char *ssl_start_tls (char *s);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1826 void ssl_server_init (char *server);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1827
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1828
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1829 /* Server I/O functions */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1830
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1831 int PBIN (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1832 char *PSIN (char *s,int n);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1833 long PSINR (char *s,unsigned long n);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1834 int PBOUT (int c);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1835 long INWAIT (long seconds);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1836 int PSOUT (char *s);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1837 int PSOUTR (SIZEDTEXT *s);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1838 int PFLUSH (void);

yatex.org