1 | /*
|
---|
2 | * Copyright 2006 Robert Shearman for CodeWeavers
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | import "imnact.idl";
|
---|
29 |
|
---|
30 | interface IInternetTransport;
|
---|
31 | interface ISMTPTransport;
|
---|
32 | interface IPOP3Transport;
|
---|
33 | interface IIMAPTransport;
|
---|
34 |
|
---|
35 | /* CLSIDs */
|
---|
36 |
|
---|
37 | cpp_quote("DEFINE_GUID(CLSID_IInternetMessageUrl, 0xca30cc91, 0xb1b3, 0x11d0, 0x85, 0xd0, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
|
---|
38 | cpp_quote("DEFINE_GUID(CLSID_ISMTPTransport, 0xfd853ce6, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
|
---|
39 | cpp_quote("DEFINE_GUID(CLSID_ISMTPTransport2, 0xdf2c7eC, 0x3435, 0x11d0, 0x81, 0xd0, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
|
---|
40 | cpp_quote("DEFINE_GUID(CLSID_IPOP3Transport, 0xfd853ce7, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
|
---|
41 | cpp_quote("DEFINE_GUID(CLSID_INNTPTransport, 0xfd853ce8, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
|
---|
42 | cpp_quote("DEFINE_GUID(CLSID_IRASTransport, 0xfd853ce9, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
|
---|
43 | cpp_quote("DEFINE_GUID(CLSID_IRangeList, 0xfd853cea, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
|
---|
44 | cpp_quote("DEFINE_GUID(CLSID_IIMAPTransport, 0xfd853ceb, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
|
---|
45 | cpp_quote("DEFINE_GUID(CLSID_IHTTPMailTransport, 0x5a580c11, 0xe5eb, 0x11d1, 0xa8, 0x6e, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);")
|
---|
46 | cpp_quote("DEFINE_GUID(CLSID_IPropFindRequest, 0xbb847b8a, 0x054a, 0x11d2, 0xa8, 0x94, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);")
|
---|
47 | cpp_quote("DEFINE_GUID(CLSID_IPropPatchRequest, 0xea678830, 0x235d, 0x11d2, 0xa8, 0xb6, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);")
|
---|
48 |
|
---|
49 | /* Error Codes */
|
---|
50 |
|
---|
51 | cpp_quote("#ifndef HR_E")
|
---|
52 | cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)")
|
---|
53 | cpp_quote("#endif")
|
---|
54 | cpp_quote("#ifndef HR_S")
|
---|
55 | cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)")
|
---|
56 | cpp_quote("#endif")
|
---|
57 |
|
---|
58 | /* General Error Codes */
|
---|
59 | cpp_quote("#define IXP_E_LOAD_SICILY_FAILED HR_E(0xCC00)")
|
---|
60 | cpp_quote("#define IXP_E_INVALID_CERT_CN HR_E(0xCC01)")
|
---|
61 | cpp_quote("#define IXP_E_INVALID_CERT_DATE HR_E(0xCC02)")
|
---|
62 | cpp_quote("#define IXP_E_ALREADY_CONNECTED HR_E(0xCC03)")
|
---|
63 | cpp_quote("#define IXP_E_CONN HR_E(0xCC04)")
|
---|
64 | cpp_quote("#define IXP_E_NOT_CONNECTED HR_E(0xCC05)")
|
---|
65 | cpp_quote("#define IXP_E_CONN_SEND HR_E(0xCC06)")
|
---|
66 | cpp_quote("#define IXP_E_WOULD_BLOCK HR_E(0xCC07)")
|
---|
67 | cpp_quote("#define IXP_E_INVALID_STATE HR_E(0xCC08)")
|
---|
68 | cpp_quote("#define IXP_E_CONN_RECV HR_E(0xCC09)")
|
---|
69 | cpp_quote("#define IXP_E_INCOMPLETE HR_E(0xCC0A)")
|
---|
70 | cpp_quote("#define IXP_E_BUSY HR_E(0xCC0B)")
|
---|
71 | cpp_quote("#define IXP_E_NOT_INIT HR_E(0xCC0C)")
|
---|
72 | cpp_quote("#define IXP_E_CANT_FIND_HOST HR_E(0xCC0D)")
|
---|
73 | cpp_quote("#define IXP_E_FAILED_TO_CONNECT HR_E(0xCC0E)")
|
---|
74 | cpp_quote("#define IXP_E_CONNECTION_DROPPED HR_E(0xCC0F)")
|
---|
75 | cpp_quote("#define IXP_E_INVALID_ADDRESS HR_E(0xCC10)")
|
---|
76 | cpp_quote("#define IXP_E_INVALID_ADDRESS_LIST HR_E(0xCC11)")
|
---|
77 | cpp_quote("#define IXP_E_SOCKET_READ_ERROR HR_E(0xCC12)")
|
---|
78 | cpp_quote("#define IXP_E_SOCKET_WRITE_ERROR HR_E(0xCC13)")
|
---|
79 | cpp_quote("#define IXP_E_SCOKET_INIT_ERROR HR_E(0xCC14)")
|
---|
80 | cpp_quote("#define IXP_E_SOCKET_CONNECT_ERROR HR_E(0xCC15)")
|
---|
81 | cpp_quote("#define IXP_E_INVALID_ACCOUNT HR_E(0xCC16)")
|
---|
82 | cpp_quote("#define IXP_E_USER_CANCEL HR_E(0xCC17)")
|
---|
83 | cpp_quote("#define IXP_E_SICILY_LOGON_FAILED HR_E(0xCC18)")
|
---|
84 | cpp_quote("#define IXP_E_TIMEOUT HR_E(0xCC19)")
|
---|
85 | cpp_quote("#define IXP_E_SECURE_CONNECT_FAILED HR_E(0xCC1A)")
|
---|
86 |
|
---|
87 | /* SMTP Failure Statuses */
|
---|
88 | cpp_quote("#define IXP_E_SMTP_RESPONSE_ERROR HR_E(0xCC60)")
|
---|
89 | cpp_quote("#define IXP_E_SMTP_UNKNOWN_RESPONSE_CODE HR_E(0xCC61)")
|
---|
90 | cpp_quote("#define IXP_E_SMTP_500_SYNTAX_ERROR HR_E(0xCC62)")
|
---|
91 | cpp_quote("#define IXP_E_SMTP_501_PARAM_SYNTAX HR_E(0xCC63)")
|
---|
92 | cpp_quote("#define IXP_E_SMTP_502_COMMAND_NOTIMPL HR_E(0xCC64)")
|
---|
93 | cpp_quote("#define IXP_E_SMTP_503_COMMAND_SEQ HR_E(0xCC65)")
|
---|
94 | cpp_quote("#define IXP_E_SMTP_504_COMMAND_PARAM_NOTIMPL HR_E(0xCC66)")
|
---|
95 | cpp_quote("#define IXP_E_SMTP_421_NOT_AVAILABLE HR_E(0xCC67)")
|
---|
96 | cpp_quote("#define IXP_E_SMTP_450_MAILBOX_BUSY HR_E(0xCC68)")
|
---|
97 | cpp_quote("#define IXP_E_SMTP_550_MAILBOX_NOT_FOUND HR_E(0xCC69)")
|
---|
98 | cpp_quote("#define IXP_E_SMTP_451_ERROR_PROCESSING HR_E(0xCC6A)")
|
---|
99 | cpp_quote("#define IXP_E_SMTP_551_USER_NOT_LOCAL HR_E(0xCC6B)")
|
---|
100 | cpp_quote("#define IXP_E_SMTP_452_NO_SYSTEM_STORAGE HR_E(0xCC6C)")
|
---|
101 | cpp_quote("#define IXP_E_SMTP_552_STORAGE_OVERFLOW HR_E(0xCC6D)")
|
---|
102 | cpp_quote("#define IXP_E_SMTP_553_MAILBOX_NAME_SYNTAX HR_E(0xCC6E)")
|
---|
103 | cpp_quote("#define IXP_E_SMTP_554_TRANSACT_FAILED HR_E(0xCC6F)")
|
---|
104 |
|
---|
105 | /* SMTP Success Statuses */
|
---|
106 | cpp_quote("#define IXP_E_SMTP_211_SYSTEM_STATUS HR_S(0xCC70)")
|
---|
107 | cpp_quote("#define IXP_E_SMTP_214_HELP_MESSAGE HR_S(0xCC71)")
|
---|
108 | cpp_quote("#define IXP_E_SMTP_220_READY HR_S(0xCC72)")
|
---|
109 | cpp_quote("#define IXP_E_SMTP_221_CLOSING HR_S(0xCC73)")
|
---|
110 | cpp_quote("#define IXP_E_SMTP_250_MAIL_ACTION_OKAY HR_S(0xCC74)")
|
---|
111 | cpp_quote("#define IXP_E_SMTP_251_FORWARDING_MAIL HR_S(0xCC75)")
|
---|
112 | cpp_quote("#define IXP_E_SMTP_354_START_MAIL_INPUT HR_S(0xCC76)")
|
---|
113 | cpp_quote("#define IXP_E_SMTP_CONTINUE HR_S(0xCC77)")
|
---|
114 | cpp_quote("#define IXP_E_SMTP_334_AUTH_READY_RESPONSE HR_S(0xCC78)")
|
---|
115 | cpp_quote("#define IXP_E_SMTP_245_AUTH_SUCCESS HR_S(0xCC79)")
|
---|
116 |
|
---|
117 | /* More SMTP Failure Statuses */
|
---|
118 | cpp_quote("#define IXP_E_SMTP_REJECTED_SENDER HR_E(0xCC78)")
|
---|
119 | cpp_quote("#define IXP_E_SMTP_REJECTED_RECIPIENTS HR_E(0xCC79)")
|
---|
120 | cpp_quote("#define IXP_E_SMTP_NO_SENDER HR_E(0xCC7A)")
|
---|
121 | cpp_quote("#define IXP_E_SMTP_NO_RECIPIENTS HR_E(0xCC7B)")
|
---|
122 | cpp_quote("#define IXP_E_SMTP_530_STARTTLS_REQUIRED HR_E(0xCC7C)")
|
---|
123 | cpp_quote("#define IXP_E_SMTP_NO_STARTTLS_SUPPORT HR_E(0xCC7D)")
|
---|
124 | cpp_quote("#define IXP_E_SMTP_NO_DSN_SUPPORT HR_E(0xCC7E)")
|
---|
125 | cpp_quote("#define IXP_E_SMTP_454_STARTTLS_FAILED HR_E(0xCC7F)")
|
---|
126 |
|
---|
127 | const SHORT CCHMAX_DOMAIN = 256;
|
---|
128 | const SHORT CCHMAX_PHONE_NUMBER = 128;
|
---|
129 |
|
---|
130 | const DWORD DEFAULT_IMAP_PORT = 143;
|
---|
131 | const DWORD DEFAULT_POP3_PORT = 110;
|
---|
132 | const DWORD DEFAULT_SMTP_PORT = 25;
|
---|
133 | const DWORD DEFAULT_NNTP_PORT = 119;
|
---|
134 |
|
---|
135 | typedef enum tagINETADDRTYPE
|
---|
136 | {
|
---|
137 | ADDR_TO,
|
---|
138 | ADDR_FROM,
|
---|
139 | ADDR_DSN_NEVER = 16,
|
---|
140 | ADDR_DSN_SUCCESS = 32,
|
---|
141 | ADDR_DSN_FAILURE = 64,
|
---|
142 | ADDR_DSN_DELAY = 128
|
---|
143 | } INETADDRTYPE;
|
---|
144 |
|
---|
145 | const DWORD ADDR_TOFROM_MASK = 0x1;
|
---|
146 | const DWORD ADDR_DSN_MASK = 0xf0;
|
---|
147 |
|
---|
148 | typedef enum tagDSNRET
|
---|
149 | {
|
---|
150 | DSNRET_DEFAULT,
|
---|
151 | DSNRET_HDRS,
|
---|
152 | DSNRET_FULL,
|
---|
153 | } DSNRET;
|
---|
154 |
|
---|
155 | typedef struct tagINETADDR
|
---|
156 | {
|
---|
157 | INETADDRTYPE addrtype;
|
---|
158 | CHAR szEmail[CCHMAX_EMAIL_ADDRESS];
|
---|
159 | } INETADDR, *LPINETADDR;
|
---|
160 |
|
---|
161 | typedef struct tagINETADDRLIST
|
---|
162 | {
|
---|
163 | ULONG cAddress;
|
---|
164 | LPINETADDR prgAddress;
|
---|
165 | } INETADDRLIST, *LPINETADDRLIST;
|
---|
166 |
|
---|
167 | typedef enum tagRASCONNTYPE
|
---|
168 | {
|
---|
169 | RAS_CONNECT_LAN,
|
---|
170 | RAS_CONNECT_MANUAL,
|
---|
171 | RAS_CONNECT_RAS
|
---|
172 | } RASCONNTYPE;
|
---|
173 |
|
---|
174 | typedef enum tagHTTPMAILPROPTYPE
|
---|
175 | {
|
---|
176 | HTTPMAIL_PROP_INVALID,
|
---|
177 | HTTPMAIL_PROP_ADBAR,
|
---|
178 | HTTPMAIL_PROP_CONTACTS,
|
---|
179 | HTTPMAIL_PROP_INBOX,
|
---|
180 | HTTPMAIL_PROP_OUTBOX,
|
---|
181 | HTTPMAIL_PROP_SENDMSG,
|
---|
182 | HTTPMAIL_PROP_SENTITEMS,
|
---|
183 | HTTPMAIL_PROP_DELETEDITEMS,
|
---|
184 | HTTPMAIL_PROP_DRAFTS,
|
---|
185 | HTTPMAIL_PROP_MSGFOLDERROOT,
|
---|
186 | HTTPMAIL_PROP_SIG,
|
---|
187 | HTTPMAIL_PROP_LAST
|
---|
188 | } HTTPMAILPROPTYPE;
|
---|
189 |
|
---|
190 | typedef enum tagHTTPMAILSPECIALFOLDER
|
---|
191 | {
|
---|
192 | HTTPMAIL_SF_NONE,
|
---|
193 | HTTPMAIL_SF_UNRECOGNIZED,
|
---|
194 | HTTPMAIL_SF_INBOX,
|
---|
195 | HTTPMAIL_SF_DELETEDITEMS,
|
---|
196 | HTTPMAIL_SF_DRAFTS,
|
---|
197 | HTTPMAIL_SF_OUTBOX,
|
---|
198 | HTTPMAIL_SF_SENTITEMS,
|
---|
199 | HTTPMAIL_SF_CONTACTS,
|
---|
200 | HTTPMAIL_SF_CALENDAR,
|
---|
201 | HTTPMAIL_SF_MSNPROMO,
|
---|
202 | HTTPMAIL_SF_LAST
|
---|
203 | } HTTPMAILSPECIALFOLDER;
|
---|
204 |
|
---|
205 | typedef enum tagHTTPMAILCONTACTTYPE
|
---|
206 | {
|
---|
207 | HTTPMAIL_CT_CONTACT,
|
---|
208 | HTTPMAIL_CT_GROUP,
|
---|
209 | HTTPMAIL_CT_LAST
|
---|
210 | } HTTPMAILCONTACTTYPE;
|
---|
211 |
|
---|
212 | const DWORD DAVNAMESPACE_UNKNOWN = 0xFFFFFFFF;
|
---|
213 | const DWORD DAVNAMESPACE_DAV = 0;
|
---|
214 | const DWORD DAVNAMESPACE_HOTMAIL = 1;
|
---|
215 | const DWORD DAVNAMESPACE_HTTPMAIL = 2;
|
---|
216 | const DWORD DAVNAMESPACE_MAIL = 3;
|
---|
217 | const DWORD DAVNAMESPACE_CONTACTS = 4;
|
---|
218 |
|
---|
219 | cpp_quote("#define ISF_SMTP_USEIPFORHELO 0x01")
|
---|
220 | cpp_quote("#define ISF_ALWAYSPROMPTFORPASSWORD 0x02")
|
---|
221 | /* for SMTP - send EHLO and use STARTTLS if available: */
|
---|
222 | cpp_quote("#define ISF_SSLONSAMEPORT 0x04")
|
---|
223 | cpp_quote("#define ISF_QUERYDSNSUPPORT 0x08")
|
---|
224 | /* for SMTP - send EHLO and use AUTH if available: */
|
---|
225 | cpp_quote("#define ISF_QUERYAUTHSUPPORT 0x10")
|
---|
226 |
|
---|
227 | typedef struct INETSERVER
|
---|
228 | {
|
---|
229 | CHAR szAccount[CCHMAX_ACCOUNT_NAME];
|
---|
230 | CHAR szUserName[CCHMAX_USERNAME];
|
---|
231 | CHAR szPassword[CCHMAX_PASSWORD];
|
---|
232 | CHAR szServerName[CCHMAX_SERVER_NAME];
|
---|
233 | CHAR szConnectoid[CCHMAX_CONNECTOID];
|
---|
234 | RASCONNTYPE rasconntype;
|
---|
235 | DWORD dwPort;
|
---|
236 | BOOL fSSL;
|
---|
237 | BOOL fTrySicily;
|
---|
238 | DWORD dwTimeout;
|
---|
239 | DWORD dwFlags;
|
---|
240 | } INETSERVER, *LPINETSERVER;
|
---|
241 |
|
---|
242 | typedef enum tagIXPTYPE
|
---|
243 | {
|
---|
244 | IXP_NNTP,
|
---|
245 | IXP_SMTP,
|
---|
246 | IXP_POP3,
|
---|
247 | IXP_IMAP,
|
---|
248 | IXP_RAS,
|
---|
249 | IXP_HTTPMail
|
---|
250 | } IXPTYPE;
|
---|
251 |
|
---|
252 | typedef enum tagIXPSTATUS
|
---|
253 | {
|
---|
254 | IXP_FINDINGHOST,
|
---|
255 | IXP_CONNECTING,
|
---|
256 | IXP_SECURING,
|
---|
257 | IXP_CONNECTED,
|
---|
258 | IXP_AUTHORIZING,
|
---|
259 | IXP_AUTHRETRY,
|
---|
260 | IXP_AUTHORIZED,
|
---|
261 | IXP_DISCONNECTING,
|
---|
262 | IXP_DISCONNECTED,
|
---|
263 | IXP_LAST
|
---|
264 | } IXPSTATUS;
|
---|
265 |
|
---|
266 | const DWORD DEPTH_INFINITY = 0xFFFFFFFE;
|
---|
267 |
|
---|
268 | typedef DWORD MEMBERINFOFLAGS;
|
---|
269 |
|
---|
270 | const MEMBERINFOFLAGS HTTP_MEMBERINFO_COMMONPROPS = 0x0;
|
---|
271 | const MEMBERINFOFLAGS HTTP_MEMBERINFO_FOLDERPROPS = 0x1;
|
---|
272 | const MEMBERINFOFLAGS HTTP_MEMBERINFO_MESSAGEPROPS = 0x2;
|
---|
273 | const MEMBERINFOFLAGS HTTP_MEMBERINFO_ALLPROPS = HTTP_MEMBERINFO_FOLDERPROPS | HTTP_MEMBERINFO_MESSAGEPROPS;
|
---|
274 |
|
---|
275 | typedef DWORD IMAP_MSGFLAGS;
|
---|
276 |
|
---|
277 | const IMAP_MSGFLAGS IMAP_MSG_NOFLAGS = 0x00;
|
---|
278 | const IMAP_MSGFLAGS IMAP_MSG_ANSWERED = 0x01;
|
---|
279 | const IMAP_MSGFLAGS IMAP_MSG_FLAGGED = 0x02;
|
---|
280 | const IMAP_MSGFLAGS IMAP_MSG_DELETED = 0x04;
|
---|
281 | const IMAP_MSGFLAGS IMAP_MSG_SEEN = 0x08;
|
---|
282 | const IMAP_MSGFLAGS IMAP_MSG_DRAFT = 0x10;
|
---|
283 | const IMAP_MSGFLAGS IMAP_MSG_ALLFLAGS = 0x1f;
|
---|
284 |
|
---|
285 | [
|
---|
286 | object,
|
---|
287 | uuid(CA30F3FF-C9AC-11D1-9A3A-00C04FA309D4),
|
---|
288 | local
|
---|
289 | ]
|
---|
290 | interface ITransportCallbackService : IUnknown
|
---|
291 | {
|
---|
292 | HRESULT GetParentWindow(
|
---|
293 | [in] DWORD dwReserved,
|
---|
294 | [out] HWND *phwndParent);
|
---|
295 |
|
---|
296 | HRESULT GetAccount(
|
---|
297 | [out] LPDWORD pdwServerType,
|
---|
298 | [out] IImnAccount **ppAccount);
|
---|
299 | }
|
---|
300 |
|
---|
301 | [
|
---|
302 | object,
|
---|
303 | uuid(0DF2C7E1-3435-11D0-81D0-00C04FD85AB4),
|
---|
304 | local
|
---|
305 | ]
|
---|
306 | interface ITransportCallback : IUnknown
|
---|
307 | {
|
---|
308 | typedef struct tagIXPRESULT
|
---|
309 | {
|
---|
310 | HRESULT hrResult;
|
---|
311 | LPSTR pszResponse;
|
---|
312 | UINT uiServerError;
|
---|
313 | HRESULT hrServerError;
|
---|
314 | DWORD dwSocketError;
|
---|
315 | LPSTR pszProblem;
|
---|
316 | } IXPRESULT, *LPIXPRESULT;
|
---|
317 |
|
---|
318 | typedef enum tagCMDTYPE
|
---|
319 | {
|
---|
320 | CMD_SEND,
|
---|
321 | CMD_RESP
|
---|
322 | } CMDTYPE;
|
---|
323 |
|
---|
324 | HRESULT OnTimeout(
|
---|
325 | [in,out] DWORD *pdwTimeout,
|
---|
326 | [in] IInternetTransport *pTransport);
|
---|
327 |
|
---|
328 | HRESULT OnLogonPrompt(
|
---|
329 | [in,out] LPINETSERVER pInetServer,
|
---|
330 | [in] IInternetTransport *pTransport);
|
---|
331 |
|
---|
332 | INT OnPrompt(
|
---|
333 | [in] HRESULT hrError,
|
---|
334 | [in] LPCSTR pszText,
|
---|
335 | [in] LPCSTR pszCaption,
|
---|
336 | [in] UINT uType,
|
---|
337 | [in] IInternetTransport *pTransport);
|
---|
338 |
|
---|
339 | HRESULT OnStatus(
|
---|
340 | [in] IXPSTATUS ixpstatus,
|
---|
341 | [in] IInternetTransport *pTransport);
|
---|
342 |
|
---|
343 | HRESULT OnError(
|
---|
344 | [in] IXPSTATUS ixpstatus,
|
---|
345 | [in] LPIXPRESULT pResult,
|
---|
346 | [in] IInternetTransport *pTransport);
|
---|
347 |
|
---|
348 | HRESULT OnCommand(
|
---|
349 | [in] CMDTYPE cmdtype,
|
---|
350 | [in] LPSTR pszLine,
|
---|
351 | [in] HRESULT hrResponse,
|
---|
352 | [in] IInternetTransport *pTransport);
|
---|
353 | }
|
---|
354 |
|
---|
355 | [
|
---|
356 | object,
|
---|
357 | uuid(1F636C01-364E-11D0-81D3-00C04FD85AB4),
|
---|
358 | local
|
---|
359 | ]
|
---|
360 | interface IInternetTransport : IUnknown
|
---|
361 | {
|
---|
362 | const boolean iitAUTHENTICATE = TRUE;
|
---|
363 | const boolean iitDONT_AUTHENTICATe = FALSE;
|
---|
364 | const boolean iitENABLE_ONCOMMAND = TRUE;
|
---|
365 | const boolean iitDISABLE_ONCOMMAND = FALSE;
|
---|
366 |
|
---|
367 | typedef enum tagIXPISSTATE
|
---|
368 | {
|
---|
369 | IXP_IS_CONNECTED,
|
---|
370 | IXP_IS_BUSY,
|
---|
371 | IXP_IS_READY,
|
---|
372 | IXP_IS_AUTHENTICATED
|
---|
373 | } IXPISSTATE;
|
---|
374 |
|
---|
375 | HRESULT GetServerInfo(
|
---|
376 | [in,out] LPINETSERVER pInetServer);
|
---|
377 |
|
---|
378 | IXPTYPE GetIXPType();
|
---|
379 |
|
---|
380 | HRESULT IsState(
|
---|
381 | [in] IXPISSTATE isstate);
|
---|
382 |
|
---|
383 | HRESULT InetServerFromAccount(
|
---|
384 | [in] IImnAccount *pAccount,
|
---|
385 | [in,out] LPINETSERVER pInetServer);
|
---|
386 |
|
---|
387 | HRESULT Connect(
|
---|
388 | [in] LPINETSERVER pInetServer,
|
---|
389 | [in] boolean fAuthenticate,
|
---|
390 | [in] boolean fCommandLogging);
|
---|
391 |
|
---|
392 | HRESULT HandsOffCallback();
|
---|
393 |
|
---|
394 | HRESULT Disconnect();
|
---|
395 |
|
---|
396 | HRESULT DropConnection();
|
---|
397 |
|
---|
398 | HRESULT GetStatus(
|
---|
399 | [out] IXPSTATUS *pCurrentStatus);
|
---|
400 | }
|
---|
401 |
|
---|
402 | [
|
---|
403 | object,
|
---|
404 | uuid(1F636C02-364E-11D0-81D3-00C04FD85AB4),
|
---|
405 | local
|
---|
406 | ]
|
---|
407 | interface ISMTPCallback : ITransportCallback
|
---|
408 | {
|
---|
409 | typedef enum tagSMTPCOMMAND
|
---|
410 | {
|
---|
411 | SMTP_NONE,
|
---|
412 | SMTP_BANNER,
|
---|
413 | SMTP_CONNECTED,
|
---|
414 | SMTP_SEND_MESSAGE,
|
---|
415 | SMTP_AUTH,
|
---|
416 | SMTP_EHLO,
|
---|
417 | SMTP_HELO,
|
---|
418 | SMTP_MAIL,
|
---|
419 | SMTP_RCPT,
|
---|
420 | SMTP_RSET,
|
---|
421 | SMTP_QUIT,
|
---|
422 | SMTP_DATA,
|
---|
423 | SMTP_DOT,
|
---|
424 | SMTP_SEND_STREAM,
|
---|
425 | SMTP_CUSTOM
|
---|
426 | } SMTPCOMMAND;
|
---|
427 |
|
---|
428 | typedef struct tagSMTPSTREAM
|
---|
429 | {
|
---|
430 | DWORD cbIncrement;
|
---|
431 | DWORD cbCurrent;
|
---|
432 | DWORD cbTotal;
|
---|
433 | } SMTPSTREAM, *LPSMTPSTREAM;
|
---|
434 |
|
---|
435 | typedef struct tagSMTPRESPONSE
|
---|
436 | {
|
---|
437 | SMTPCOMMAND command;
|
---|
438 | BOOL fDone;
|
---|
439 | IXPRESULT rIxpResult;
|
---|
440 | ISMTPTransport *pTransport;
|
---|
441 |
|
---|
442 | [switch_type(SMTPCOMMAND), switch_is(command)]
|
---|
443 | union
|
---|
444 | {
|
---|
445 | [case(SMTP_SEND_STREAM)] SMTPSTREAM rStreamInfo;
|
---|
446 | [default];
|
---|
447 | } DUMMYUNIONNAME;
|
---|
448 | } SMTPRESPONSE, *LPSMTPRESPONSE;
|
---|
449 |
|
---|
450 | HRESULT OnResponse(
|
---|
451 | [in] LPSMTPRESPONSE pResponse);
|
---|
452 | }
|
---|
453 |
|
---|
454 | [
|
---|
455 | object,
|
---|
456 | uuid(0DF2C7E2-3435-11D0-81D0-00C04FD85AB4),
|
---|
457 | local
|
---|
458 | ]
|
---|
459 | interface ISMTPTransport : IInternetTransport
|
---|
460 | {
|
---|
461 | typedef struct tagSMTPMESSAGE
|
---|
462 | {
|
---|
463 | ULONG cbSize;
|
---|
464 | LPSTREAM pstmMsg;
|
---|
465 | INETADDRLIST rAddressList;
|
---|
466 | } SMTPMESSAGE, *LPSMTPMESSAGE;
|
---|
467 |
|
---|
468 | HRESULT InitNew(
|
---|
469 | [in] LPSTR pszLogFilePath,
|
---|
470 | [in] ISMTPCallback *pCallback);
|
---|
471 |
|
---|
472 | cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
---|
473 | cpp_quote("#undef SendMessage")
|
---|
474 | cpp_quote("#endif")
|
---|
475 |
|
---|
476 | HRESULT SendMessage(
|
---|
477 | [in] LPSMTPMESSAGE pMessage);
|
---|
478 |
|
---|
479 | HRESULT CommandMAIL(
|
---|
480 | [in] LPSTR pszEmailFrom);
|
---|
481 |
|
---|
482 | HRESULT CommandRCPT(
|
---|
483 | [in] LPSTR pszEmailTo);
|
---|
484 |
|
---|
485 | HRESULT CommandEHLO();
|
---|
486 |
|
---|
487 | HRESULT CommandHELO();
|
---|
488 |
|
---|
489 | HRESULT CommandAUTH(
|
---|
490 | [in] LPSTR pszAuthType);
|
---|
491 |
|
---|
492 | HRESULT CommandQUIT();
|
---|
493 |
|
---|
494 | HRESULT CommandRSET();
|
---|
495 |
|
---|
496 | HRESULT CommandDATA();
|
---|
497 |
|
---|
498 | HRESULT CommandDOT();
|
---|
499 |
|
---|
500 | HRESULT SendDataStream(
|
---|
501 | [in] IStream *pStream,
|
---|
502 | [in] ULONG cbSize);
|
---|
503 | }
|
---|
504 |
|
---|
505 | [
|
---|
506 | object,
|
---|
507 | uuid(0DF2C7EC-3435-11D0-81D0-00C04FD85AB4),
|
---|
508 | local
|
---|
509 | ]
|
---|
510 | interface ISMTPTransport2 : ISMTPTransport
|
---|
511 | {
|
---|
512 | typedef struct tagSMTPMESSAGE2
|
---|
513 | {
|
---|
514 | SMTPMESSAGE smtpMsg;
|
---|
515 | LPSTR pszDSNENVID;
|
---|
516 | DSNRET dsnRet;
|
---|
517 | DWORD dwReserved;
|
---|
518 | DWORD dwReserved2;
|
---|
519 | } SMTPMESSAGE2, *LPSMTPMESSAGE2;
|
---|
520 |
|
---|
521 | HRESULT SetWindow();
|
---|
522 |
|
---|
523 | HRESULT ResetWindow();
|
---|
524 |
|
---|
525 | HRESULT SendMessage2(
|
---|
526 | [in] LPSMTPMESSAGE2 pMessage);
|
---|
527 |
|
---|
528 | HRESULT CommandRCPT2(
|
---|
529 | [in] LPSTR pszEmailTo,
|
---|
530 | [in] INETADDRTYPE atDSN);
|
---|
531 | }
|
---|
532 |
|
---|
533 | /* FIXME: IDAVNamespaceArbiter, IPropPatchRequest, IPropFindRequest, IPropFindMultiResponse, IPropFindResponse, IHTTPMailCallback, IHTTPMailTransport */
|
---|
534 |
|
---|
535 | [
|
---|
536 | object,
|
---|
537 | uuid(0DF2C7E3-3435-11D0-81D0-00C04FD85AB4),
|
---|
538 | local
|
---|
539 | ]
|
---|
540 | interface IPOP3Callback : ITransportCallback
|
---|
541 | {
|
---|
542 | typedef enum tagPOP3COMMAND
|
---|
543 | {
|
---|
544 | POP3_NONE,
|
---|
545 | POP3_BANNER,
|
---|
546 | POP3_CONNECTED,
|
---|
547 | POP3_USER,
|
---|
548 | POP3_PASS,
|
---|
549 | POP3_AUTH,
|
---|
550 | POP3_UIDL,
|
---|
551 | POP3_STAT,
|
---|
552 | POP3_LIST,
|
---|
553 | POP3_DELE,
|
---|
554 | POP3_RETR,
|
---|
555 | POP3_TOP,
|
---|
556 | POP3_NOOP,
|
---|
557 | POP3_QUIT,
|
---|
558 | POP3_RSET,
|
---|
559 | POP3_CUSTOM
|
---|
560 | } POP3COMMAND;
|
---|
561 |
|
---|
562 | typedef struct tagPOP3RETR
|
---|
563 | {
|
---|
564 | BOOL fHeader;
|
---|
565 | BOOL fBody;
|
---|
566 | DWORD dwPopId;
|
---|
567 | DWORD cbSoFar;
|
---|
568 | LPSTR pszLines;
|
---|
569 | ULONG cbLines;
|
---|
570 | } POP3RETR, *LPPOP3RETR;
|
---|
571 |
|
---|
572 | typedef struct tagPOP3TOP
|
---|
573 | {
|
---|
574 | BOOL fHeader;
|
---|
575 | BOOL fBody;
|
---|
576 | DWORD dwPopId;
|
---|
577 | DWORD cPreviewLines;
|
---|
578 | DWORD cbSoFar;
|
---|
579 | LPSTR pszLines;
|
---|
580 | ULONG cbLines;
|
---|
581 | } POP3TOP, *LPPOP3TOP;
|
---|
582 |
|
---|
583 | typedef struct tagPOP3LIST
|
---|
584 | {
|
---|
585 | DWORD dwPopId;
|
---|
586 | DWORD cbSize;
|
---|
587 | } POP3LIST, *LPPOP3LIST;
|
---|
588 |
|
---|
589 | typedef struct tagPOP3UIDL
|
---|
590 | {
|
---|
591 | DWORD dwPopId;
|
---|
592 | LPSTR pszUidl;
|
---|
593 | } POP3UIDL, *LPPOP3UIDL;
|
---|
594 |
|
---|
595 | typedef struct tagPOP3STAT
|
---|
596 | {
|
---|
597 | DWORD cMessages;
|
---|
598 | DWORD cbMessages;
|
---|
599 | } POP3STAT, *LPPOP3STAT;
|
---|
600 |
|
---|
601 | typedef struct tagPOP3RESPONSE
|
---|
602 | {
|
---|
603 | POP3COMMAND command;
|
---|
604 | BOOL fDone;
|
---|
605 | IXPRESULT rIxpResult;
|
---|
606 | IPOP3Transport *pTransport;
|
---|
607 | BOOL fValidInfo;
|
---|
608 | [switch_type(POP3COMMAND), switch_is(command)]
|
---|
609 | union
|
---|
610 | {
|
---|
611 | [case(POP3_UIDL)] POP3UIDL rUidlInfo;
|
---|
612 | [case(POP3_STAT)] POP3STAT rStatInfo;
|
---|
613 | [case(POP3_LIST)] POP3LIST rListInfo;
|
---|
614 | [case(POP3_DELE)] DWORD dwPopId;
|
---|
615 | [case(POP3_RETR)] POP3RETR rRetrInfo;
|
---|
616 | [case(POP3_TOP)] POP3TOP rTopInfo;
|
---|
617 | [default];
|
---|
618 | } DUMMYUNIONNAME;
|
---|
619 | } POP3RESPONSE, *LPPOP3RESPONSE;
|
---|
620 |
|
---|
621 | HRESULT OnResponse(
|
---|
622 | [in] LPPOP3RESPONSE pResponse);
|
---|
623 | }
|
---|
624 |
|
---|
625 | [
|
---|
626 | object,
|
---|
627 | uuid(0DF2C7E4-3435-11D0-81D0-00C04FD85AB4),
|
---|
628 | local
|
---|
629 | ]
|
---|
630 | interface IPOP3Transport : IInternetTransport
|
---|
631 | {
|
---|
632 | typedef enum tagPOP3CMDTYPE
|
---|
633 | {
|
---|
634 | POP3CMD_GET_POPID,
|
---|
635 | POP3CMD_GET_MARKED,
|
---|
636 | POP3CMD_GET_ALL
|
---|
637 | } POP3CMDTYPE;
|
---|
638 |
|
---|
639 | typedef enum tagPOP3MARKTYPE
|
---|
640 | {
|
---|
641 | POP3_MARK_FOR_TOP = 0x01,
|
---|
642 | POP3_MARK_FOR_RETR = 0x02,
|
---|
643 | POP3_MARK_FOR_DELE = 0x04,
|
---|
644 | POP3_MARK_FOR_UIDL = 0x08,
|
---|
645 | POP3_MARK_FOR_LIST = 0x10
|
---|
646 | } POP3MARKTYPE;
|
---|
647 |
|
---|
648 | HRESULT InitNew(
|
---|
649 | [in] LPSTR pszLogFilePath,
|
---|
650 | [in] IPOP3Callback *pCallback);
|
---|
651 |
|
---|
652 | HRESULT MarkItem(
|
---|
653 | [in] POP3MARKTYPE marktype,
|
---|
654 | [in] DWORD dwPopId,
|
---|
655 | [in] boolean fMarked);
|
---|
656 |
|
---|
657 | HRESULT CommandAUTH(
|
---|
658 | [in] LPSTR pszAuthType);
|
---|
659 |
|
---|
660 | HRESULT CommandUSER(
|
---|
661 | [in] LPSTR pszUserName);
|
---|
662 |
|
---|
663 | HRESULT CommandPASS(
|
---|
664 | [in] LPSTR pszPassword);
|
---|
665 |
|
---|
666 | HRESULT CommandLIST(
|
---|
667 | [in] POP3CMDTYPE cmdtype,
|
---|
668 | [in] DWORD dwPopId);
|
---|
669 |
|
---|
670 | HRESULT CommandTOP(
|
---|
671 | [in] POP3CMDTYPE cmdtype,
|
---|
672 | [in] DWORD dwPopId,
|
---|
673 | [in] DWORD cPreviewLines);
|
---|
674 |
|
---|
675 | HRESULT CommandQUIT();
|
---|
676 |
|
---|
677 | HRESULT CommandSTAT();
|
---|
678 |
|
---|
679 | HRESULT CommandNOOP();
|
---|
680 |
|
---|
681 | HRESULT CommandRSET();
|
---|
682 |
|
---|
683 | HRESULT CommandUIDL(
|
---|
684 | [in] POP3CMDTYPE cmdtype,
|
---|
685 | [in] DWORD dwPopId);
|
---|
686 |
|
---|
687 | HRESULT CommandDELE(
|
---|
688 | [in] POP3CMDTYPE cmdtype,
|
---|
689 | [in] DWORD dwPopId);
|
---|
690 |
|
---|
691 | HRESULT CommandRETR(
|
---|
692 | [in] POP3CMDTYPE cmdtype,
|
---|
693 | [in] DWORD dwPopId);
|
---|
694 | }
|
---|
695 |
|
---|
696 | /* FIXME: INNTPCallback, INNTPTransport */
|
---|
697 |
|
---|
698 | [
|
---|
699 | object,
|
---|
700 | uuid(8C438160-4EF6-11d0-874F-00AA00530EE9),
|
---|
701 | local,
|
---|
702 | ]
|
---|
703 | interface IRangeList : IUnknown
|
---|
704 | {
|
---|
705 | const ULONG RL_RANGE_ERROR = ((ULONG)-1);
|
---|
706 | const ULONG RL_LAST_MESSAGE = ((ULONG)-1);
|
---|
707 |
|
---|
708 | HRESULT Clear();
|
---|
709 |
|
---|
710 | HRESULT IsInRange(
|
---|
711 | [in] const ULONG value);
|
---|
712 |
|
---|
713 | HRESULT Min(
|
---|
714 | [out] ULONG *pulMin);
|
---|
715 |
|
---|
716 | HRESULT Max(
|
---|
717 | [out] ULONG *pulMax);
|
---|
718 |
|
---|
719 | HRESULT Save(
|
---|
720 | [out] byte **ppbDestination,
|
---|
721 | [out] ULONG *pulSizeOfDestination);
|
---|
722 |
|
---|
723 | HRESULT Load(
|
---|
724 | [in, size_is(ulSizeOfSource)] byte *pbSource,
|
---|
725 | [in] const ULONG ulSizeOfSource);
|
---|
726 |
|
---|
727 | HRESULT AddRange(
|
---|
728 | [in] const ULONG low,
|
---|
729 | [in] const ULONG high);
|
---|
730 |
|
---|
731 | HRESULT AddSingleValue(
|
---|
732 | [in] const ULONG value);
|
---|
733 |
|
---|
734 | HRESULT AddRangeList(
|
---|
735 | [in] const IRangeList *prl);
|
---|
736 |
|
---|
737 | HRESULT DeleteRange(
|
---|
738 | [in] const ULONG low,
|
---|
739 | [in] const ULONG high);
|
---|
740 |
|
---|
741 | HRESULT DeleteSingleValue(
|
---|
742 | [in] const ULONG value);
|
---|
743 |
|
---|
744 | HRESULT DeleteRangeList(
|
---|
745 | [in] const IRangeList *prl);
|
---|
746 |
|
---|
747 | HRESULT MinOfRange(
|
---|
748 | [in] const ULONG value,
|
---|
749 | [out] ULONG *pulMinOfRange);
|
---|
750 |
|
---|
751 | HRESULT MaxOfRange(
|
---|
752 | [in] const ULONG value,
|
---|
753 | [out] ULONG *pulMaxOfRange);
|
---|
754 |
|
---|
755 | HRESULT RangeToIMAPString(
|
---|
756 | [out] LPSTR *ppszDestination,
|
---|
757 | [out] LPDWORD pdwLengthOfDestination);
|
---|
758 |
|
---|
759 | HRESULT Next(
|
---|
760 | [in] const ULONG current,
|
---|
761 | [out] ULONG *pulNext);
|
---|
762 |
|
---|
763 | HRESULT Prev(
|
---|
764 | [in] const ULONG current,
|
---|
765 | [out] ULONG *pulPrev);
|
---|
766 |
|
---|
767 | HRESULT Cardinality(
|
---|
768 | [out] ULONG *pulCardinality);
|
---|
769 |
|
---|
770 | HRESULT CardinalityFrom(
|
---|
771 | [in] const ULONG ulStartPoint,
|
---|
772 | [out] ULONG *pulCardinalityFrom);
|
---|
773 | }
|
---|
774 |
|
---|
775 | [
|
---|
776 | object,
|
---|
777 | uuid(E9E9D8A3-4EDD-11d0-874F-00AA00530EE9),
|
---|
778 | local
|
---|
779 | ]
|
---|
780 | interface IIMAPCallback : ITransportCallback
|
---|
781 | {
|
---|
782 | typedef DWORD IMAP_MBOXFLAGS;
|
---|
783 | const IMAP_MBOXFLAGS IMAP_MBOX_NOFLAGS = 0x0;
|
---|
784 | const IMAP_MBOXFLAGS IMAP_MBOX_MARKED = 0x1;
|
---|
785 | const IMAP_MBOXFLAGS IMAP_MBOX_NOINFERIORS = 0x2;
|
---|
786 | const IMAP_MBOXFLAGS IMAP_MBOX_NOSELECT = 0x4;
|
---|
787 | const IMAP_MBOXFLAGS IMAP_MBOX_UNMARKED = 0x8;
|
---|
788 | const IMAP_MBOXFLAGS IMAP_MBOX_ALLFLAGS = 0xf;
|
---|
789 |
|
---|
790 | typedef enum tagIMAP_RESPONSE_TYPE
|
---|
791 | {
|
---|
792 | irtERROR_NOTIFICATION,
|
---|
793 | irtCOMMAND_COMPLETION,
|
---|
794 | irtSERVER_ALERT,
|
---|
795 | irtPARSE_ERROR,
|
---|
796 | irtMAILBOX_UPDATE,
|
---|
797 | irtDELETED_MSG,
|
---|
798 | irtFETCH_BODY,
|
---|
799 | irtUPDATE_MSG,
|
---|
800 | irtAPPLICABLE_FLAGS,
|
---|
801 | irtPERMANENT_FLAGS,
|
---|
802 | irtUIDVALIDITY,
|
---|
803 | irtREADWRITE_STATUS,
|
---|
804 | irtTRYCREATE,
|
---|
805 | irtSEARCH,
|
---|
806 | irtMAILBOX_LISTING,
|
---|
807 | irtMAILBOX_STATUS,
|
---|
808 | irtAPPEND_PROGRESS,
|
---|
809 | irtUPDATE_MSG_EX
|
---|
810 | } IMAP_RESPONSE_TYPE;
|
---|
811 |
|
---|
812 | typedef struct tagFETCH_BODY_PART
|
---|
813 | {
|
---|
814 | DWORD dwMsgSeqNum;
|
---|
815 | LPSTR pszBodyTag;
|
---|
816 | DWORD dwTotalBytes;
|
---|
817 | DWORD dwSizeOfData;
|
---|
818 | DWORD dwOffset;
|
---|
819 | BOOL fDone;
|
---|
820 | LPSTR pszData;
|
---|
821 | LPARAM lpFetchCookie1;
|
---|
822 | LPARAM lpFetchCookie2;
|
---|
823 | } FETCH_BODY_PART;
|
---|
824 |
|
---|
825 | typedef struct tagFETCH_CMD_RESULTS
|
---|
826 | {
|
---|
827 | DWORD dwMsgSeqNum;
|
---|
828 | BOOL bMsgFlags;
|
---|
829 | IMAP_MSGFLAGS mfMsgFlags;
|
---|
830 | BOOL bRFC822Size;
|
---|
831 | DWORD dwRFC822Size;
|
---|
832 | BOOL bUID;
|
---|
833 | DWORD dwUID;
|
---|
834 | BOOL bInternalDate;
|
---|
835 | FILETIME ftInternalDate;
|
---|
836 | LPARAM lpFetchCookie1;
|
---|
837 | LPARAM lpFetchCookie2;
|
---|
838 | } FETCH_CMD_RESULTS;
|
---|
839 |
|
---|
840 | typedef struct tagIMAPADDR
|
---|
841 | {
|
---|
842 | LPSTR pszName;
|
---|
843 | LPSTR pszADL;
|
---|
844 | LPSTR pszMailbox;
|
---|
845 | LPSTR pszHost;
|
---|
846 | struct tagIMAPADDR *pNext;
|
---|
847 | } IMAPADDR;
|
---|
848 |
|
---|
849 | typedef struct tagFETCH_CMD_RESULTS_EX
|
---|
850 | {
|
---|
851 | DWORD dwMsgSeqNum;
|
---|
852 | BOOL bMsgFlags;
|
---|
853 | IMAP_MSGFLAGS mfMsgFlags;
|
---|
854 | BOOL bRFC822Size;
|
---|
855 | DWORD dwRFC822Size;
|
---|
856 | BOOL bUID;
|
---|
857 | DWORD dwUID;
|
---|
858 | BOOL bInternalDate;
|
---|
859 | FILETIME ftInternalDate;
|
---|
860 | LPARAM lpFetchCookie1;
|
---|
861 | LPARAM lpFetchCookie2;
|
---|
862 | BOOL bEnvelope;
|
---|
863 | FILETIME ftENVDate;
|
---|
864 | LPSTR pszENVSubject;
|
---|
865 | IMAPADDR *piaENVFrom;
|
---|
866 | IMAPADDR *piaENVSender;
|
---|
867 | IMAPADDR *piaENVReplyTo;
|
---|
868 | IMAPADDR *piaENVTo;
|
---|
869 | IMAPADDR *piaENVCc;
|
---|
870 | IMAPADDR *piaENVBcc;
|
---|
871 | LPSTR pszENVInReplyTo;
|
---|
872 | LPSTR pszENVMessageID;
|
---|
873 | DWORD dwReserved1;
|
---|
874 | DWORD dwReserved2;
|
---|
875 | DWORD dwReserved3;
|
---|
876 | } FETCH_CMD_RESULTS_EX;
|
---|
877 |
|
---|
878 | typedef struct tagMBOX_MSGCOUNT
|
---|
879 | {
|
---|
880 | BOOL bGotExistsResponse;
|
---|
881 | DWORD dwExists;
|
---|
882 | BOOL bGotRecentResponse;
|
---|
883 | DWORD dwRecent;
|
---|
884 | BOOL bGotUnseenResponse;
|
---|
885 | DWORD dwUnseen;
|
---|
886 | } MBOX_MSGCOUNT;
|
---|
887 |
|
---|
888 | typedef struct tagIMAP_LISTLSUB_RESPONSE
|
---|
889 | {
|
---|
890 | LPSTR pszMailboxName;
|
---|
891 | IMAP_MBOXFLAGS imfMboxFlags;
|
---|
892 | char cHierarchyChar;
|
---|
893 | } IMAP_LISTLSUB_RESPONSE;
|
---|
894 |
|
---|
895 | typedef struct tagIMAP_STATUS_RESPONSE
|
---|
896 | {
|
---|
897 | LPSTR pszMailboxName;
|
---|
898 | BOOL fMessages;
|
---|
899 | DWORD dwMessages;
|
---|
900 | BOOL fRecent;
|
---|
901 | DWORD dwRecent;
|
---|
902 | BOOL fUIDNext;
|
---|
903 | DWORD dwUIDNext;
|
---|
904 | BOOL fUIDValidity;
|
---|
905 | DWORD dwUIDValidity;
|
---|
906 | BOOL fUnseen;
|
---|
907 | DWORD dwUnseen;
|
---|
908 | } IMAP_STATUS_RESPONSE;
|
---|
909 |
|
---|
910 | typedef struct tagAPPEND_PROGRESS
|
---|
911 | {
|
---|
912 | DWORD dwUploaded;
|
---|
913 | DWORD dwTotal;
|
---|
914 | } APPEND_PROGRESS;
|
---|
915 |
|
---|
916 | typedef [switch_type(IMAP_RESPONSE_TYPE)] union tagIMAP_RESPONSE_DATA
|
---|
917 | {
|
---|
918 | [case (irtMAILBOX_UPDATE)] MBOX_MSGCOUNT *pmcMsgCount;
|
---|
919 | [case (irtDELETED_MSG)] DWORD dwDeletedMsgSeqNum;
|
---|
920 | [case (irtFETCH_BODY)] FETCH_BODY_PART *pFetchBodyPart;
|
---|
921 | [case (irtUPDATE_MSG)] FETCH_CMD_RESULTS *pFetchResults;
|
---|
922 | [case (irtAPPLICABLE_FLAGS, irtPERMANENT_FLAGS)] IMAP_MSGFLAGS imfImapMessageFlags;
|
---|
923 | [case (irtUIDVALIDITY)] DWORD dwUIDValidity;
|
---|
924 | [case (irtREADWRITE_STATUS)] BOOL bReadWrite;
|
---|
925 | [case (irtSEARCH)] IRangeList *prlSearchResults;
|
---|
926 | [case (irtMAILBOX_LISTING)] IMAP_LISTLSUB_RESPONSE illrdMailboxListing;
|
---|
927 | [case (irtMAILBOX_STATUS)] IMAP_STATUS_RESPONSE *pisrStatusResponse;
|
---|
928 | [case (irtAPPEND_PROGRESS)] APPEND_PROGRESS *papAppendProgress;
|
---|
929 | [case (irtUPDATE_MSG_EX)] FETCH_CMD_RESULTS_EX *pFetchResultsEx;
|
---|
930 | } IMAP_RESPONSE_DATA;
|
---|
931 |
|
---|
932 | typedef struct tagIMAP_RESPONSE
|
---|
933 | {
|
---|
934 | WPARAM wParam;
|
---|
935 | LPARAM lParam;
|
---|
936 | HRESULT hrResult;
|
---|
937 | LPSTR lpszResponseText;
|
---|
938 | IMAP_RESPONSE_TYPE irtResponseType;
|
---|
939 | [switch_is(irtResponseType)] IMAP_RESPONSE_DATA irdResponseData;
|
---|
940 | } IMAP_RESPONSE;
|
---|
941 |
|
---|
942 | HRESULT OnResponse([in] const IMAP_RESPONSE *pirIMAPResponse);
|
---|
943 | }
|
---|
944 |
|
---|
945 | [
|
---|
946 | object,
|
---|
947 | uuid(E9E9D8A8-4EDD-11d0-874F-00AA00530EE9),
|
---|
948 | local,
|
---|
949 | ]
|
---|
950 | interface IIMAPTransport : IInternetTransport
|
---|
951 | {
|
---|
952 | const DWORD IMAP_CAPABILITY_IMAP4 = 0x1;
|
---|
953 | const DWORD IMAP_CAPABILITY_IMAP4rev1 = 0x2;
|
---|
954 | const DWORD IMAP_CAPABILITY_IDLE = 0x4;
|
---|
955 | const DWORD IMAP_CAPABILITY_ALLFLAGS = 0x7;
|
---|
956 |
|
---|
957 | HRESULT InitNew(
|
---|
958 | [in] LPSTR pszLogFilePath,
|
---|
959 | [in] IIMAPCallback *pCBHandler);
|
---|
960 |
|
---|
961 | HRESULT NewIRangeList(
|
---|
962 | [out] IRangeList **pprlNewRangeList);
|
---|
963 |
|
---|
964 | HRESULT Capability(
|
---|
965 | [out] DWORD *pdwCapabilityFlags);
|
---|
966 |
|
---|
967 | HRESULT Select(
|
---|
968 | [in] WPARAM wParam,
|
---|
969 | [in] LPARAM lParam,
|
---|
970 | [in] IIMAPCallback *pCBHandler,
|
---|
971 | [in] LPSTR lpszMailboxName);
|
---|
972 |
|
---|
973 | HRESULT Examine(
|
---|
974 | [in] WPARAM wParam,
|
---|
975 | [in] LPARAM lParam,
|
---|
976 | [in] IIMAPCallback *pCBHandler,
|
---|
977 | [in] LPSTR lpszMailboxName);
|
---|
978 |
|
---|
979 | HRESULT Create(
|
---|
980 | [in] WPARAM wParam,
|
---|
981 | [in] LPARAM lParam,
|
---|
982 | [in] IIMAPCallback *pCBHandler,
|
---|
983 | [in] LPSTR lpszMailboxName);
|
---|
984 |
|
---|
985 | HRESULT Delete(
|
---|
986 | [in] WPARAM wParam,
|
---|
987 | [in] LPARAM lParam,
|
---|
988 | [in] IIMAPCallback *pCBHandler,
|
---|
989 | [in] LPSTR lpszMailboxName);
|
---|
990 |
|
---|
991 | HRESULT Rename(
|
---|
992 | [in] WPARAM wParam,
|
---|
993 | [in] LPARAM lParam,
|
---|
994 | [in] IIMAPCallback *pCBHandler,
|
---|
995 | [in] LPSTR lpszMailboxName,
|
---|
996 | [in] LPSTR lpszNewMailboxName);
|
---|
997 |
|
---|
998 | HRESULT Subscribe(
|
---|
999 | [in] WPARAM wParam,
|
---|
1000 | [in] LPARAM lParam,
|
---|
1001 | [in] IIMAPCallback *pCBHandler,
|
---|
1002 | [in] LPSTR lpszMailboxName);
|
---|
1003 |
|
---|
1004 | HRESULT Unsubscribe(
|
---|
1005 | [in] WPARAM wParam,
|
---|
1006 | [in] LPARAM lParam,
|
---|
1007 | [in] IIMAPCallback *pCBHandler,
|
---|
1008 | [in] LPSTR lpszMailboxName);
|
---|
1009 |
|
---|
1010 | HRESULT List(
|
---|
1011 | [in] WPARAM wParam,
|
---|
1012 | [in] LPARAM lParam,
|
---|
1013 | [in] IIMAPCallback *pCBHandler,
|
---|
1014 | [in] LPSTR lpszMailboxNameReference,
|
---|
1015 | [in] LPSTR lpszMailboxNamePattern);
|
---|
1016 |
|
---|
1017 | HRESULT Lsub(
|
---|
1018 | [in] WPARAM wParam,
|
---|
1019 | [in] LPARAM lParam,
|
---|
1020 | [in] IIMAPCallback *pCBHandler,
|
---|
1021 | [in] LPSTR lpszMailboxNameReference,
|
---|
1022 | [in] LPSTR lpszMailboxNamePattern);
|
---|
1023 |
|
---|
1024 | HRESULT Append(
|
---|
1025 | [in] WPARAM wParam,
|
---|
1026 | [in] LPARAM lParam,
|
---|
1027 | [in] IIMAPCallback *pCBHandler,
|
---|
1028 | [in] LPSTR lpszMailboxName,
|
---|
1029 | [in] LPSTR lpszMessageFlags,
|
---|
1030 | [in] FILETIME ftMessageDateTime,
|
---|
1031 | [in] LPSTREAM lpstmMessageToSave);
|
---|
1032 |
|
---|
1033 | HRESULT Close(
|
---|
1034 | [in] WPARAM wParam,
|
---|
1035 | [in] LPARAM lParam,
|
---|
1036 | [in] IIMAPCallback *pCBHandler);
|
---|
1037 |
|
---|
1038 | HRESULT Expunge(
|
---|
1039 | [in] WPARAM wParam,
|
---|
1040 | [in] LPARAM lParam,
|
---|
1041 | [in] IIMAPCallback *pCBHandler);
|
---|
1042 |
|
---|
1043 | HRESULT Search(
|
---|
1044 | [in] WPARAM wParam,
|
---|
1045 | [in] LPARAM lParam,
|
---|
1046 | [in] IIMAPCallback *pCBHandler,
|
---|
1047 | [in] LPSTR lpszSearchCriteria,
|
---|
1048 | [in] boolean bReturnUIDs,
|
---|
1049 | [in] IRangeList *pMsgRange,
|
---|
1050 | [in] boolean bUIDRangeList);
|
---|
1051 |
|
---|
1052 | HRESULT Fetch(
|
---|
1053 | [in] WPARAM wParam,
|
---|
1054 | [in] LPARAM lParam,
|
---|
1055 | [in] IIMAPCallback *pCBHandler,
|
---|
1056 | [in] IRangeList *pMsgRange,
|
---|
1057 | [in] boolean bUIDMsgRange,
|
---|
1058 | [in] LPSTR lpszFetchArgs);
|
---|
1059 |
|
---|
1060 | HRESULT Store(
|
---|
1061 | [in] WPARAM wParam,
|
---|
1062 | [in] LPARAM lParam,
|
---|
1063 | [in] IIMAPCallback *pCBHandler,
|
---|
1064 | [in] IRangeList *pMsgRange,
|
---|
1065 | [in] boolean bUIDRangeList,
|
---|
1066 | [in] LPSTR lpszStoreArgs);
|
---|
1067 |
|
---|
1068 | HRESULT Copy(
|
---|
1069 | [in] WPARAM wParam,
|
---|
1070 | [in] LPARAM lParam,
|
---|
1071 | [in] IIMAPCallback *pCBHandler,
|
---|
1072 | [in] IRangeList *pMsgRange,
|
---|
1073 | [in] boolean bUIDRangeList,
|
---|
1074 | [in] LPSTR lpszMailboxName);
|
---|
1075 |
|
---|
1076 | HRESULT Noop(
|
---|
1077 | [in] WPARAM wParam,
|
---|
1078 | [in] LPARAM lParam,
|
---|
1079 | [in] IIMAPCallback *pCBHandler);
|
---|
1080 |
|
---|
1081 | HRESULT ResizeMsgSeqNumTable(
|
---|
1082 | [in] DWORD dwSizeOfMbox);
|
---|
1083 |
|
---|
1084 | HRESULT UpdateSeqNumToUID(
|
---|
1085 | [in] DWORD dwMsgSeqNum,
|
---|
1086 | [in] DWORD dwUID);
|
---|
1087 |
|
---|
1088 | HRESULT RemoveSequenceNum(
|
---|
1089 | [in] DWORD dwDeletedMsgSeqNum);
|
---|
1090 |
|
---|
1091 | HRESULT MsgSeqNumToUID(
|
---|
1092 | [in] DWORD dwMsgSeqNum,
|
---|
1093 | [out] DWORD *pdwUID);
|
---|
1094 |
|
---|
1095 | HRESULT GetMsgSeqNumToUIDArray(
|
---|
1096 | [out] DWORD **ppdwMsgSeqNumToUIDArray,
|
---|
1097 | [out] DWORD *pdwNumberOfElements);
|
---|
1098 |
|
---|
1099 | HRESULT GetHighestMsgSeqNum(
|
---|
1100 | [out] DWORD *pdwHighestMSN);
|
---|
1101 |
|
---|
1102 | HRESULT ResetMsgSeqNumToUID();
|
---|
1103 |
|
---|
1104 | HRESULT SetDefaultCBHandler(
|
---|
1105 | [in] IIMAPCallback *pCBHandler);
|
---|
1106 |
|
---|
1107 | HRESULT Status(
|
---|
1108 | [in] WPARAM wParam,
|
---|
1109 | [in] LPARAM lParam,
|
---|
1110 | [in] IIMAPCallback *pCBHandler,
|
---|
1111 | [in] LPSTR pszMailboxName,
|
---|
1112 | [in] LPSTR pszStatusCmdArgs);
|
---|
1113 | }
|
---|
1114 |
|
---|
1115 | #if 0
|
---|
1116 | cpp_quote("HRESULT WINAPI CreateRASTransport(IRASTransport **ppTransport);")
|
---|
1117 | cpp_quote("HRESULT WINAPI CreateNNTPTransport(INNTPTransport **ppTransport);")
|
---|
1118 | cpp_quote("HRESULT WINAPI CreateIMAPTransport2(IIMAPTransport2 **ppTransport);")
|
---|
1119 | #endif
|
---|
1120 | cpp_quote("HRESULT WINAPI CreateRangeList(IRangeList **ppRangeList);")
|
---|
1121 | cpp_quote("HRESULT WINAPI CreateSMTPTransport(ISMTPTransport **ppTransport);")
|
---|
1122 | cpp_quote("HRESULT WINAPI CreatePOP3Transport(IPOP3Transport **ppTransport);")
|
---|
1123 | cpp_quote("HRESULT WINAPI CreateIMAPTransport(IIMAPTransport **ppTransport);")
|
---|