1/* 2 * Copyright 2007 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 19import "ocidl.idl"; 20import "objidl.idl"; 21import "propidl.idl"; 22 23#define DECLARE_HANDLE(name) typedef void *name 24 25interface IMimeMessageCallback; 26interface IMimeEnumAddressTypes; 27interface IMimeMessageParts; 28interface IMimeMessageTree; 29interface IMimeBody; 30interface IMimeEnumProperties; 31 32cpp_quote("DEFINE_GUID(CLSID_IMimeBody, 0xfd853cdb, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") 33cpp_quote("DEFINE_GUID(CLSID_IMimeAllocator, 0xfd853cdd, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") 34cpp_quote("DEFINE_GUID(CLSID_IMimeMessage, 0xfd853ce3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") 35cpp_quote("DEFINE_GUID(CLSID_IMimeSecurity, 0xfd853cde, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") 36cpp_quote("DEFINE_GUID(CLSID_IVirtualStream, 0xfd853cdf, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") 37cpp_quote("DEFINE_GUID(CLSID_IMimeHtmlProtocol,0x5300401,0xbcbc, 0x11d0, 0x85, 0xe3, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") 38cpp_quote("DEFINE_GUID(CLSID_MimeEdit, 0x1c82ead9, 0x508e, 0x11d1, 0x8d, 0xcf, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf9);") 39 40cpp_quote("#define MIME_E_REG_CREATE_KEY 0x800cce01") 41cpp_quote("#define MIME_E_REG_QUERY_INFO 0x800cce02") 42cpp_quote("#define MIME_E_INVALID_ENCTYPE 0x800cce03") 43cpp_quote("#define MIME_E_BOUNDARY_MISMATCH 0x800cce04") 44cpp_quote("#define MIME_E_NOT_FOUND 0x800cce05") 45cpp_quote("#define MIME_E_NO_DATA 0x800cce05") 46cpp_quote("#define MIME_E_BUFFER_TOO_SMALL 0x800cce06") 47cpp_quote("#define MIME_E_INVALID_ITEM_FLAGS 0x800cce07") 48cpp_quote("#define MIME_E_ONE_LINE_ITEME 0x800cce08") 49cpp_quote("#define MIME_E_INVALID_HANDLE 0x800cce09") 50cpp_quote("#define MIME_E_CHARSET_TRANSLATE 0x800cce0a") 51cpp_quote("#define MIME_E_NOT_INITIALIZED 0x800cce0b") 52 53cpp_quote("#define MIME_E_INVALID_OPTION_VALUE 0x800cce1f") 54cpp_quote("#define MIME_E_INVALID_OPTION_ID 0x800cce20") 55cpp_quote("#define MIME_E_INVALID_HEADER_NAME 0x800cce21") 56cpp_quote("#define MIME_E_NOT_BOUND 0x800cce22") 57cpp_quote("#define MIME_E_MAX_SIZE_TOO_SMALL 0x800cce23") 58cpp_quote("#define MIME_E_MULTIPART_HAS_CHILDREN 0x800cce25") 59cpp_quote("#define MIME_E_INVALID_PROP_FLAGS 0x800cce26") 60cpp_quote("#define MIME_E_INVALID_ADDRESS_TYPE 0x800cce27") 61cpp_quote("#define MIME_E_INVALID_OBJECT_IID 0x800cce28") 62cpp_quote("#define MIME_E_MLANG_DLL_NOT_FOUND 0x800cce29") 63cpp_quote("#define MIME_E_ROOT_NOT_EMPTY 0x800cce2a") 64cpp_quote("#define MIME_E_MLANG_BAD_DLL 0x800cce2b") 65cpp_quote("#define MIME_E_REG_OPEN_KEY 0x800cce2c") 66cpp_quote("#define MIME_E_INVALID_INET_DATE 0x800cce2d") 67cpp_quote("#define MIME_E_INVALID_BODYTYPE 0x800cce2e") 68cpp_quote("#define MIME_E_INVALID_DELETE_TYPE 0x800cce2f") 69cpp_quote("#define MIME_E_OPTION_HAS_NO_VALUE 0x800cce30") 70cpp_quote("#define MIME_E_INVALID_CHARSET_TYPE 0x800cce31") 71 72cpp_quote("#define MIME_E_INVALID_TEXT_TYPE 0x800cce38") 73 74cpp_quote("#define MIME_E_SECURITY_NOOP 0x800cceb1") 75cpp_quote("#define MIME_S_SECURITY_NOOP 0x000cceb1") 76 77cpp_quote("typedef enum tagMIMEPROPID {") 78cpp_quote(" PID_HDR_NEWSGROUP = 2,") 79cpp_quote(" PID_HDR_NEWSGROUPS = 3,") 80cpp_quote(" PID_HDR_REFS = 4,") 81cpp_quote(" PID_HDR_SUBJECT = 5,") 82cpp_quote(" PID_HDR_FROM = 6,") 83cpp_quote(" PID_HDR_MESSAGEID = 7,") 84cpp_quote(" PID_HDR_RETURNPATH = 8,") 85cpp_quote(" PID_HDR_RR = 9,") 86cpp_quote(" PID_HDR_RETRCPTO = 10,") 87cpp_quote(" PID_HDR_APPARTO = 11,") 88cpp_quote(" PID_HDR_DATE = 12,") 89cpp_quote(" PID_HDR_RECEIVED = 13,") 90cpp_quote(" PID_HDR_REPLYTO = 14,") 91cpp_quote(" PID_HDR_XMAILER = 15,") 92cpp_quote(" PID_HDR_BCC = 16,") 93cpp_quote(" PID_HDR_MIMEVER = 17,") 94cpp_quote(" PID_HDR_CNTTYPE = 18,") 95cpp_quote(" PID_HDR_CNTXFER = 19,") 96cpp_quote(" PID_HDR_CNTID = 20,") 97cpp_quote(" PID_HDR_CNTDESC = 21,") 98cpp_quote(" PID_HDR_CNTDISP = 22,") 99cpp_quote(" PID_HDR_CNTBASE = 23,") 100cpp_quote(" PID_HDR_CNTLOC = 24,") 101cpp_quote(" PID_HDR_TO = 25,") 102cpp_quote(" PID_HDR_PATH = 26,") 103cpp_quote(" PID_HDR_FOLLOWUPTO = 27,") 104cpp_quote(" PID_HDR_EXPIRES = 28,") 105cpp_quote(" PID_HDR_CC = 29,") 106cpp_quote(" PID_HDR_CONTROL = 30,") 107cpp_quote(" PID_HDR_DISTRIB = 31,") 108cpp_quote(" PID_HDR_KEYWORDS = 32,") 109cpp_quote(" PID_HDR_SUMMARY = 33,") 110cpp_quote(" PID_HDR_APPROVED = 34,") 111cpp_quote(" PID_HDR_LINES = 35,") 112cpp_quote(" PID_HDR_XREF = 36,") 113cpp_quote(" PID_HDR_ORG = 37,") 114cpp_quote(" PID_HDR_XNEWSRDR = 38,") 115cpp_quote(" PID_HDR_XPRI = 39,") 116cpp_quote(" PID_HDR_XMSPRI = 40,") 117cpp_quote(" PID_PAR_FILENAME = 41,") 118cpp_quote(" PID_PAR_BOUNDARY = 42,") 119cpp_quote(" PID_PAR_CHARSET = 43,") 120cpp_quote(" PID_PAR_NAME = 44,") 121cpp_quote(" PID_ATT_FILENAME = 45,") 122cpp_quote(" PID_ATT_GENFNAME = 46,") 123cpp_quote(" PID_ATT_PRITYPE = 47,") 124cpp_quote(" PID_ATT_SUBTYPE = 48,") 125cpp_quote(" PID_ATT_NORMSUBJ = 49,") 126cpp_quote(" PID_ATT_ILLEGAL = 50,") 127cpp_quote(" PID_ATT_RENDERED = 51,") 128cpp_quote(" PID_ATT_SENTTIME = 52,") 129cpp_quote(" PID_ATT_RECVTIME = 53,") 130cpp_quote(" PID_ATT_PRIORITY = 54,") 131cpp_quote(" PID_HDR_COMMENT = 55,") 132cpp_quote(" PID_HDR_ENCODING = 56,") 133cpp_quote(" PID_HDR_ENCRYPTED = 57,") 134cpp_quote(" PID_HDR_OFFSETS = 58,") 135cpp_quote(" PID_HDR_XUNSENT = 59,") 136cpp_quote(" PID_HDR_ARTICLEID = 60,") 137cpp_quote(" PID_HDR_SENDER = 61,") 138cpp_quote(" PID_ATT_SERVER = 62,") 139cpp_quote(" PID_ATT_ACCOUNT = 63,") 140cpp_quote(" PID_ATT_UIDL = 64,") 141cpp_quote(" PID_ATT_STOREMSGID = 65,") 142cpp_quote(" PID_ATT_USERNAME = 66,") 143cpp_quote(" PID_ATT_FORWARDTO = 67,") 144cpp_quote(" PID_ATT_STOREFOLDERID = 68,") 145cpp_quote(" PID_ATT_GHOSTED = 69,") 146cpp_quote(" PID_ATT_UNCACHEDSIZE = 70,") 147cpp_quote(" PID_ATT_COMBINED = 71,") 148cpp_quote(" PID_ATT_AUTOINLINED = 72,") 149cpp_quote(" PID_HDR_DISP_NOTIFICATION_TO = 73,") 150cpp_quote(" PID_PAR_REPLYTYPE = 74,") 151cpp_quote(" PID_PAR_FORMAT = 75,") 152cpp_quote(" PID_ATT_FORMAT = 76,") 153cpp_quote(" PID_HDR_INREPLYTO = 77,") 154cpp_quote(" PID_ATT_ACCOUNTNAME = 78,") 155cpp_quote(" PID_LAST = 79,") 156cpp_quote("} MIMEPROPID;") 157 158cpp_quote("#define ISPIDSTR(_name) (((DWORD_PTR)(_name) >> 16) == 0)") 159cpp_quote("#define STRTOPID(_name) ((DWORD)((DWORD_PTR)((LPCSTR)(_name))))") 160cpp_quote("#define PIDTOSTR(_id) ((LPCSTR)((DWORD_PTR)(_id)))") 161 162cpp_quote("#define TYPEDID_ID(_typedid) (((ULONG)(_typedid))>>16)") 163cpp_quote("#define TYPEDID_MASK ((ULONG)0xffff)") 164cpp_quote("#define TYPEDID_TYPE(t) ((VARTYPE)((t) & TYPEDID_MASK))") 165 166cpp_quote("#define OID_ALLOW_8BIT_HEADER (0x00010000 | VT_BOOL)") 167cpp_quote("#define OID_CBMAX_HEADER_LINE (0x00020000 | VT_UI4)") 168cpp_quote("#define OID_SAVE_FORMAT (0x00030000 | VT_UI4)") 169cpp_quote("#define OID_WRAP_BODY_TEXT (0x00040000 | VT_BOOL)") 170cpp_quote("#define OID_CBMAX_BODY_LINE (0x00050000 | VT_UI4)") 171cpp_quote("#define OID_TRANSMIT_BODY_ENCODING (0x00060000 | VT_UI4)") 172cpp_quote("#define OID_TRANSMIT_TEXT_ENCODING (0x00070000 | VT_UI4)") 173cpp_quote("#define OID_GENERATE_MESSAGE_ID (0x00080000 | VT_BOOL)") 174cpp_quote("#define OID_HIDE_TNEF_ATTACHMENTS (0x000e0000 | VT_BOOL)") 175cpp_quote("#define OID_CLEANUP_TREE_ON_SAVE (0x000f0000 | VT_BOOL)") 176cpp_quote("#define OID_BODY_REMOVE_NBSP (0x00140000 | VT_BOOL)") 177cpp_quote("#define OID_DEFAULT_BODY_CHARSET (0x00150000 | VT_UI4)") 178cpp_quote("#define OID_DEFAULT_HEADER_CHARSET (0x00160000 | VT_UI4)") 179cpp_quote("#define OID_DBCS_ESCAPE_IS_8BIT (0x00170000 | VT_BOOL)") 180cpp_quote("#define OID_SECURITY_TYPE (0x00180000 | VT_UI4)") 181cpp_quote("#define OID_SECURITY_HWND_OWNER (0x00320000 | VT_UI4)") 182cpp_quote("#define OID_HEADER_RELOAD_TYPE (0x00370000 | VT_UI4)") 183cpp_quote("#define OID_CAN_INLINE_TEXT_BODIES (0x00380000 | VT_BOOL)") 184cpp_quote("#define OID_SHOW_MACBINARY (0x00390000 | VT_BOOL)") 185cpp_quote("#define OID_SAVEBODY_KEEPBOUNDARY (0x00400000 | VT_BOOL)") 186 187cpp_quote("#define OID_SECURITY_2KEY_CERT_BAG (0x00590000 | VT_VECTOR | VT_UI4)") 188cpp_quote("#define OID_SECURITY_2KEY_CERT_BAG_64 (0x00590000 | VT_VECTOR | VT_UI8)") 189 190[ 191 uuid(e4b28371-83b0-11d0-8259-00c04fd85ab4), 192 version(1.0) 193] 194library MIMEOLE 195{ 196 importlib("stdole2.tlb"); 197 198 DECLARE_HANDLE(HCHARSET); 199 DECLARE_HANDLE(HBODY); 200 DECLARE_HANDLE(HHEADERROW); 201 202 typedef HCHARSET *LPHCHARSET; 203 typedef HBODY *LPHBODY; 204 typedef HHEADERROW *LPHHEADERROW; 205 typedef DWORD TYPEDID; 206 typedef const PROPVARIANT *LPCPROPVARIANT; 207 typedef const BLOB *LPCBLOB; 208 209 typedef enum tagRELOADTYPE 210 { 211 RELOAD_HEADER_NONE, 212 RELOAD_HEADER_RESET, 213 RELOAD_HEADER_APPEND, 214 RELOAD_HEADER_REPLACE, 215 } RELOADTYPE; 216 217 typedef enum tagMIMESAVETYPE 218 { 219 SAVE_RFC822, 220 SAVE_RFC1521, 221 } MIMESAVETYPE; 222 223 typedef enum tagCSETAPPLYTYPE 224 { 225 CSET_APPLY_UNTAGGED, 226 CSET_APPLY_ALL, 227 CSET_APPLY_TAG_ALL, 228 } CSETAPPLYTYPE; 229 230 typedef enum tagENCODINGTYPE 231 { 232 IET_BINARY, 233 IET_BASE64, 234 IET_UUENCODE, 235 IET_QP, 236 IET_7BIT, 237 IET_8BIT, 238 IET_INETCSET, 239 IET_UNICODE, 240 IET_RFC1522, 241 IET_ENCODED, 242 IET_CURRENT, 243 IET_UNKNOWN, 244 IET_BINHEX40, 245 IET_LAST 246 } ENCODINGTYPE; 247 248 const SHORT IET_DECODED = IET_BINARY; 249 250 const SHORT CCHMAX_HEADER_LINE = 1000; 251 252 [ 253 uuid(c5588349-7f86-11d0-8252-00c04fd85ab4), 254 object 255 ] 256 interface IMimeInternational : IUnknown 257 { 258 typedef [unique] IMimeInternational *LPMIMEINTERNATIONAL; 259 typedef DWORD CODEPAGEID; 260 261 const CODEPAGEID CP_USASCII = 1252; 262 const CODEPAGEID CP_UNICODE = 1200; 263 const CODEPAGEID CP_JAUTODETECT = 50932; 264 const CODEPAGEID CP_KAUTODETECT = 50949; 265 const CODEPAGEID CP_ISO2022JPESC = 50221; 266 const CODEPAGEID CP_ISO2022JPSIO = 50222; 267 268 const SHORT CCHMAX_CSET_NAME = 128; 269 const SHORT CCHMAX_LANG_NAME = 128; 270 const SHORT CCHMAX_FACE_NAME = 128; 271 272 typedef struct tagINETCSETINFO 273 { 274 CHAR szName[CCHMAX_CSET_NAME]; 275 HCHARSET hCharset; 276 CODEPAGEID cpiWindows; 277 CODEPAGEID cpiInternet; 278 DWORD dwReserved1; 279 } INETCSETINFO, *LPINETCSETINFO; 280 281 typedef enum tagINETLANGMASK 282 { 283 ILM_FAMILY = 0x01, 284 ILM_NAME = 0x02, 285 ILM_BODYCSET = 0x04, 286 ILM_HEADERCSET = 0x08, 287 ILM_WEBCSET = 0x10, 288 ILM_FIXEDFONT = 0x20, 289 ILM_VARIABLEFONT = 0x40, 290 } INETLANGMASK; 291 292 typedef struct tagCODEPAGEINFO 293 { 294 DWORD dwMask; 295 CODEPAGEID cpiCodePage; 296 BOOL fIsValidCodePage; 297 ULONG ulMaxCharSize; 298 BOOL fInternetCP; 299 CODEPAGEID cpiFamily; 300 CHAR szName[CCHMAX_LANG_NAME]; 301 CHAR szBodyCset[CCHMAX_CSET_NAME]; 302 CHAR szHeaderCset[CCHMAX_CSET_NAME]; 303 CHAR szWebCset[CCHMAX_CSET_NAME]; 304 CHAR szFixedFont[CCHMAX_FACE_NAME]; 305 CHAR szVariableFont[CCHMAX_FACE_NAME]; 306 ENCODINGTYPE ietNewsDefault; 307 ENCODINGTYPE ietMailDefault; 308 DWORD dwReserved1; 309 } CODEPAGEINFO, *LPCODEPAGEINFO; 310 311 typedef struct tagRFC1522INFO 312 { 313 BOOL fRfc1522Allowed; 314 BOOL fRfc1522Used; 315 BOOL fAllow8bit; 316 HCHARSET hRfc1522Cset; 317 } RFC1522INFO, *LPRFC1522INFO; 318 319 typedef enum tagCHARSETTYPE 320 { 321 CHARSET_BODY, 322 CHARSET_HEADER, 323 CHARSET_WEB, 324 } CHARSETTYPE; 325 326 327 HRESULT SetDefaultCharset( 328 [in] HCHARSET hCharset); 329 HRESULT GetDefaultCharset( 330 [out] LPHCHARSET phCharset); 331 HRESULT GetCodePageCharset( 332 [in] CODEPAGEID cpiCodePage, 333 [in] CHARSETTYPE ctCsetType, 334 [out] LPHCHARSET phCharset); 335 HRESULT FindCharset( 336 [in] LPCSTR pszCharset, 337 [out] LPHCHARSET phCharset); 338 HRESULT GetCharsetInfo( 339 [in] HCHARSET hCharset, 340 [in, out] LPINETCSETINFO pCsetInfo); 341 HRESULT GetCodePageInfo( 342 [in] CODEPAGEID cpiCodePage, 343 [in, out] LPCODEPAGEINFO pCodePageInfo); 344 HRESULT CanConvertCodePages( 345 [in] CODEPAGEID cpiSource, 346 [in] CODEPAGEID cpiDest); 347 HRESULT DecodeHeader( 348 [in] HCHARSET hCharset, 349 [in] LPCSTR pszData, 350 [in, out] LPPROPVARIANT pDecoded, 351 [in, out] LPRFC1522INFO pRfc1522Info); 352 HRESULT EncodeHeader( 353 [in] HCHARSET hCharset, 354 [in] LPPROPVARIANT pData, 355 [out] LPSTR *ppszEncoded, 356 [in, out] LPRFC1522INFO pRfc1522Info); 357 HRESULT ConvertBuffer( 358 [in] CODEPAGEID cpiSource, 359 [in] CODEPAGEID cpiDest, 360 [in] LPBLOB pIn, 361 [in, out] LPBLOB pOut, 362 [out] ULONG *pcbRead); 363 HRESULT ConvertString( 364 [in] CODEPAGEID cpiSource, 365 [in] CODEPAGEID cpiDest, 366 [in] LPPROPVARIANT pIn, 367 [in, out] LPPROPVARIANT pOut); 368 HRESULT MLANG_ConvertInetReset(void); 369 HRESULT MLANG_ConvertInetString( 370 [in] CODEPAGEID cpiSource, 371 [in] CODEPAGEID cpiDest, 372 [in] LPCSTR pSource, 373 [in] int *pnSizeOfSource, 374 [in,out,unique] LPSTR pDestination, 375 [in] int *pnDstSize); 376 HRESULT Rfc1522Decode( 377 [in] LPCSTR pszValue, 378 [in,ref] LPSTR pszCharset, 379 [in] ULONG cchmax, 380 [out] LPSTR *ppszDecoded); 381 HRESULT Rfc1522Encode( 382 [in] LPCSTR pszValue, 383 [in] HCHARSET hCharset, 384 [out] LPSTR *ppszEncoded); 385 } 386 387 [ 388 uuid(c5588353-7f86-11d0-8252-00c04fd85ab4), 389 object 390 ] 391 interface IMimeSecurity : IUnknown 392 { 393 typedef [unique] IMimeSecurity *LPMIMESECURITY; 394 395 cpp_quote("#ifdef __WINE_WINCRYPT_H") 396 cpp_quote("typedef PCCERT_CONTEXT PCX509CERT;") 397 cpp_quote("#else") 398 typedef const void *PCX509CERT; 399 typedef void *HCERTSTORE; 400 cpp_quote("#endif") 401 402 typedef BLOB THUMBBLOB; 403 typedef void *HCAPICERTSTORE; 404 405 cpp_quote("#define MST_NONE 0x00000000") 406 cpp_quote("#define MST_THIS_SIGN 0x00000001") 407 cpp_quote("#define MST_THIS_ENCRYPT 0x00000002") 408 cpp_quote("#define MST_BLOB_FLAG 0x00000004") 409 cpp_quote("#define MST_THIS_BLOBSIGN (MST_BLOB_FLAG | MST_THIS_SIGN)") 410 cpp_quote("#define MST_CHILD_SIGN 0x00000100") 411 cpp_quote("#define MST_CHILD_ENCRYPT 0x00000200") 412 cpp_quote("#define MST_SUBMSG_SIGN 0x00001000") 413 cpp_quote("#define MST_SUBMSG_ENCRYPT 0x00002000") 414 cpp_quote("#define MST_RECEIPT_REQUEST 0x00010000") 415 cpp_quote("#define MST_CLASS_SMIME_V1 0x00000000") 416 cpp_quote("#define MST_CLASS_PGP 0x01000000") 417 418 typedef enum tagCERTSTATE 419 { 420 CERTIFICATE_OK, 421 CERTIFICATE_NOT_PRESENT, 422 CERTIFICATE_EXPIRED, 423 CERTIFICATE_CHAIN_TOO_LONG, 424 CERTIFICATE_MISSING_ISSUER, 425 CERTIFICATE_CRL_LISTED, 426 CERTIFICATE_NOT_TRUSTED, 427 CERTIFICATE_INVALID, 428 CERTIFICATE_ERROR, 429 CERTIFICATE_NOPRINT, 430 CERTIFICATE_UNKNOWN 431 } CERTSTATE; 432 433 typedef enum tagCERTNAMETYPE 434 { 435 SIMPLE, 436 OID, 437 X500, 438 } CERTNAMETYPE; 439 440 typedef enum tagCERTDATAID 441 { 442 CDID_EMAIL, 443 CDID_MAX 444 } CERTDATAID; 445 446 typedef struct tagX509CERTRESULT 447 { 448 DWORD cEntries; 449 CERTSTATE *rgcs; 450 PCX509CERT *rgpCert; 451 } X509CERTRESULT, *PX509CERTRESULT; 452 typedef const X509CERTRESULT *PCX509CERTRESULT; 453 454 HRESULT InitNew(void); 455 456 HRESULT CheckInit(void); 457 458 HRESULT EncodeMessage( 459 [in] IMimeMessageTree */*const*/ pTree, 460 [in] DWORD dwFlags); 461 462 HRESULT EncodeBody( 463 [in] IMimeMessageTree */*const*/ pTree, 464 [in] HBODY hEncodeRoot, 465 [in] DWORD dwFlags); 466 467 HRESULT DecodeMessage( 468 [in] IMimeMessageTree */*const*/ pTree, 469 [in] DWORD dwFlags); 470 471 HRESULT DecodeBody( 472 [in] IMimeMessageTree */*const*/ pTree, 473 [in] HBODY hDecodeRoot, 474 [in] DWORD dwFlags); 475 476 HRESULT EnumCertificates( 477 [in] HCAPICERTSTORE hc, 478 [in] DWORD dwUsage, 479 [in] PCX509CERT pPrev, 480 [out] PCX509CERT *ppCert); 481 482 HRESULT GetCertificateName( 483 [in] const PCX509CERT pX509Cert, 484 [in] const CERTNAMETYPE cn, 485 [out] LPSTR *ppszName); 486 487 HRESULT GetMessageType( 488 [in] const HWND hwndParent, 489 [in] IMimeBody */*const*/ pBody, 490 [out] DWORD */*const*/ pdwSecType); 491 492 HRESULT GetCertData( 493 [in] const PCX509CERT pX509Cert, 494 [in] const CERTDATAID dataid, 495 [out, ref] LPPROPVARIANT pValue); 496 } 497 498 [ 499 uuid(fd853cd1-7f86-11d0-8252-00c04fd85ab4), 500 object 501 ] 502 interface IMimeHeaderTable : IPersistStream 503 { 504 /* FIXME: fill this in */ 505 } 506 507 [ 508 uuid(fd853cec-7f86-11d0-8252-00c04fd85ab4), 509 object 510 ] 511 interface IMimePropertySchema : IUnknown 512 { 513 typedef [unique] IMimePropertySchema *LPMIMEPROPERTYSCHEMA; 514 515 typedef enum tagMIMEPROPFLAGS 516 { 517 MPF_INETCSET = 0x01, 518 MPF_RFC1522 = 0x02, 519 MPF_ADDRESS = 0x04, 520 MPF_HASPARAMS = 0x08, 521 MPF_MIME = 0x10, 522 MPF_READONLY = 0x20 523 } MIMEPROPFLAGS; 524 525 HRESULT RegisterProperty( 526 [in] const char *name, 527 [in] DWORD flags, 528 [in] DWORD rownumber, 529 [in] VARTYPE vtdefault, 530 [out] DWORD *propid); 531 532 HRESULT ModifyProperty( 533 [in] const char *name, 534 [in] DWORD flags, 535 [in] DWORD rownumber, 536 [in] VARTYPE vtdefault); 537 538 HRESULT GetPropertyId( 539 [in] const char *name, 540 [out] DWORD *propid); 541 542 HRESULT GetPropertyName( 543 [in] DWORD propid, 544 [out] char **name); 545 546 HRESULT RegisterAddressType( 547 [in] const char *name, 548 [out] DWORD *adrtype); 549 } 550 551 [ 552 uuid(fd853cd3-7f86-11d0-8252-00c04fd85ab4), 553 object 554 ] 555 interface IMimePropertySet : IPersistStreamInit 556 { 557 typedef [unique] IMimePropertySet *LPMIMEPROPERTYSET; 558 559 cpp_quote("#define PDF_ENCODED 0x00000001") 560 cpp_quote("#define PDF_NAMEINDATA 0x00000002") 561 cpp_quote("#define PDF_HEADERFORMAT (0x00000004 | PDF_ENCODED)") 562 cpp_quote("#define PDF_NOCOMMENTS 0x00000008") 563 cpp_quote("#define PDF_SAVENOENCODE 0x00000010") 564 cpp_quote("#define PDF_VECTOR 0x00000020") 565 566 typedef struct tagMIMEPARAMINFO 567 { 568 LPSTR pszName; 569 LPSTR pszData; 570 } MIMEPARAMINFO, *LPMIMEPARAMINFO; 571 572 typedef enum tagPROPINFOMASK 573 { 574 PIM_CHARSET = 0x01, 575 PIM_ENCODINGTYPE = 0x02, 576 PIM_ROWNUMBER = 0x04, 577 PIM_FLAGS = 0x08, 578 PIM_PROPID = 0x10, 579 PIM_VALUES = 0x20, 580 PIM_VTDEFAULT = 0x40, 581 PIM_VTCURRENT = 0x80 582 } PROPINFOMASK; 583 584 typedef struct tagMIMEPROPINFO 585 { 586 DWORD dwMask; 587 HCHARSET hCharset; 588 ENCODINGTYPE ietEncoding; 589 DWORD dwRowNumber; 590 DWORD dwFlags; 591 DWORD dwPropId; 592 DWORD cValues; 593 VARTYPE vtDefault; 594 VARTYPE vtCurrent; 595 } MIMEPROPINFO, *LPMIMEPROPINFO; 596 typedef const MIMEPROPINFO *LPCMIMEPROPINFO; 597 598 HRESULT GetPropInfo( 599 [in] LPCSTR pszName, 600 [in,out] LPMIMEPROPINFO pInfo); 601 602 HRESULT SetPropInfo( 603 [in] LPCSTR pszName, 604 [in] LPCMIMEPROPINFO pInfo); 605 606cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") 607cpp_quote("#undef GetProp") 608cpp_quote("#undef SetProp") 609cpp_quote("#undef EnumProps") 610cpp_quote("#endif") 611 HRESULT GetProp( 612 [in] LPCSTR pszName, 613 [in] DWORD dwFlags, 614 [in,out] LPPROPVARIANT pValue); 615 616 HRESULT SetProp( 617 [in] LPCSTR pszName, 618 [in] DWORD dwFlags, 619 [in] LPCPROPVARIANT pValue); 620 621 HRESULT AppendProp( 622 [in] LPCSTR pszName, 623 [in] DWORD dwFlags, 624 [in] LPPROPVARIANT pValue); 625 626 HRESULT DeleteProp( 627 [in] LPCSTR pszName); 628 629 HRESULT CopyProps( 630 [in] ULONG cNames, 631 [in,unique] LPCSTR *prgszName, 632 [in] IMimePropertySet *pPropertySet); 633 634 HRESULT MoveProps( 635 [in] ULONG cNames, 636 [in] LPCSTR *prgszName, 637 [in] IMimePropertySet *pPropertySet); 638 639 HRESULT DeleteExcept( 640 [in] ULONG cNames, 641 [in] LPCSTR *prgszName); 642 643 HRESULT QueryProp( 644 [in] LPCSTR pszName, 645 [in] LPCSTR pszCriteria, 646 [in] boolean fSubString, 647 [in] boolean fCaseSensitive); 648 649 HRESULT GetCharset( 650 [out] LPHCHARSET phCharset); 651 652 HRESULT SetCharset( 653 [in] HCHARSET hCharset, 654 [in] CSETAPPLYTYPE applytype); 655 656 HRESULT GetParameters( 657 [in] LPCSTR pszName, 658 [out] ULONG *pcParams, 659 [out] LPMIMEPARAMINFO *pprgParam); 660 661 HRESULT IsContentType( 662 [in] LPCSTR pszPriType, 663 [in,unique] LPCSTR pszSubType); 664 665 HRESULT BindToObject( 666 [in] REFIID riid, 667 [out,iid_is(riid)] void **ppvObject); 668 669 HRESULT Clone( 670 [out] IMimePropertySet **ppPropertySet); 671 672 HRESULT SetOption( 673 [in] const TYPEDID oid, 674 [in] LPCPROPVARIANT pValue); 675 676 HRESULT GetOption( 677 [in] const TYPEDID oid, 678 [in,out] LPPROPVARIANT pValue); 679 680 cpp_quote("#define EPF_NONAME 0x00000001") 681 682 HRESULT EnumProps( 683 [in] DWORD dwFlags, 684 [out] IMimeEnumProperties **ppEnum); 685 686 } 687 688 [ 689 uuid(c558834a-7f86-11d0-8252-00c04fd85ab4), 690 object 691 ] 692 interface IMimeAddressTable : IUnknown 693 { 694 typedef [unique] IMimeAddressTable *LPMIMEADDRESSTABLE; 695 696 DECLARE_HANDLE(HADDRESS); 697 typedef HADDRESS *LPHADDRESS; 698 typedef DWORD IADDRESSTYPE; 699 700 typedef enum tagADDRESSFORMAT 701 { 702 AFT_DISPLAY_FRIENDLY, 703 AFT_DISPLAY_EMAIL, 704 AFT_DISPLAY_BOTH, 705 AFT_RFC822_DECODED, 706 AFT_RFC822_ENCODED, 707 AFT_RFC822_TRANSMIT, 708 } ADDRESSFORMAT; 709 710 cpp_quote("#define IAT_UNKNOWN 0x00000000") 711 cpp_quote("#define IAT_FROM 0x00000001") 712 cpp_quote("#define IAT_SENDER 0x00000002") 713 cpp_quote("#define IAT_TO 0x00000004") 714 cpp_quote("#define IAT_CC 0x00000008") 715 cpp_quote("#define IAT_BCC 0x00000010") 716 cpp_quote("#define IAT_REPLYTO 0x00000020") 717 cpp_quote("#define IAT_RETURNPATH 0x00000040") 718 cpp_quote("#define IAT_RETRCPTTO 0x00000080") 719 cpp_quote("#define IAT_RR 0x00000100") 720 cpp_quote("#define IAT_APPARTO 0x00000200") 721 cpp_quote("#define IAT_DISP_NOTIFICATION_TO 0x00000400") 722 cpp_quote("#define IAT_ALL 0xffffffff") 723 cpp_quote("#define IAT_KNOWN (IAT_FROM | IAT_TO | IAT_CC | IAT_BCC | IAT_REPLYTO | IAT_SENDER)") 724 cpp_quote("#define IAT_RECIPS (IAT_TO | IAT_CC | IAT_BCC)") 725 726 typedef struct tagADDRESSPROPS 727 { 728 DWORD dwProps; 729 HADDRESS hAddress; 730 ENCODINGTYPE ietFriendly; 731 HCHARSET hCharset; 732 DWORD dwAdrType; 733 LPSTR pszFriendly; 734 LPWSTR pwszReserved; 735 LPSTR pszEmail; 736 CERTSTATE certstate; 737 THUMBBLOB tbSigning; 738 THUMBBLOB tbEncryption; 739 DWORD dwCookie; 740 DWORD dwReserved1; 741 DWORD dwReserved2; 742 } ADDRESSPROPS, *LPADDRESSPROPS; 743 744 cpp_quote("#define IAP_CHARSET 0x00000001") 745 cpp_quote("#define IAP_HANDLE 0x00000002") 746 cpp_quote("#define IAP_ADRTYPE 0x00000004") 747 cpp_quote("#define IAP_FRIENDLY 0x00000008") 748 cpp_quote("#define IAP_EMAIL 0x00000020") 749 cpp_quote("#define IAP_CERTSTATE 0x00000100") 750 cpp_quote("#define IAP_SIGNING_PRINT 0x00000200") 751 cpp_quote("#define IAP_ENCRYPTION_PRINT 0x00000400") 752 cpp_quote("#define IAP_ENCODING 0x00000800") 753 cpp_quote("#define IAP_COOKIE 0x00001000") 754 cpp_quote("#define IAP_FRIENDLYW 0x00002000") 755 cpp_quote("#define IAP_ALL 0xffffffff") 756 757 typedef struct tagADDRESSLIST 758 { 759 ULONG cAdrs; 760 LPADDRESSPROPS prgAdr; 761 } ADDRESSLIST, *LPADDRESSLIST; 762 763 HRESULT Append( 764 [in] DWORD addrtype, 765 [in] ENCODINGTYPE encoding, 766 [in] const char *friendly, 767 [in,unique] const char *email, 768 [in,out,unique] HADDRESS *address); 769 770 HRESULT Insert( 771 [in] ADDRESSPROPS *addressprop, 772 [in,out,unique] HADDRESS *address); 773 774 HRESULT SetProps( 775 [in] HADDRESS address, 776 [in] ADDRESSPROPS *addressprop); 777 778 HRESULT GetProps( 779 [in] HADDRESS address, 780 [in] ADDRESSPROPS *addressprop); 781 782 HRESULT GetSender( 783 [in,out] ADDRESSPROPS *addressprop); 784 785 HRESULT CountTypes( 786 [in] DWORD addrtype, 787 [out] ULONG *count); 788 789 HRESULT GetTypes( 790 [in] DWORD addrtype, 791 [in] DWORD dwProps, 792 [in,out] ADDRESSLIST *list); 793 794 HRESULT EnumTypes( 795 [in] DWORD addrtype, 796 [in] DWORD props, 797 [out] IMimeEnumAddressTypes **types); 798 799 HRESULT Delete( 800 [in] HADDRESS hAddress); 801 802 HRESULT DeleteTypes( 803 [in] DWORD addrtype); 804 805 HRESULT GetFormat( 806 [in] DWORD addrtype, 807 [in] ADDRESSFORMAT addrformat, 808 [out] char **format); 809 810 HRESULT AppendRfc822( 811 [in] DWORD addrtype, 812 [in] ENCODINGTYPE encoding, 813 [in] const char *rfcaddr); 814 815 HRESULT ParseRfc822( 816 [in] DWORD addrtype, 817 [in] ENCODINGTYPE encoding, 818 [in] const char *rfcaddr, 819 [in,out] ADDRESSLIST *list); 820 821 HRESULT Clone( 822 [out] IMimeAddressTable **table); 823 824 HRESULT BindToObject( 825 [in] REFIID riid, 826 [out, iid_is(riid)] void **obj); 827 } 828 829 [ 830 uuid(ee519f11-851a-11d0-8252-00c04fd85ab4), 831 object 832 ] 833 interface IMimeWebDocument : IUnknown 834 { 835 /* FIXME: fill this in */ 836 } 837 838 [ 839 uuid(c558834c-7f86-11d0-8252-00c04fd85ab4), 840 object 841 ] 842 interface IMimeBody : IMimePropertySet 843 { 844 typedef [unique] IMimeBody *LPMIMEBODY; 845 846 typedef enum tagIMSGBODYTYPE 847 { 848 IBT_SECURE, 849 IBT_ATTACHMENT, 850 IBT_EMPTY, 851 IBT_CSETTAGGED, 852 IBT_AUTOATTACH, 853 } IMSGBODYTYPE; 854 855 typedef struct tagBODYOFFSETS 856 { 857 DWORD cbBoundaryStart; 858 DWORD cbHeaderStart; 859 DWORD cbBodyStart; 860 DWORD cbBodyEnd; 861 } BODYOFFSETS, *LPBODYOFFSETS; 862 863 typedef struct tagTRANSMITINFO 864 { 865 ENCODINGTYPE ietCurrent; 866 ENCODINGTYPE ietXmitMime; 867 ENCODINGTYPE ietXmit822; 868 ULONG cbLongestLine; 869 ULONG cExtended; 870 ULONG ulPercentExt; 871 ULONG cbSize; 872 ULONG cLines; 873 } TRANSMITINFO, *LPTRANSMITINFO; 874 875 HRESULT IsType( 876 [in] IMSGBODYTYPE bodytype); 877 878 HRESULT SetDisplayName( 879 [in] LPCSTR pszDisplay); 880 881 HRESULT GetDisplayName( 882 [out] LPSTR *ppszDisplay); 883 884 HRESULT GetOffsets( 885 [out] LPBODYOFFSETS pOffsets); 886 887 HRESULT GetCurrentEncoding( 888 [out] ENCODINGTYPE *pietEncoding); 889 890 HRESULT SetCurrentEncoding( 891 [in] ENCODINGTYPE ietEncoding); 892 893 HRESULT GetEstimatedSize( 894 [in] ENCODINGTYPE ietEncoding, 895 [out] ULONG *pcbSize); 896 897 HRESULT GetDataHere( 898 [in] ENCODINGTYPE ietEncoding, 899 [in] IStream *pStream); 900 901 HRESULT GetData( 902 [in] ENCODINGTYPE ietEncoding, 903 [out] IStream **ppStream); 904 905 HRESULT SetData( 906 [in] ENCODINGTYPE ietEncoding, 907 [in,unique] LPCSTR pszPriType, 908 [in,unique] LPCSTR pszSubType, 909 [in] REFIID riid, 910 [in,iid_is(riid)] LPVOID pvObject); 911 912 HRESULT EmptyData(void); 913 914 HRESULT CopyTo( 915 [in] IMimeBody *pBody); 916 917 HRESULT GetTransmitInfo( 918 [in,out] LPTRANSMITINFO pTransmitInfo); 919 920 HRESULT SaveToFile( 921 [in] ENCODINGTYPE ietEncoding, 922 [in] LPCSTR pszFilePath); 923 924 HRESULT GetHandle( 925 [out] LPHBODY phBody); 926 927 } 928 929 [ 930 uuid(fd853cd4-7f86-11d0-8252-00c04fd85ab4), 931 object 932 ] 933 interface IMimeMessageTree : IPersistStreamInit 934 { 935 typedef [unique] IMimeMessageTree *LPMIMEMESSAGETREE; 936 937 const HBODY HBODY_ROOT = (HBODY)-1; 938 939 typedef enum tagBODYLOCATION 940 { 941 IBL_ROOT, 942 IBL_PARENT, 943 IBL_FIRST, 944 IBL_LAST, 945 IBL_NEXT, 946 IBL_PREVIOUS, 947 } BODYLOCATION; 948 949 typedef struct tagFINDBODY 950 { 951 LPSTR pszPriType; 952 LPSTR pszSubType; 953 DWORD dwReserved; 954 } FINDBODY, *LPFINDBODY; 955 956 HRESULT GetMessageSource( 957 [out] IStream **ppStream, 958 [in] DWORD dwFlags); 959 960 HRESULT GetMessageSize( 961 [out] ULONG *pcbSize, 962 [in] DWORD dwFlags); 963 964 HRESULT LoadOffsetTable( 965 [in] IStream *pStream); 966 967 HRESULT SaveOffsetTable( 968 [in] IStream *pStream, 969 [in] DWORD dwFlags); 970 971 HRESULT GetFlags( 972 [out] DWORD *pdwFlags); 973 974 HRESULT Commit( 975 [in] DWORD dwFlags); 976 977 HRESULT HandsOffStorage(); 978 979 HRESULT BindToObject( 980 [in] const HBODY hBody, 981 [in] REFIID riid, 982 [out, iid_is(riid)] void **ppvObject); 983 984 HRESULT SaveBody( 985 [in] HBODY hBody, 986 [in] DWORD dwFlags, 987 [in] IStream *pStream); 988 989 HRESULT InsertBody( 990 [in] BODYLOCATION location, 991 [in] HBODY hPivot, 992 [out] LPHBODY phBody); 993 994 HRESULT GetBody( 995 [in] BODYLOCATION location, 996 [in] HBODY hPivot, 997 [out] LPHBODY phBody); 998 999 HRESULT DeleteBody( 1000 [in] HBODY hBody, 1001 [in] DWORD dwFlags); 1002 1003 HRESULT MoveBody( 1004 [in] HBODY hBody, 1005 [in] BODYLOCATION location); 1006 1007 HRESULT CountBodies( 1008 [in] HBODY hParent, 1009 [in] boolean fRecurse, 1010 [out] ULONG *pcBodies); 1011 1012 HRESULT FindFirst( 1013 [in, out] LPFINDBODY pFindBody, 1014 [out] LPHBODY phBody); 1015 1016 HRESULT FindNext( 1017 [in, out] LPFINDBODY pFindBody, 1018 [out] LPHBODY phBody); 1019 1020 HRESULT ResolveURL( 1021 [in] HBODY hRelated, 1022 [in] LPCSTR pszBase, 1023 [in] LPCSTR pszURL, 1024 [in] DWORD dwFlags, 1025 [out] LPHBODY phBody); 1026 1027 HRESULT ToMultipart( 1028 [in] HBODY hBody, 1029 [in] LPCSTR pszSubType, 1030 [out] LPHBODY phMultipart); 1031 1032 HRESULT GetBodyOffsets( 1033 [in] HBODY hBody, 1034 [in, out] LPBODYOFFSETS pOffsets); 1035 1036 HRESULT GetCharset( 1037 [out] LPHCHARSET phCharset); 1038 1039 HRESULT SetCharset( 1040 [in] HCHARSET hCharset, 1041 [in] CSETAPPLYTYPE applytype); 1042 1043 HRESULT IsBodyType( 1044 [in] HBODY hBody, 1045 [in] IMSGBODYTYPE bodytype); 1046 1047 HRESULT IsContentType( 1048 [in] HBODY hBody, 1049 [in] LPCSTR pszPriType, 1050 [in] LPCSTR pszSubType); 1051 1052 HRESULT QueryBodyProp( 1053 [in] HBODY hBody, 1054 [in] LPCSTR pszName, 1055 [in] LPCSTR pszCriteria, 1056 [in] boolean fSubString, 1057 [in] boolean fCaseSensitive); 1058 1059 HRESULT GetBodyProp( 1060 [in] HBODY hBody, 1061 [in] LPCSTR pszName, 1062 [in] DWORD dwFlags, 1063 [in, out] LPPROPVARIANT pValue); 1064 1065 HRESULT SetBodyProp( 1066 [in] HBODY hBody, 1067 [in] LPCSTR pszName, 1068 [in] DWORD dwFlags, 1069 [in] LPCPROPVARIANT pValue); 1070 1071 HRESULT DeleteBodyProp( 1072 [in] HBODY hBody, 1073 [in] LPCSTR pszName); 1074 1075 HRESULT SetOption( 1076 [in] const TYPEDID oid, 1077 [in] LPCPROPVARIANT pValue); 1078 1079 HRESULT GetOption( 1080 [in] const TYPEDID oid, 1081 [in, out] LPPROPVARIANT pValue); 1082 } 1083 1084 [ 1085 uuid(fd853cd5-7f86-11d0-8252-00c04fd85ab4), 1086 object 1087 ] 1088 interface IMimeMessage : IMimeMessageTree 1089 { 1090 typedef [unique] IMimeMessage *LPMIMEMESSAGE; 1091 1092 typedef DWORD TEXTTYPE; 1093 1094 typedef enum tagIMSGFLAGS 1095 { 1096 IMF_ATTACHMENTS = 0x00000001, 1097 IMF_MULTIPART = 0x00000002, 1098 IMF_SUBMULTIPART = 0x00000004, 1099 IMF_MIME = 0x00000008, 1100 IMF_HTML = 0x00000010, 1101 IMF_PLAIN = 0x00000020, 1102 IMF_PARTIAL = 0x00000040, 1103 IMF_SIGNED = 0x00000080, 1104 IMF_ENCRYPTED = 0x00000100, 1105 IMF_TNEF = 0x00000200, 1106 IMF_MHTML = 0x00000400, 1107 IMF_SECURE = 0x00000800, 1108 IMF_TEXT = 0x00001000, 1109 IMF_CSETTAGGED = 0x00002000, 1110 IMF_NEWS = 0x00004000, 1111 IMF_VOICEMAIL = 0x00008000, 1112 IMF_HASVCARD = 0x00010000, 1113 IMF_RFC1154 = 0x00020000, 1114 } IMSGFLAGS; 1115 1116 typedef enum tagIMSGPRIORITY 1117 { 1118 IMSG_PRI_LOW = 5, 1119 IMSG_PRI_NORMAL = 3, 1120 IMSG_PRI_HIGH = 1, 1121 } IMSGPRIORITY; 1122 1123 cpp_quote("#define WPF_HTML 0x00000001") 1124 cpp_quote("#define WPF_AUTOINLINE 0x00000002") 1125 cpp_quote("#define WPF_SLIDESHOW 0x00000004") 1126 cpp_quote("#define WPF_ATTACHLINKS 0x00000008") 1127 cpp_quote("#define WPF_IMAGESONLY 0x00000010") 1128 cpp_quote("#define WPF_NOMETACHARSET 0x00000020") 1129 1130 typedef struct tagWEPAGEOPTIONS 1131 { 1132 DWORD cbSize; 1133 DWORD dwFlags; 1134 DWORD dwDelay; 1135 WCHAR wchQuote; 1136 } WEBPAGEOPTIONS, *LPWEBPAGEOPTIONS; 1137 1138 cpp_quote("#define TXT_PLAIN 1") 1139 cpp_quote("#define TXT_HTML 2") 1140 1141 HRESULT CreateWebPage( 1142 [in] IStream *pRootStm, 1143 [in] LPWEBPAGEOPTIONS pOptions, 1144 [in] IMimeMessageCallback *pCallback, 1145 [out] IMoniker **ppMoniker); 1146 1147 HRESULT GetProp( 1148 [in] LPCSTR pszName, 1149 [in] DWORD dwFlags, 1150 [in,out] LPPROPVARIANT pValue); 1151 1152 HRESULT SetProp( 1153 [in] LPCSTR pszName, 1154 [in] DWORD dwFlags, 1155 [in] LPCPROPVARIANT pValue); 1156 1157 HRESULT DeleteProp( 1158 [in] LPCSTR pszName); 1159 1160 HRESULT QueryProp( 1161 [in] LPCSTR pszName, 1162 [in] LPCSTR pszCriteria, 1163 [in] boolean fSubString, 1164 [in] boolean fCaseSensitive); 1165 1166 HRESULT GetTextBody( 1167 [in] DWORD dwTxtType, 1168 [in] ENCODINGTYPE ietEncoding, 1169 [out] IStream **pStream, 1170 [out] LPHBODY phBody); 1171 1172 HRESULT SetTextBody( 1173 [in] DWORD dwTxtType, 1174 [in] ENCODINGTYPE ietEncoding, 1175 [in] HBODY hAlternative, 1176 [in] IStream *pStream, 1177 [out] LPHBODY phBody); 1178 1179 HRESULT AttachObject( 1180 [in] REFIID riid, 1181 [in, iid_is(riid)] void *pvObject, 1182 [out] LPHBODY phBody); 1183 1184 HRESULT AttachFile( 1185 [in] LPCSTR pszFilePath, 1186 [in] IStream *pstmFile, 1187 [out] LPHBODY phBody); 1188 1189 HRESULT AttachURL( 1190 [in] LPCSTR pszBase, 1191 [in] LPCSTR pszURL, 1192 [in] DWORD dwFlags, 1193 [in] IStream *pstmURL, 1194 [out] LPSTR *ppszCIDURL, 1195 [out] LPHBODY phBody); 1196 1197 HRESULT GetAttachments( 1198 [out] ULONG *pcAttach, 1199 [out] LPHBODY *pprghAttach); 1200 1201 HRESULT GetAddressTable( 1202 [out] IMimeAddressTable **ppTable); 1203 1204 HRESULT GetSender( 1205 [in, out] LPADDRESSPROPS pAddress); 1206 1207 HRESULT GetAddressTypes( 1208 [in] DWORD dwAdrTypes, 1209 [in] DWORD dwProps, 1210 [in, out] LPADDRESSLIST pList); 1211 1212 HRESULT GetAddressFormat( 1213 [in] DWORD dwAdrTypes, 1214 [in] ADDRESSFORMAT format, 1215 [out] LPSTR *ppszFormat); 1216 1217 HRESULT EnumAddressTypes( 1218 [in] DWORD dwAdrTypes, 1219 [in] DWORD dwProps, 1220 [out] IMimeEnumAddressTypes **ppEnum); 1221 1222 HRESULT SplitMessage( 1223 [in] ULONG cbMaxPart, 1224 [out] IMimeMessageParts **ppParts); 1225 1226 HRESULT GetRootMoniker( 1227 [out] IMoniker **ppMoniker); 1228 } 1229 1230 [ 1231 uuid(761aa741-7bda-11d1-8aa9-00c04fb951f3), 1232 object 1233 ] 1234 interface IMimeMessageCallback : IUnknown 1235 { 1236 HRESULT OnWebPageSplitter( 1237 [in] DWORD cInlined, 1238 [in] IStream *ppStream); 1239 } 1240 1241 [ 1242 uuid(de4ad8da-555f-11d1-8dd0-00c04fb951f9), 1243 object 1244 ] 1245 interface IPersistMime : IPersist 1246 { 1247 /* FIXME: fill this in */ 1248 } 1249 1250 [ 1251 uuid(c558834f-7f86-11d0-8252-00c04fd85ab4), 1252 object 1253 ] 1254 interface IMimeMessageParts : IUnknown 1255 { 1256 /* FIXME: fill this in */ 1257 } 1258 1259 [ 1260 uuid(c558834d-7f86-11d0-8252-00c04fd85ab4), 1261 object 1262 ] 1263 interface IMimeEnumHeaderRows : IUnknown 1264 { 1265 typedef struct tagENUMHEADERROW 1266 { 1267 HHEADERROW hRow; 1268 LPSTR pszHeader; 1269 LPSTR pszData; 1270 ULONG cchData; 1271 DWORD_PTR dwReserved; 1272 } ENUMHEADERROW, *LPENUMHEADERROW; 1273 1274 /* FIXME: fill this in */ 1275 } 1276 1277 [ 1278 uuid(fd853cee-7f86-11d0-8252-00c04fd85ab4), 1279 object 1280 ] 1281 interface IMimeEnumProperties : IUnknown 1282 { 1283 typedef [unique] IMimeEnumProperties *LPMIMEENUMPROPERTIES; 1284 1285 typedef struct tagENUMPROPERTY 1286 { 1287 LPSTR pszName; 1288 HHEADERROW hRow; 1289 DWORD dwPropId; 1290 } ENUMPROPERTY, *LPENUMPROPERTY; 1291 1292 HRESULT Next( 1293 [in] ULONG cFetch, 1294 [in, out] LPENUMPROPERTY prgProp, 1295 [out] ULONG *pcFetched); 1296 1297 HRESULT Skip( 1298 [in] ULONG cItems); 1299 1300 HRESULT Reset(void); 1301 1302 HRESULT Clone( 1303 [out] IMimeEnumProperties **ppEnum); 1304 1305 HRESULT Count( 1306 [out] ULONG *pcItems); 1307 1308 } 1309 1310 [ 1311 uuid(c5588354-7f86-11d0-8252-00c04fd85ab4), 1312 object 1313 ] 1314 interface IMimeEnumAddressTypes : IUnknown 1315 { 1316 /* FIXME: fill this in */ 1317 } 1318 1319 [ 1320 uuid(c5588350-7f86-11d0-8252-00c04fd85ab4), 1321 object 1322 ] 1323 interface IMimeEnumMessageParts : IUnknown 1324 { 1325 /* FIXME: fill this in */ 1326 } 1327 1328 [ 1329 uuid(64577981-86d7-11d1-bdfc-00c04fa31009), 1330 object 1331 ] 1332 interface IHashTable : IUnknown 1333 { 1334 /* FIXME: fill this in */ 1335 } 1336 1337 [ 1338 uuid(c5588351-7f86-11d0-8252-00c04fd85ab4), 1339 object 1340 ] 1341 interface IMimeAllocator : IMalloc 1342 { 1343 typedef [unique] IMimeAllocator *LPMIMEALLOCATOR; 1344 1345 HRESULT FreeParamInfoArray( 1346 [in] ULONG cParams, 1347 [in] LPMIMEPARAMINFO prgParam, 1348 [in] boolean fFreeArray); 1349 1350 HRESULT FreeAddressList( 1351 [in,out] LPADDRESSLIST pList); 1352 1353 HRESULT FreeAddressProps( 1354 [in,out] LPADDRESSPROPS pAddress); 1355 1356 HRESULT ReleaseObjects( 1357 [in] ULONG cObjects, 1358 [in] IUnknown **prgpUnknown, 1359 [in] boolean fFreeArray); 1360 1361 HRESULT FreeEnumHeaderRowArray( 1362 [in] ULONG cRows, 1363 [in] LPENUMHEADERROW prgRow, 1364 [in] boolean fFreeArray); 1365 1366 HRESULT FreeEnumPropertyArray( 1367 [in] ULONG cProps, 1368 [in] LPENUMPROPERTY prgProp, 1369 [in] boolean fFreeArray); 1370 1371 HRESULT FreeThumbprint( 1372 [in] THUMBBLOB *pthumbprint); 1373 1374 HRESULT PropVariantClear( 1375 [in] LPPROPVARIANT pProp); 1376 1377 } 1378 1379 [ 1380 uuid(feceaffd-c441-11d1-960e-00c04fbd7c09), 1381 object 1382 ] 1383 interface IMimeObjResolver : IUnknown 1384 { 1385 /* FIXME: fill this in */ 1386 } 1387 1388 [ 1389 uuid(b0d17fc2-7bc4-11d1-bdfa-00c04fa31009), 1390 object 1391 ] 1392 interface IFontCache : IUnknown 1393 { 1394 /* FIXME: fill this in */ 1395 } 1396 1397 [ 1398 uuid(b0d17fc5-7bc4-11d1-bdfa-00c04fa31009), 1399 object 1400 ] 1401 interface IFontCacheNotify : IUnknown 1402 { 1403 /* FIXME: fill this in */ 1404 } 1405 1406 [ 1407 uuid(70183210-7b36-11d2-8c12-00c04fa31009), 1408 object 1409 ] 1410 interface IMimeEditTag : IUnknown 1411 { 1412 /* FIXME: fill this in */ 1413 } 1414 1415 [ 1416 uuid(d09ee528-7b38-11d2-8c12-00c04fa31009), 1417 object 1418 ] 1419 interface IMimeEditTagCollection : IUnknown 1420 { 1421 /* FIXME: fill this in */ 1422 } 1423 1424 [ 1425 uuid(ba715ae0-a740-11d2-8b22-0080c76b34c6), 1426 local 1427 ] 1428 interface IMimeSecurityCallback : IUnknown 1429 { 1430 /* FIXME: fill this in */ 1431 1432 cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_UNKNOWN 0") 1433 cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_KEYTRANS 1") 1434 cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_KEYAGREE 2") 1435 cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_MAIL_LIST 3") 1436 1437 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_CERTIFICATE 0") 1438 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_KEYTRANS 1") 1439 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_PROVIDER 2") 1440 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_EPHEMERAL_KEYAGREE 3") 1441 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_STATIC_KEYAGREE 4") 1442 1443 cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_CERTIFICATE 0") 1444 cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_ISSUERSERIAL 1") 1445 cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_KEY_ID 2") 1446 1447 } 1448} 1449 1450cpp_quote("#ifdef __cplusplus") 1451cpp_quote(" extern \"C\" {") 1452cpp_quote("#endif") 1453 1454cpp_quote("") 1455cpp_quote("HRESULT WINAPI MimeOleSetCompatMode(DWORD);") 1456cpp_quote("HRESULT WINAPI MimeOleContentTypeFromUrl(LPCSTR,LPCSTR,LPSTR*);") 1457cpp_quote("HRESULT WINAPI MimeOleParseMhtmlUrl(LPSTR,LPSTR*,LPSTR*);") 1458cpp_quote("HRESULT WINAPI MimeOleObjectFromUrl(LPCSTR,BOOL,REFIID,LPVOID*,IUnknown**);") 1459cpp_quote("HRESULT WINAPI MimeOleObjectFromMoniker(BINDF,IMoniker*,IBindCtx*,REFIID,LPVOID*,IMoniker**);") 1460cpp_quote("HRESULT WINAPI MimeOleCombineURL(LPCSTR,ULONG,LPCSTR,ULONG,BOOL,LPSTR*);") 1461cpp_quote("HRESULT WINAPI MimeOleGetSubjectFileName(IMimePropertySet*,ULONG*,ULONG*,LPSTR,ULONG);") 1462cpp_quote("HRESULT WINAPI MimeOleCreateWebDocument(LPCSTR,LPCSTR,IMimeWebDocument**);") 1463cpp_quote("HRESULT WINAPI MimeOleGetRelatedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);") 1464cpp_quote("HRESULT WINAPI MimeOleGetMixedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);") 1465cpp_quote("HRESULT WINAPI MimeOleGetAlternativeSection(IMimeMessageTree*,LPHBODY,boolean*);") 1466cpp_quote("HRESULT WINAPI MimeOleGenerateCID(LPSTR,ULONG,boolean);") 1467cpp_quote("HRESULT WINAPI MimeOleGenerateMID(LPSTR,ULONG,boolean);") 1468cpp_quote("HRESULT WINAPI MimeOleCreateByteStream(IStream**);") 1469cpp_quote("HRESULT WINAPI MimeOlGetPropertySchema(IMimePropertySchema**);") 1470cpp_quote("HRESULT WINAPI MimeOleQueryString(LPCSTR,LPCSTR,boolean,boolean);") 1471cpp_quote("HRESULT WINAPI MimeOleGetPropA(IMimePropertySet*,LPCSTR,DWORD,LPSTR*);") 1472cpp_quote("HRESULT WINAPI MimeOleSetPropA(IMimePropertySet*,LPCSTR,DWORD,LPCSTR);") 1473cpp_quote("HRESULT WINAPI MimeOleGetPropW(IMimePropertySet*,LPCSTR,DWORD,LPWSTR*);") 1474cpp_quote("HRESULT WINAPI MimeOleSetPropW(IMimePropertySet*,LPCSTR,DWORD,LPCWSTR);") 1475cpp_quote("HRESULT WINAPI MimeOleGetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPSTR*);") 1476cpp_quote("HRESULT WINAPI MimeOleSetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCSTR);") 1477cpp_quote("HRESULT WINAPI MimeOleGetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPWSTR*);") 1478cpp_quote("HRESULT WINAPI MimeOleSetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCWSTR);") 1479cpp_quote("HRESULT WINAPI MimeOleCreateHeaderTable(IMimeHeaderTable**);") 1480cpp_quote("HRESULT WINAPI MimeOleVariantFree(LPPROPVARIANT);") 1481cpp_quote("HRESULT WINAPI MimeOleVariantCopy(LPPROPVARIANT,LPPROPVARIANT);") 1482cpp_quote("HRESULT WINAPI MimeOleGetExtClassId(LPCSTR,LPCLSID);") 1483cpp_quote("HRESULT WINAPI MimeOleEncodeHeader(HCHARSET,LPPROPVARIANT,LPSTR*,LPRFC1522INFO);") 1484cpp_quote("HRESULT WINAPI MimeOleDecodeHeader(HCHARSET,LPCSTR,LPPROPVARIANT,LPRFC1522INFO);") 1485cpp_quote("HRESULT WINAPI MimeOleRfc1522Decode(LPCSTR,LPSTR,ULONG,LPSTR*);") 1486cpp_quote("HRESULT WINAPI MimeOleRfc1522Encode(LPCSTR,HCHARSET,LPSTR*);") 1487cpp_quote("HRESULT WINAPI MimeOleGetInternat(IMimeInternational**);") 1488cpp_quote("HRESULT WINAPI MimeOleFindCharset(LPCSTR,LPHCHARSET);") 1489cpp_quote("HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET,LPINETCSETINFO);") 1490cpp_quote("HRESULT WINAPI MimeOleGetCodePageInfo(HCHARSET,LPCODEPAGEINFO);") 1491cpp_quote("HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET);") 1492cpp_quote("HRESULT WINAPI MimeOleSetDefaultCharset(HCHARSET);") 1493cpp_quote("HRESULT WINAPI MimeOleGetCodePageCharset(CODEPAGEID,CHARSETTYPE,LPHCHARSET);") 1494cpp_quote("HRESULT WINAPI MimeOleCreateVirtualStream(IStream**);") 1495cpp_quote("HRESULT WINAPI MimeOleOpenFileStream(LPCSTR,DWORD,DWORD,IStream**);") 1496cpp_quote("HRESULT WINAPI MimeOleIsTnefStream(IStream*);") 1497cpp_quote("HRESULT WINAPI MimeOleGenerateFileName(LPCSTR,LPCSTR,LPCSTR,LPSTR*);") 1498cpp_quote("HRESULT WINAPI MimeOleGetFileExtension(LPCSTR,LPSTR,ULONG);") 1499cpp_quote("HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity**);") 1500cpp_quote("HRESULT WINAPI MimeOleInetDateToFileTime(LPCSTR,LPFILETIME);") 1501cpp_quote("HRESULT WINAPI MimeOleFileTimeToInetDate(LPFILETIME,LPSTR,ULONG);") 1502cpp_quote("HRESULT WINAPI MimeOleCreateMessageParts(IMimeMessageParts**);") 1503cpp_quote("HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator**);") 1504cpp_quote("HRESULT WINAPI MimeOleParseRfc822Address(DWORD,ENCODINGTYPE,LPCSTR,LPADDRESSLIST);") 1505cpp_quote("HRESULT WINAPI MimeOleCreateMessage(IUnknown*,IMimeMessage**);") 1506cpp_quote("HRESULT WINAPI MimeOleMergePartialHeaders(IStream*,IStream*);") 1507cpp_quote("HRESULT WINAPI MimeOleEscapeString(CODEPAGEID,LPCSTR,LPSTR*);") 1508cpp_quote("HRESULT WINAPI MimeOleGetExtContentType(LPCSTR,LPSTR*);") 1509cpp_quote("HRESULT WINAPI MimeOleGetContentTypeExt(LPCSTR,LPSTR*);") 1510cpp_quote("HRESULT WINAPI MimeOleGetFileInfo(LPSTR,LPSTR*,LPSTR*,LPSTR*,LPSTR*,LPSTR*);") 1511cpp_quote("HRESULT WINAPI MimeOleCreateBody(IMimeBody**);") 1512cpp_quote("HRESULT WINAPI MimeOleCreatePropertySet(IUnknown*,IMimePropertySet**);") 1513cpp_quote("HRESULT WINAPI MimeOleCreateMessageTree(IUnknown*,IMimeMessageTree**);") 1514cpp_quote("HRESULT WINAPI MimeOleGetCertsFromThumbprints(THUMBBLOB*,X509CERTRESULT*,const HCERTSTORE*,DWORD);") 1515cpp_quote("HRESULT WINAPI MimeOleSplitMessage(IMimeMessage*,ULONG,IMimeMessageParts**);") 1516cpp_quote("HRESULT WINAPI MimeOleClearDirtyTree(IMimeMessageTree*);") 1517cpp_quote("HRESULT WINAPI MimeOleConvertEnrichedToHTML(CODEPAGEID,IStream*,IStream*);") 1518cpp_quote("HRESULT WINAPI MimeOleSMimeCapsToDlg(LPBYTE,DWORD,DWORD,PCX509CERT*,HWND,DWORD,DWORD,DWORD);") 1519cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFromDlg(HWND,DWORD,DWORD,DWORD,LPBYTE,DWORD*);") 1520cpp_quote("HRESULT WINAPI MimeOleSMimeCapInit(LPBYTE,DWORD,LPVOID*);") 1521cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddSMimeCap(LPBYTE,DWORD,LPVOID);") 1522cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddCert(LPBYTE,DWORD,BOOL,LPVOID);") 1523cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetEncAlg(LPVOID,LPBYTE,DWORD*,DWORD*);") 1524cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetHashAlg(LPVOID,LPBYTE,DWORD*,DWORD*);") 1525cpp_quote("HRESULT WINAPI MimeOleSMimeCapRelease(LPVOID);") 1526cpp_quote("HRESULT WINAPI MimeOleAlgNameFromSMimeap(LPBYTE,DWORD,LPCSTR*);") 1527cpp_quote("HRESULT WINAPI MimeOleAlgStrengthFromSMimeCap(LPBYTE,DWORD,BOOL,DWORD*);") 1528cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFull(LPVOID,BOOL,BOOL,LPBYTE,DWORD*);") 1529cpp_quote("HRESULT WINAPI MimeOleCreateHashTable(DWORD,BOOL,IHashTable**);") 1530cpp_quote("HRESULT WINAPI MimeOleStripHeaders(IMimeMessage*,HBODY,LPCSTR,LPCSTR,IStream**);") 1531 1532cpp_quote("HRESULT WINAPI MimeEditViewSource(HWND,IMimeMessage*);") 1533cpp_quote("HRESULT WINAPI MimeEditIsSafeToRun(HWND,LPCSTR);") 1534cpp_quote("HRESULT WINAPI MimeEditVerifyTrust(HWND,LPCSTR,LPCSTR);") 1535cpp_quote("HRESULT WINAPI MimeEditCreateMimeDocument(IUnknown*,IMimeMessage*,DWORD,IMimeMessage**);") 1536cpp_quote("HRESULT WINAPI MimeEditGetBackgroundImageUrl(IUnknown*,BSTR*);") 1537cpp_quote("HRESULT WINAPI MimeEditDocumentFromStream(IStream*,REFIID,void**);") 1538 1539cpp_quote("HRESULT WINAPI MimeOleGetPropertySchema(IMimePropertySchema**);") 1540cpp_quote("HRESULT WINAPI MimeGetAddressFormatW(REFIID,void*,DWORD,ADDRESSFORMAT,WCHAR**);") 1541cpp_quote("#ifdef __cplusplus") 1542cpp_quote("}") 1543cpp_quote("#endif") 1544