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