winspool: Use unsigned type to avoid a compiler warning.
[wine/gsoc_dplay.git] / include / imnxport.idl
blob50f3e4e08ceaf95d274356a0ed0c802adb4fc809
1 /*
2 * Copyright 2006 Robert Shearman for CodeWeavers
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.
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.
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
19 import "imnact.idl";
21 interface IInternetTransport;
22 interface ISMTPTransport;
23 interface IPOP3Transport;
25 /* CLSIDs */
27 cpp_quote("DEFINE_GUID(CLSID_IInternetMessageUrl, 0xca30cc91, 0xb1b3, 0x11d0, 0x85, 0xd0, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
28 cpp_quote("DEFINE_GUID(CLSID_ISMTPTransport, 0xfd853ce6, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
29 cpp_quote("DEFINE_GUID(CLSID_IPOP3Transport, 0xfd853ce7, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
30 cpp_quote("DEFINE_GUID(CLSID_INNTPTransport, 0xfd853ce8, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
31 cpp_quote("DEFINE_GUID(CLSID_IRASTransport, 0xfd853ce9, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
32 cpp_quote("DEFINE_GUID(CLSID_IRangeList, 0xfd853cea, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
33 cpp_quote("DEFINE_GUID(CLSID_IIMAPTransport, 0xfd853ceb, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
34 cpp_quote("DEFINE_GUID(CLSID_IHTTPMailTransport, 0x5a580c11, 0xe5eb, 0x11d1, 0xa8, 0x6e, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);")
35 cpp_quote("DEFINE_GUID(CLSID_IPropFindRequest, 0xbb847b8a, 0x054a, 0x11d2, 0xa8, 0x94, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);")
36 cpp_quote("DEFINE_GUID(CLSID_IPropPatchRequest, 0xea678830, 0x235d, 0x11d2, 0xa8, 0xb6, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);")
38 /* Error Codes */
40 cpp_quote("#ifndef HR_E")
41 cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)")
42 cpp_quote("#endif")
43 cpp_quote("#ifndef HR_S")
44 cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)")
45 cpp_quote("#endif")
47 /* General Error Codes */
48 cpp_quote("#define IXP_E_LOAD_SICILY_FAILED HR_E(0xCC00)")
49 cpp_quote("#define IXP_E_INVALID_CERT_CN HR_E(0xCC01)")
50 cpp_quote("#define IXP_E_INVALID_CERT_DATE HR_E(0xCC02)")
51 cpp_quote("#define IXP_E_ALREADY_CONNECTED HR_E(0xCC03)")
52 cpp_quote("#define IXP_E_CONN HR_E(0xCC04)")
53 cpp_quote("#define IXP_E_NOT_CONNECTED HR_E(0xCC05)")
54 cpp_quote("#define IXP_E_CONN_SEND HR_E(0xCC06)")
55 cpp_quote("#define IXP_E_WOULD_BLOCK HR_E(0xCC07)")
56 cpp_quote("#define IXP_E_INVALID_STATE HR_E(0xCC08)")
57 cpp_quote("#define IXP_E_CONN_RECV HR_E(0xCC09)")
58 cpp_quote("#define IXP_E_INCOMPLETE HR_E(0xCC0A)")
59 cpp_quote("#define IXP_E_BUSY HR_E(0xCC0B)")
60 cpp_quote("#define IXP_E_NOT_INIT HR_E(0xCC0C)")
61 cpp_quote("#define IXP_E_CANT_FIND_HOST HR_E(0xCC0D)")
62 cpp_quote("#define IXP_E_FAILED_TO_CONNECT HR_E(0xCC0E)")
63 cpp_quote("#define IXP_E_CONNECTION_DROPPED HR_E(0xCC0F)")
64 cpp_quote("#define IXP_E_INVALID_ADDRESS HR_E(0xCC10)")
65 cpp_quote("#define IXP_E_INVALID_ADDRESS_LIST HR_E(0xCC11)")
66 cpp_quote("#define IXP_E_SOCKET_READ_ERROR HR_E(0xCC12)")
67 cpp_quote("#define IXP_E_SOCKET_WRITE_ERROR HR_E(0xCC13)")
68 cpp_quote("#define IXP_E_SCOKET_INIT_ERROR HR_E(0xCC14)")
69 cpp_quote("#define IXP_E_SOCKET_CONNECT_ERROR HR_E(0xCC15)")
70 cpp_quote("#define IXP_E_INVALID_ACCOUNT HR_E(0xCC16)")
71 cpp_quote("#define IXP_E_USER_CANCEL HR_E(0xCC17)")
72 cpp_quote("#define IXP_E_SICILY_LOGON_FAILED HR_E(0xCC18)")
73 cpp_quote("#define IXP_E_TIMEOUT HR_E(0xCC19)")
74 cpp_quote("#define IXP_E_SECURE_CONNECT_FAILED HR_E(0xCC1A)")
76 /* SMTP Failure Statuses */
77 cpp_quote("#define IXP_E_SMTP_RESPONSE_ERROR HR_E(0xCC60)")
78 cpp_quote("#define IXP_E_SMTP_UNKNOWN_RESPONSE_CODE HR_E(0xCC61)")
79 cpp_quote("#define IXP_E_SMTP_500_SYNTAX_ERROR HR_E(0xCC62)")
80 cpp_quote("#define IXP_E_SMTP_501_PARAM_SYNTAX HR_E(0xCC63)")
81 cpp_quote("#define IXP_E_SMTP_502_COMMAND_NOTIMPL HR_E(0xCC64)")
82 cpp_quote("#define IXP_E_SMTP_503_COMMAND_SEQ HR_E(0xCC65)")
83 cpp_quote("#define IXP_E_SMTP_504_COMMAND_PARAM_NOTIMPL HR_E(0xCC66)")
84 cpp_quote("#define IXP_E_SMTP_421_NOT_AVAILABLE HR_E(0xCC67)")
85 cpp_quote("#define IXP_E_SMTP_450_MAILBOX_BUSY HR_E(0xCC68)")
86 cpp_quote("#define IXP_E_SMTP_550_MAILBOX_NOT_FOUND HR_E(0xCC69)")
87 cpp_quote("#define IXP_E_SMTP_451_ERROR_PROCESSING HR_E(0xCC6A)")
88 cpp_quote("#define IXP_E_SMTP_551_USER_NOT_LOCAL HR_E(0xCC6B)")
89 cpp_quote("#define IXP_E_SMTP_452_NO_SYSTEM_STORAGE HR_E(0xCC6C)")
90 cpp_quote("#define IXP_E_SMTP_552_STORAGE_OVERFLOW HR_E(0xCC6D)")
91 cpp_quote("#define IXP_E_SMTP_553_MAILBOX_NAME_SYNTAX HR_E(0xCC6E)")
92 cpp_quote("#define IXP_E_SMTP_554_TRANSACT_FAILED HR_E(0xCC6F)")
94 /* SMTP Success Statuses */
95 cpp_quote("#define IXP_E_SMTP_211_SYSTEM_STATUS HR_S(0xCC70)")
96 cpp_quote("#define IXP_E_SMTP_214_HELP_MESSAGE HR_S(0xCC71)")
97 cpp_quote("#define IXP_E_SMTP_220_READY HR_S(0xCC72)")
98 cpp_quote("#define IXP_E_SMTP_221_CLOSING HR_S(0xCC73)")
99 cpp_quote("#define IXP_E_SMTP_250_MAIL_ACTION_OKAY HR_S(0xCC74)")
100 cpp_quote("#define IXP_E_SMTP_251_FORWARDING_MAIL HR_S(0xCC75)")
101 cpp_quote("#define IXP_E_SMTP_354_START_MAIL_INPUT HR_S(0xCC76)")
102 cpp_quote("#define IXP_E_SMTP_CONTINUE HR_S(0xCC77)")
103 cpp_quote("#define IXP_E_SMTP_334_AUTH_READY_RESPONSE HR_S(0xCC78)")
104 cpp_quote("#define IXP_E_SMTP_245_AUTH_SUCCESS HR_S(0xCC79)")
106 /* More SMTP Failure Statuses */
107 cpp_quote("#define IXP_E_SMTP_REJECTED_SENDER HR_E(0xCC78)")
108 cpp_quote("#define IXP_E_SMTP_REJECTED_RECIPIENTS HR_E(0xCC79)")
109 cpp_quote("#define IXP_E_SMTP_NO_SENDER HR_E(0xCC7A)")
110 cpp_quote("#define IXP_E_SMTP_NO_RECIPIENTS HR_E(0xCC7B)")
111 cpp_quote("#define IXP_E_SMTP_530_STARTTLS_REQUIRED HR_E(0xCC7C)")
112 cpp_quote("#define IXP_E_SMTP_NO_STARTTLS_SUPPORT HR_E(0xCC7D)")
113 cpp_quote("#define IXP_E_SMTP_NO_DSN_SUPPORT HR_E(0xCC7E)")
114 cpp_quote("#define IXP_E_SMTP_454_STARTTLS_FAILED HR_E(0xCC7F)")
116 const SHORT CCHMAX_DOMAIN = 256;
117 const SHORT CCHMAX_PHONE_NUMBER = 128;
119 const DWORD DEFAULT_IMAP_PORT = 143;
120 const DWORD DEFAULT_POP3_PORT = 110;
121 const DWORD DEFAULT_SMTP_PORT = 25;
122 const DWORD DEFAULT_NNTP_PORT = 119;
124 typedef enum tagINETADDRTYPE
126 ADDR_TO,
127 ADDR_FROM,
128 ADDR_DSN_NEVER = 16,
129 ADDR_DSN_SUCCESS = 32,
130 ADDR_DSN_FAILURE = 64,
131 ADDR_DSN_DELAY = 128
132 } INETADDRTYPE;
134 const DWORD ADDR_TOFROM_MASK = 0x1;
135 const DWORD ADDR_DSN_MASK = 0xf0;
137 typedef enum tagDSNRET
139 DSNRET_DEFAULT,
140 DSNRET_HDRS,
141 DSNRET_FULL,
142 } DSNRET;
144 typedef struct tagINETADDR
146 INETADDRTYPE addrtype;
147 CHAR szEmail[CCHMAX_EMAIL_ADDRESS];
148 } INETADDR, *LPINETADDR;
150 typedef struct tagINETADDRLIST
152 ULONG cAddress;
153 LPINETADDR prgAddress;
154 } INETADDRLIST, *LPINETADDRLIST;
156 typedef enum tagRASCONNTYPE
158 RAS_CONNECT_LAN,
159 RAS_CONNECT_MANUAL,
160 RAS_CONNECT_RAS
161 } RASCONNTYPE;
163 typedef enum tagHTTPMAILPROPTYPE
165 HTTPMAIL_PROP_INVALID,
166 HTTPMAIL_PROP_ADBAR,
167 HTTPMAIL_PROP_CONTACTS,
168 HTTPMAIL_PROP_INBOX,
169 HTTPMAIL_PROP_OUTBOX,
170 HTTPMAIL_PROP_SENDMSG,
171 HTTPMAIL_PROP_SENTITEMS,
172 HTTPMAIL_PROP_DELETEDITEMS,
173 HTTPMAIL_PROP_DRAFTS,
174 HTTPMAIL_PROP_MSGFOLDERROOT,
175 HTTPMAIL_PROP_SIG,
176 HTTPMAIL_PROP_LAST
177 } HTTPMAILPROPTYPE;
179 typedef enum tagHTTPMAILSPECIALFOLDER
181 HTTPMAIL_SF_NONE,
182 HTTPMAIL_SF_UNRECOGNIZED,
183 HTTPMAIL_SF_INBOX,
184 HTTPMAIL_SF_DELETEDITEMS,
185 HTTPMAIL_SF_DRAFTS,
186 HTTPMAIL_SF_OUTBOX,
187 HTTPMAIL_SF_SENTITEMS,
188 HTTPMAIL_SF_CONTACTS,
189 HTTPMAIL_SF_CALENDAR,
190 HTTPMAIL_SF_MSNPROMO,
191 HTTPMAIL_SF_LAST
192 } HTTPMAILSPECIALFOLDER;
194 typedef enum tagHTTPMAILCONTACTTYPE
196 HTTPMAIL_CT_CONTACT,
197 HTTPMAIL_CT_GROUP,
198 HTTPMAIL_CT_LAST
199 } HTTPMAILCONTACTTYPE;
201 const DWORD DAVNAMESPACE_UNKNOWN = 0xFFFFFFFF;
202 const DWORD DAVNAMESPACE_DAV = 0;
203 const DWORD DAVNAMESPACE_HOTMAIL = 1;
204 const DWORD DAVNAMESPACE_HTTPMAIL = 2;
205 const DWORD DAVNAMESPACE_MAIL = 3;
206 const DWORD DAVNAMESPACE_CONTACTS = 4;
208 cpp_quote("#define ISF_SMTP_USEIPFORHELO 0x01")
209 cpp_quote("#define ISF_ALWAYSPROMPTFORPASSWORD 0x02")
210 /* for SMTP - send EHLO and use STARTTLS if available: */
211 cpp_quote("#define ISF_SSLONSAMEPORT 0x04")
212 cpp_quote("#define ISF_QUERYDSNSUPPORT 0x08")
213 /* for SMTP - send EHLO and use AUTH if available: */
214 cpp_quote("#define ISF_QUERYAUTHSUPPORT 0x10")
216 typedef struct INETSERVER
218 CHAR szAccount[CCHMAX_ACCOUNT_NAME];
219 CHAR szUserName[CCHMAX_USERNAME];
220 CHAR szPassword[CCHMAX_PASSWORD];
221 CHAR szServerName[CCHMAX_SERVER_NAME];
222 CHAR szConnectoid[CCHMAX_CONNECTOID];
223 RASCONNTYPE rasconntype;
224 DWORD dwPort;
225 BOOL fSSL;
226 BOOL fTrySicily;
227 DWORD dwTimeout;
228 DWORD dwFlags;
229 } INETSERVER, *LPINETSERVER;
231 typedef enum tagIXPTYPE
233 IXP_NNTP,
234 IXP_SMTP,
235 IXP_POP3,
236 IXP_IMAP,
237 IXP_RAS,
238 IXP_HTTPMail
239 } IXPTYPE;
241 typedef enum tagIXPSTATUS
243 IXP_FINDINGHOST,
244 IXP_CONNECTING,
245 IXP_SECURING,
246 IXP_CONNECTED,
247 IXP_AUTHORIZING,
248 IXP_AUTHRETRY,
249 IXP_AUTHORIZED,
250 IXP_DISCONNECTING,
251 IXP_DISCONNECTED,
252 IXP_LAST
253 } IXPSTATUS;
255 const DWORD DEPTH_INFINITY = 0xFFFFFFFE;
257 typedef DWORD MEMBERINFOFLAGS;
259 const MEMBERINFOFLAGS HTTP_MEMBERINFO_COMMONPROPS = 0x0;
260 const MEMBERINFOFLAGS HTTP_MEMBERINFO_FOLDERPROPS = 0x1;
261 const MEMBERINFOFLAGS HTTP_MEMBERINFO_MESSAGEPROPS = 0x2;
262 const MEMBERINFOFLAGS HTTP_MEMBERINFO_ALLPROPS = HTTP_MEMBERINFO_FOLDERPROPS | HTTP_MEMBERINFO_MESSAGEPROPS;
264 typedef DWORD IMAP_MSGFLAGS;
266 const IMAP_MSGFLAGS IMAP_MSG_NOFLAGS = 0x00;
267 const IMAP_MSGFLAGS IMAP_MSG_ANSWERED = 0x01;
268 const IMAP_MSGFLAGS IMAP_MSG_FLAGGED = 0x02;
269 const IMAP_MSGFLAGS IMAP_MSG_DELETED = 0x04;
270 const IMAP_MSGFLAGS IMAP_MSG_SEEN = 0x08;
271 const IMAP_MSGFLAGS IMAP_MSG_DRAFT = 0x10;
272 const IMAP_MSGFLAGS IMAP_MSG_ALLFLAGS = 0x1f;
275 object,
276 uuid(CA30F3FF-C9AC-11D1-9A3A-00C04FA309D4),
277 local
279 interface ITransportCallbackService : IUnknown
281 HRESULT GetParentWindow(
282 [in] DWORD dwReserved,
283 [out] HWND *phwndParent);
285 HRESULT GetAccount(
286 [out] LPDWORD pdwServerType,
287 [out] IImnAccount **ppAccount);
291 object,
292 uuid(0DF2C7E1-3435-11D0-81D0-00C04FD85AB4),
293 local
295 interface ITransportCallback : IUnknown
297 typedef struct tagIXPRESULT
299 HRESULT hrResult;
300 LPSTR pszResponse;
301 UINT uiServerError;
302 HRESULT hrServerError;
303 DWORD dwSocketError;
304 LPSTR pszProblem;
305 } IXPRESULT, *LPIXPRESULT;
307 typedef enum tagCMDTYPE
309 CMD_SEND,
310 CMD_RESP
311 } CMDTYPE;
313 HRESULT OnTimeout(
314 [in,out] DWORD *pdwTimeout,
315 [in] IInternetTransport *pTransport);
317 HRESULT OnLogonPrompt(
318 [in,out] LPINETSERVER pInetServer,
319 [in] IInternetTransport *pTransport);
321 INT OnPrompt(
322 [in] HRESULT hrError,
323 [in] LPCSTR pszText,
324 [in] LPCSTR pszCaption,
325 [in] UINT uType,
326 [in] IInternetTransport *pTransport);
328 HRESULT OnStatus(
329 [in] IXPSTATUS ixpstatus,
330 [in] IInternetTransport *pTransport);
332 HRESULT OnError(
333 [in] IXPSTATUS ixpstatus,
334 [in] LPIXPRESULT pResult,
335 [in] IInternetTransport *pTransport);
337 HRESULT OnCommand(
338 [in] CMDTYPE cmdtype,
339 [in] LPSTR pszLine,
340 [in] HRESULT hrResponse,
341 [in] IInternetTransport *pTransport);
345 object,
346 uuid(1F636C01-364E-11D0-81D3-00C04FD85AB4),
347 local
349 interface IInternetTransport : IUnknown
351 const boolean iitAUTHENTICATE = TRUE;
352 const boolean iitDONT_AUTHENTICATe = FALSE;
353 const boolean iitENABLE_ONCOMMAND = TRUE;
354 const boolean iitDISABLE_ONCOMMAND = FALSE;
356 typedef enum tagIXPISSTATE
358 IXP_IS_CONNECTED,
359 IXP_IS_BUSY,
360 IXP_IS_READY,
361 IXP_IS_AUTHENTICATED
362 } IXPISSTATE;
364 HRESULT GetServerInfo(
365 [in,out] LPINETSERVER pInetServer);
367 IXPTYPE GetIXPType();
369 HRESULT IsState(
370 [in] IXPISSTATE isstate);
372 HRESULT InetServerFromAccount(
373 [in] IImnAccount *pAccount,
374 [in,out] LPINETSERVER pInetServer);
376 HRESULT Connect(
377 [in] LPINETSERVER pInetServer,
378 [in] boolean fAuthenticate,
379 [in] boolean fCommandLogging);
381 HRESULT HandsOffCallback();
383 HRESULT Disconnect();
385 HRESULT DropConnection();
387 HRESULT GetStatus(
388 [out] IXPSTATUS *pCurrentStatus);
392 object,
393 uuid(1F636C02-364E-11D0-81D3-00C04FD85AB4),
394 local
396 interface ISMTPCallback : ITransportCallback
398 typedef enum tagSMTPCOMMAND
400 SMTP_NONE,
401 SMTP_BANNER,
402 SMTP_CONNECTED,
403 SMTP_SEND_MESSAGE,
404 SMTP_AUTH,
405 SMTP_EHLO,
406 SMTP_HELO,
407 SMTP_MAIL,
408 SMTP_RCPT,
409 SMTP_RSET,
410 SMTP_QUIT,
411 SMTP_DATA,
412 SMTP_DOT,
413 SMTP_SEND_STREAM,
414 SMTP_CUSTOM
415 } SMTPCOMMAND;
417 typedef struct tagSMTPSTREAM
419 DWORD cbIncrement;
420 DWORD cbCurrent;
421 DWORD cbTotal;
422 } SMTPSTREAM, *LPSMTPSTREAM;
424 typedef struct tagSMTPRESPONSE
426 SMTPCOMMAND command;
427 BOOL fDone;
428 IXPRESULT rIxpResult;
429 ISMTPTransport *pTransport;
431 [switch_type(SMTPCOMMAND), switch_is(command)]
432 union
434 [case(SMTP_SEND_STREAM)] SMTPSTREAM rStreamInfo;
435 [default];
437 } SMTPRESPONSE, *LPSMTPRESPONSE;
439 HRESULT OnResponse(
440 [in] LPSMTPRESPONSE pResponse);
444 object,
445 uuid(0DF2C7E2-3435-11D0-81D0-00C04FD85AB4),
446 local
448 interface ISMTPTransport : IInternetTransport
450 typedef struct tagSMTPMESSAGE
452 ULONG cbSize;
453 LPSTREAM pstmMsg;
454 INETADDRLIST rAddressList;
455 } SMTPMESSAGE, *LPSMTPMESSAGE;
457 HRESULT InitNew(
458 [in] LPSTR pszLogFilePath,
459 [in] ISMTPCallback *pCallback);
461 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
462 cpp_quote("#undef SendMessage")
463 cpp_quote("#endif")
465 HRESULT SendMessage(
466 [in] LPSMTPMESSAGE pMessage);
468 HRESULT CommandMAIL(
469 [in] LPSTR pszEmailFrom);
471 HRESULT CommandRCPT(
472 [in] LPSTR pszEmailTo);
474 HRESULT CommandEHLO();
476 HRESULT CommandHELO();
478 HRESULT CommandAUTH(
479 [in] LPSTR pszAuthType);
481 HRESULT CommandQUIT();
483 HRESULT CommandRSET();
485 HRESULT CommandDATA();
487 HRESULT CommandDOT();
489 HRESULT SendDataStream(
490 [in] IStream *pStream,
491 [in] ULONG cbSize);
495 object,
496 uuid(0DF2C7EC-3435-11D0-81D0-00C04FD85AB4),
497 local
499 interface ISMTPTransport2 : ISMTPTransport
501 typedef struct tagSMTPMESSAGE2
503 SMTPMESSAGE smtpMsg;
504 LPSTR pszDSNENVID;
505 DSNRET dsnRet;
506 DWORD dwReserved;
507 DWORD dwReserved2;
508 } SMTPMESSAGE2, *LPSMTPMESSAGE2;
510 HRESULT SetWindow();
512 HRESULT ResetWindow();
514 HRESULT SendMessage2(
515 [in] LPSMTPMESSAGE2 pMessage);
517 HRESULT CommandRCPT2(
518 [in] LPSTR pszEmailTo,
519 [in] INETADDRTYPE atDSN);
522 /* FIXME: IDAVNamespaceArbiter, IPropPatchRequest, IPropFindRequest, IPropFindMultiResponse, IPropFindResponse, IHTTPMailCallback, IHTTPMailTransport */
525 object,
526 uuid(0DF2C7E3-3435-11D0-81D0-00C04FD85AB4),
527 local
529 interface IPOP3Callback : ITransportCallback
531 typedef enum tagPOP3COMMAND
533 POP3_NONE,
534 POP3_BANNER,
535 POP3_CONNECTED,
536 POP3_USER,
537 POP3_PASS,
538 POP3_AUTH,
539 POP3_UIDL,
540 POP3_STAT,
541 POP3_LIST,
542 POP3_DELE,
543 POP3_RETR,
544 POP3_TOP,
545 POP3_NOOP,
546 POP3_QUIT,
547 POP3_RSET,
548 POP3_CUSTOM
549 } POP3COMMAND;
551 typedef struct tagPOP3RETR
553 BOOL fHeader;
554 BOOL fBody;
555 DWORD dwPopId;
556 DWORD cbSoFar;
557 LPSTR pszLines;
558 ULONG cbLines;
559 } POP3RETR, *LPPOP3RETR;
561 typedef struct tagPOP3TOP
563 BOOL fHeader;
564 BOOL fBody;
565 DWORD dwPopId;
566 DWORD cPreviewLines;
567 DWORD cbSoFar;
568 LPSTR pszLines;
569 ULONG cbLines;
570 } POP3TOP, *LPPOP3TOP;
572 typedef struct tagPOP3LIST
574 DWORD dwPopId;
575 DWORD cbSize;
576 } POP3LIST, *LPPOP3LIST;
578 typedef struct tagPOP3UIDL
580 DWORD dwPopId;
581 LPSTR pszUidl;
582 } POP3UIDL, *LPPOP3UIDL;
584 typedef struct tagPOP3STAT
586 DWORD cMessages;
587 DWORD cbMessages;
588 } POP3STAT, *LPPOP3STAT;
590 typedef struct tagPOP3RESPONSE
592 POP3COMMAND command;
593 BOOL fDone;
594 IXPRESULT rIxpResult;
595 IPOP3Transport *pTransport;
596 BOOL fValidInfo;
597 [switch_type(POP3COMMAND), switch_is(command)]
598 union
600 [case(POP3_UIDL)] POP3UIDL rUidlInfo;
601 [case(POP3_STAT)] POP3STAT rStatInfo;
602 [case(POP3_LIST)] POP3LIST rListInfo;
603 [case(POP3_DELE)] DWORD dwPopId;
604 [case(POP3_RETR)] POP3RETR rRetrInfo;
605 [case(POP3_TOP)] POP3TOP rTopInfo;
606 [default];
608 } POP3RESPONSE, *LPPOP3RESPONSE;
610 HRESULT OnResponse(
611 [in] LPPOP3RESPONSE pResponse);
615 object,
616 uuid(0DF2C7E4-3435-11D0-81D0-00C04FD85AB4),
617 local
619 interface IPOP3Transport : IInternetTransport
621 typedef enum tagPOP3CMDTYPE
623 POP3CMD_GET_POPID,
624 POP3CMD_GET_MARKED,
625 POP3CMD_GET_ALL
626 } POP3CMDTYPE;
628 typedef enum tagPOP3MARKTYPE
630 POP3_MARK_FOR_TOP = 0x01,
631 POP3_MARK_FOR_RETR = 0x02,
632 POP3_MARK_FOR_DELE = 0x04,
633 POP3_MARK_FOR_UIDL = 0x08,
634 POP3_MARK_FOR_LIST = 0x10
635 } POP3MARKTYPE;
637 HRESULT InitNew(
638 [in] LPSTR pszLogFilePath,
639 [in] IPOP3Callback *pCallback);
641 HRESULT MarkItem(
642 [in] POP3MARKTYPE marktype,
643 [in] DWORD dwPopId,
644 [in] boolean fMarked);
646 HRESULT CommandAUTH(
647 [in] LPSTR pszAuthType);
649 HRESULT CommandUSER(
650 [in] LPSTR pszUserName);
652 HRESULT CommandPASS(
653 [in] LPSTR pszPassword);
655 HRESULT CommandLIST(
656 [in] POP3CMDTYPE cmdtype,
657 [in] DWORD dwPopId);
659 HRESULT CommandTOP(
660 [in] POP3CMDTYPE cmdtype,
661 [in] DWORD dwPopId,
662 [in] DWORD cPreviewLines);
664 HRESULT CommandQUIT();
666 HRESULT CommandSTAT();
668 HRESULT CommandNOOP();
670 HRESULT CommandRSET();
672 HRESULT CommandUIDL(
673 [in] POP3CMDTYPE cmdtype,
674 [in] DWORD dwPopId);
676 HRESULT CommandDELE(
677 [in] POP3CMDTYPE cmdtype,
678 [in] DWORD dwPopId);
680 HRESULT CommandRETR(
681 [in] POP3CMDTYPE cmdtype,
682 [in] DWORD dwPopId);
685 /* FIXME: INNTPCallback, INNTPTransport */
687 /* FIXME: IRangeList */
689 /* FIXME: IIMAPCallback, IIMAPTransport */
691 #if 0
692 cpp_quote("HRESULT WINAPI CreateRASTransport(IRASTransport **ppTransport);")
693 cpp_quote("HRESULT WINAPI CreateNNTPTransport(INNTPTransport **ppTransport);")
694 cpp_quote("HRESULT WINAPI CreateIMAPTransport(IIMAPTransport **ppTransport);")
695 cpp_quote("HRESULT WINAPI CreateIMAPTransport2(IIMAPTransport2 **ppTransport);")
696 cpp_quote("HRESULT WINAPI CreateRangeList(IRangeList **ppRangeList);")
697 #endif
698 cpp_quote("HRESULT WINAPI CreateSMTPTransport(ISMTPTransport **ppTransport);")
699 cpp_quote("HRESULT WINAPI CreatePOP3Transport(IPOP3Transport **ppTransport);")