2 * Copyright 2007 Robert Shearman for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #define DECLARE_HANDLE(name) typedef void *name
25 interface IMimeMessageCallback;
26 interface IMimeEnumAddressTypes;
27 interface IMimeMessageParts;
28 interface IMimeMessageTree;
30 interface IMimeEnumProperties;
32 cpp_quote("DEFINE_GUID(CLSID_IMimeBody, 0xfd853cdb, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
33 cpp_quote("DEFINE_GUID(CLSID_IMimeAllocator, 0xfd853cdd, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
34 cpp_quote("DEFINE_GUID(CLSID_IMimeMessage, 0xfd853ce3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
35 cpp_quote("DEFINE_GUID(CLSID_IMimeSecurity, 0xfd853cde, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
36 cpp_quote("DEFINE_GUID(CLSID_IVirtualStream, 0xfd853cdf, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
38 cpp_quote("#define MIME_E_REG_CREATE_KEY 0x800cce01")
39 cpp_quote("#define MIME_E_REG_QUERY_INFO 0x800cce02")
40 cpp_quote("#define MIME_E_INVALID_ENCTYPE 0x800cce03")
41 cpp_quote("#define MIME_E_BOUNDARY_MISMATCH 0x800cce04")
42 cpp_quote("#define MIME_E_NOT_FOUND 0x800cce05")
43 cpp_quote("#define MIME_E_NO_DATA 0x800cce05")
44 cpp_quote("#define MIME_E_BUFFER_TOO_SMALL 0x800cce06")
45 cpp_quote("#define MIME_E_INVALID_ITEM_FLAGS 0x800cce07")
46 cpp_quote("#define MIME_E_ONE_LINE_ITEME 0x800cce08")
47 cpp_quote("#define MIME_E_INVALID_HANDLE 0x800cce09")
48 cpp_quote("#define MIME_E_CHARSET_TRANSLATE 0x800cce0a")
49 cpp_quote("#define MIME_E_NOT_INITIALIZED 0x800cce0b")
51 cpp_quote("#define MIME_E_INVALID_CHARSET_TYPE 0x800cce31")
53 cpp_quote("#define MIME_E_INVALID_TEXT_TYPE 0x800cce38")
55 cpp_quote("#define MIME_E_SECURITY_NOOP 0x800cceb1")
56 cpp_quote("#define MIME_S_SECURITY_NOOP 0x000cceb1")
58 cpp_quote("typedef enum tagMIMEPROPID {")
59 cpp_quote(" PID_HDR_NEWSGROUP = 2,")
60 cpp_quote(" PID_HDR_NEWSGROUPS = 3,")
61 cpp_quote(" PID_HDR_REFS = 4,")
62 cpp_quote(" PID_HDR_SUBJECT = 5,")
63 cpp_quote(" PID_HDR_FROM = 6,")
64 cpp_quote(" PID_HDR_MESSAGEID = 7,")
65 cpp_quote(" PID_HDR_RETURNPATH = 8,")
66 cpp_quote(" PID_HDR_RR = 9,")
67 cpp_quote(" PID_HDR_RETRCPTO = 10,")
68 cpp_quote(" PID_HDR_APPARTO = 11,")
69 cpp_quote(" PID_HDR_DATE = 12,")
70 cpp_quote(" PID_HDR_RECEIVED = 13,")
71 cpp_quote(" PID_HDR_REPLYTO = 14,")
72 cpp_quote(" PID_HDR_XMAILER = 15,")
73 cpp_quote(" PID_HDR_BCC = 16,")
74 cpp_quote(" PID_HDR_MIMEVER = 17,")
75 cpp_quote(" PID_HDR_CNTTYPE = 18,")
76 cpp_quote(" PID_HDR_CNTXFER = 19,")
77 cpp_quote(" PID_HDR_CNTID = 20,")
78 cpp_quote(" PID_HDR_CNTDESC = 21,")
79 cpp_quote(" PID_HDR_CNTDISP = 22,")
80 cpp_quote(" PID_HDR_CNTBASE = 23,")
81 cpp_quote(" PID_HDR_CNTLOC = 24,")
82 cpp_quote(" PID_HDR_TO = 25,")
83 cpp_quote(" PID_HDR_PATH = 26,")
84 cpp_quote(" PID_HDR_FOLLOWUPTO = 27,")
85 cpp_quote(" PID_HDR_EXPIRES = 28,")
86 cpp_quote(" PID_HDR_CC = 29,")
88 cpp_quote(" PID_HDR_SENDER = 61,")
90 cpp_quote(" PID_HDR_INREPLYTO = 77,")
91 cpp_quote("} MIMEPROPID;")
93 cpp_quote("#define TYPEDID_MASK ((ULONG)0xffff)")
94 cpp_quote("#define TYPEDID_TYPE(t) ((VARTYPE)((t) & TYPEDID_MASK))")
96 cpp_quote("#define OID_HIDE_TNEF_ATTACHMENTS (0x000e0000 | VT_BOOL)")
97 cpp_quote("#define OID_SECURITY_TYPE (0x00180000 | VT_UI4)")
98 cpp_quote("#define OID_SECURITY_HWND_OWNER (0x00320000 | VT_UI4)")
99 cpp_quote("#define OID_HEADER_RELOAD_TYPE (0x00370000 | VT_UI4)")
100 cpp_quote("#define OID_SHOW_MACBINARY (0x00390000 | VT_BOOL)")
104 uuid(e4b28371-83b0-11d0-8259-00c04fd85ab4),
109 importlib("stdole2.tlb");
111 DECLARE_HANDLE(HCHARSET);
112 DECLARE_HANDLE(HBODY);
113 DECLARE_HANDLE(HHEADERROW);
115 typedef HCHARSET *LPHCHARSET;
116 typedef HBODY *LPHBODY;
117 typedef HHEADERROW *LPHHEADERROW;
118 typedef DWORD TYPEDID;
119 typedef const PROPVARIANT *LPCPROPVARIANT;
120 typedef const BLOB *LPCBLOB;
122 typedef enum tagRELOADTYPE
126 RELOAD_HEADER_APPEND,
127 RELOAD_HEADER_REPLACE,
130 typedef enum tagMIMESAVETYPE
136 typedef enum tagCSETAPPLYTYPE
143 typedef enum tagENCODINGTYPE
161 const SHORT IET_DECODED = IET_BINARY;
163 const SHORT CCHMAX_HEADER_LINE = 1000;
166 uuid(c5588349-7f86-11d0-8252-00c04fd85ab4),
169 interface IMimeInternational : IUnknown
171 typedef [unique] IMimeInternational *LPMIMEINTERNATIONAL;
172 typedef DWORD CODEPAGEID;
174 const CODEPAGEID CP_USASCII = 1252;
175 const CODEPAGEID CP_UNICODE = 1200;
176 const CODEPAGEID CP_JAUTODETECT = 50932;
177 const CODEPAGEID CP_KAUTODETECT = 50949;
178 const CODEPAGEID CP_ISO2022JPESC = 50221;
179 const CODEPAGEID CP_ISO2022JPSIO = 50222;
181 const SHORT CCHMAX_CSET_NAME = 128;
182 const SHORT CCHMAX_LANG_NAME = 128;
183 const SHORT CCHMAX_FACE_NAME = 128;
185 typedef struct tagINETCSETINFO
187 CHAR szName[CCHMAX_CSET_NAME];
189 CODEPAGEID cpiWindows;
190 CODEPAGEID cpiInternet;
192 } INETCSETINFO, *LPINETCSETINFO;
194 typedef enum tagINETLANGMASK
199 ILM_HEADERCSET = 0x08,
201 ILM_FIXEDFONT = 0x20,
202 ILM_VARIABLEFONT = 0x40,
205 typedef struct tagCODEPAGEINFO
208 CODEPAGEID cpiCodePage;
209 BOOL fIsValidCodePage;
212 CODEPAGEID cpiFamily;
213 CHAR szName[CCHMAX_LANG_NAME];
214 CHAR szBodyCset[CCHMAX_CSET_NAME];
215 CHAR szHeaderCset[CCHMAX_CSET_NAME];
216 CHAR szWebCset[CCHMAX_CSET_NAME];
217 CHAR szFixedFont[CCHMAX_FACE_NAME];
218 CHAR szVariableFont[CCHMAX_FACE_NAME];
219 ENCODINGTYPE ietNewsDefault;
220 ENCODINGTYPE ietMailDefault;
222 } CODEPAGEINFO, *LPCODEPAGEINFO;
224 typedef struct tagRFC1522INFO
226 BOOL fRfc1522Allowed;
229 HCHARSET hRfc1522Cset;
230 } RFC1522INFO, *LPRFC1522INFO;
232 typedef enum tagCHARSETTYPE
240 HRESULT SetDefaultCharset(
241 [in] HCHARSET hCharset);
242 HRESULT GetDefaultCharset(
243 [out] LPHCHARSET phCharset);
244 HRESULT GetCodePageCharset(
245 [in] CODEPAGEID cpiCodePage,
246 [in] CHARSETTYPE ctCsetType,
247 [out] LPHCHARSET phCharset);
249 [in] LPCSTR pszCharset,
250 [out] LPHCHARSET phCharset);
251 HRESULT GetCharsetInfo(
252 [in] HCHARSET hCharset,
253 [in, out] LPINETCSETINFO pCsetInfo);
254 HRESULT GetCodePageInfo(
255 [in] CODEPAGEID cpiCodePage,
256 [in, out] LPCODEPAGEINFO pCodePageInfo);
257 HRESULT CanConvertCodePages(
258 [in] CODEPAGEID cpiSource,
259 [in] CODEPAGEID cpiDest);
260 HRESULT DecodeHeader(
261 [in] HCHARSET hCharset,
263 [in, out] LPPROPVARIANT pDecoded,
264 [in, out] LPRFC1522INFO pRfc1522Info);
265 HRESULT EncodeHeader(
266 [in] HCHARSET hCharset,
267 [in] LPPROPVARIANT pData,
268 [out] LPSTR *ppszEncoded,
269 [in, out] LPRFC1522INFO pRfc1522Info);
270 HRESULT ConvertBuffer(
271 [in] CODEPAGEID cpiSource,
272 [in] CODEPAGEID cpiDest,
274 [in, out] LPBLOB pOut,
275 [out] ULONG *pcbRead);
276 HRESULT ConvertString(
277 [in] CODEPAGEID cpiSource,
278 [in] CODEPAGEID cpiDest,
279 [in] LPPROPVARIANT pIn,
280 [in, out] LPPROPVARIANT pOut);
281 HRESULT MLANG_ConvertInetReset(void);
282 HRESULT MLANG_ConvertInetString(
283 [in] CODEPAGEID cpiSource,
284 [in] CODEPAGEID cpiDest,
286 [in] int *pnSizeOfSource,
287 [in,out,unique] LPSTR pDestination,
288 [in] int *pnDstSize);
289 HRESULT Rfc1522Decode(
290 [in] LPCSTR pszValue,
291 [in,ref] LPSTR pszCharset,
293 [out] LPSTR *ppszDecoded);
294 HRESULT Rfc1522Encode(
295 [in] LPCSTR pszValue,
296 [in] HCHARSET hCharset,
297 [out] LPSTR *ppszEncoded);
301 uuid(c5588353-7f86-11d0-8252-00c04fd85ab4),
304 interface IMimeSecurity : IUnknown
306 typedef [unique] IMimeSecurity *LPMIMESECURITY;
308 cpp_quote("#ifdef __WINE_WINCRYPT_H")
309 cpp_quote("typedef PCCERT_CONTEXT PCX509CERT;")
311 typedef const void *PCX509CERT;
312 typedef void *HCERTSTORE;
315 typedef BLOB THUMBBLOB;
316 typedef void *HCAPICERTSTORE;
318 cpp_quote("#define MST_NONE 0x00000000")
319 cpp_quote("#define MST_THIS_SIGN 0x00000001")
320 cpp_quote("#define MST_THIS_ENCRYPT 0x00000002")
321 cpp_quote("#define MST_BLOB_FLAG 0x00000004")
322 cpp_quote("#define MST_THIS_BLOBSIGN (MST_BLOB_FLAG | MST_THIS_SIGN)")
323 cpp_quote("#define MST_CHILD_SIGN 0x00000100")
324 cpp_quote("#define MST_CHILD_ENCRYPT 0x00000200")
325 cpp_quote("#define MST_SUBMSG_SIGN 0x00001000")
326 cpp_quote("#define MST_SUBMSG_ENCRYPT 0x00002000")
327 cpp_quote("#define MST_RECEIPT_REQUEST 0x00010000")
328 cpp_quote("#define MST_CLASS_SMIME_V1 0x00000000")
329 cpp_quote("#define MST_CLASS_PGP 0x01000000")
331 typedef enum tagCERTSTATE
334 CERTIFICATE_NOT_PRESENT,
336 CERTIFICATE_CHAIN_TOO_LONG,
337 CERTIFICATE_MISSING_ISSUER,
338 CERTIFICATE_CRL_LISTED,
339 CERTIFICATE_NOT_TRUSTED,
346 typedef enum tagCERTNAMETYPE
353 typedef enum tagCERTDATAID
359 typedef struct tagX509CERTRESULT
364 } X509CERTRESULT, *PX509CERTRESULT;
365 typedef const X509CERTRESULT *PCX509CERTRESULT;
367 HRESULT InitNew(void);
369 HRESULT CheckInit(void);
371 HRESULT EncodeMessage(
372 [in] IMimeMessageTree */*const*/ pTree,
376 [in] IMimeMessageTree */*const*/ pTree,
377 [in] HBODY hEncodeRoot,
380 HRESULT DecodeMessage(
381 [in] IMimeMessageTree */*const*/ pTree,
385 [in] IMimeMessageTree */*const*/ pTree,
386 [in] HBODY hDecodeRoot,
389 HRESULT EnumCertificates(
390 [in] HCAPICERTSTORE hc,
392 [in] PCX509CERT pPrev,
393 [out] PCX509CERT *ppCert);
395 HRESULT GetCertificateName(
396 [in] const PCX509CERT pX509Cert,
397 [in] const CERTNAMETYPE cn,
398 [out] LPSTR *ppszName);
400 HRESULT GetMessageType(
401 [in] const HWND hwndParent,
402 [in] IMimeBody */*const*/ pBody,
403 [out] DWORD */*const*/ pdwSecType);
406 [in] const PCX509CERT pX509Cert,
407 [in] const CERTDATAID dataid,
408 [out, ref] LPPROPVARIANT pValue);
412 uuid(fd853cd1-7f86-11d0-8252-00c04fd85ab4),
415 interface IMimeHeaderTable : IPersistStream
417 /* FIXME: fill this in */
421 uuid(fd853cec-7f86-11d0-8252-00c04fd85ab4),
424 interface IMimePropertySchema : IUnknown
426 typedef enum tagMIMEPROPFLAGS
431 MPF_HASPARAMS = 0x08,
436 /* FIXME: fill this in */
440 uuid(fd853cd3-7f86-11d0-8252-00c04fd85ab4),
443 interface IMimePropertySet : IPersistStreamInit
445 typedef [unique] IMimePropertySet *LPMIMEPROPERTYSET;
447 cpp_quote("#define PDF_ENCODED 0x00000001")
448 cpp_quote("#define PDF_NAMEINDATA 0x00000002")
449 cpp_quote("#define PDF_HEADERFORMAT (0x00000004 | PDF_ENCODED)")
450 cpp_quote("#define PDF_NOCOMMENTS 0x00000008")
451 cpp_quote("#define PDF_SAVENOENCODE 0x00000010")
452 cpp_quote("#define PDF_VECTOR 0x00000020")
454 typedef struct tagMIMEPARAMINFO
458 } MIMEPARAMINFO, *LPMIMEPARAMINFO;
460 typedef enum tagPROPINFOMASK
463 PIM_ENCODINGTYPE = 0x02,
464 PIM_ROWNUMBER = 0x04,
468 PIM_VTDEFAULT = 0x40,
472 typedef struct tagMIMEPROPINFO
476 ENCODINGTYPE ietEncoding;
483 } MIMEPROPINFO, *LPMIMEPROPINFO;
484 typedef const MIMEPROPINFO *LPCMIMEPROPINFO;
488 [in,out] LPMIMEPROPINFO pInfo);
492 [in] LPCMIMEPROPINFO pInfo);
494 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
495 cpp_quote("#undef GetProp")
496 cpp_quote("#undef SetProp")
497 cpp_quote("#undef EnumProps")
502 [in,out] LPPROPVARIANT pValue);
507 [in] LPCPROPVARIANT pValue);
512 [in] LPPROPVARIANT pValue);
515 [in] LPCSTR pszName);
519 [in,unique] LPCSTR *prgszName,
520 [in] IMimePropertySet *pPropertySet);
524 [in] LPCSTR *prgszName,
525 [in] IMimePropertySet *pPropertySet);
527 HRESULT DeleteExcept(
529 [in] LPCSTR *prgszName);
533 [in] LPCSTR pszCriteria,
534 [in] boolean fSubString,
535 [in] boolean fCaseSensitive);
538 [out] LPHCHARSET phCharset);
541 [in] HCHARSET hCharset,
542 [in] CSETAPPLYTYPE applytype);
544 HRESULT GetParameters(
546 [out] ULONG *pcParams,
547 [out] LPMIMEPARAMINFO *pprgParam);
549 HRESULT IsContentType(
550 [in] LPCSTR pszPriType,
551 [in,unique] LPCSTR pszSubType);
553 HRESULT BindToObject(
555 [out,iid_is(riid)] void **ppvObject);
558 [out] IMimePropertySet **ppPropertySet);
561 [in] const TYPEDID oid,
562 [in] LPCPROPVARIANT pValue);
565 [in] const TYPEDID oid,
566 [in,out] LPPROPVARIANT pValue);
568 cpp_quote("#define EPF_NONAME 0x00000001")
572 [out] IMimeEnumProperties **ppEnum);
577 uuid(c558834a-7f86-11d0-8252-00c04fd85ab4),
580 interface IMimeAddressTable : IUnknown
582 typedef [unique] IMimeAddressTable *LPMIMEADDRESSTABLE;
584 DECLARE_HANDLE(HADDRESS);
585 typedef HADDRESS *LPHADDRESS;
586 typedef DWORD IADDRESSTYPE;
588 typedef enum tagADDRESSFORMAT
590 AFT_DISPLAY_FRIENDLY,
598 typedef struct tagADDRESSPROPS
602 ENCODINGTYPE ietFriendly;
610 THUMBBLOB tbEncryption;
614 } ADRESSPROPS, *LPADDRESSPROPS;
616 typedef struct tagADDRESSLIST
619 LPADDRESSPROPS prgAdr;
620 } ADDRESSLIST, *LPADDRESSLIST;
622 /* FIXME: fill this in */
626 uuid(ee519f11-851a-11d0-8252-00c04fd85ab4),
629 interface IMimeWebDocument : IUnknown
631 /* FIXME: fill this in */
635 uuid(c558834c-7f86-11d0-8252-00c04fd85ab4),
638 interface IMimeBody : IMimePropertySet
640 typedef [unique] IMimeBody *LPMIMEBODY;
642 typedef enum tagIMSGBODYTYPE
651 typedef struct tagBODYOFFSETS
653 DWORD cbBoundaryStart;
657 } BODYOFFSETS, *LPBODYOFFSETS;
659 typedef struct tagTRANSMITINFO
661 ENCODINGTYPE ietCurrent;
662 ENCODINGTYPE ietXmitMime;
663 ENCODINGTYPE ietXmit822;
669 } TRANSMITINFO, *LPTRANSMITINFO;
672 [in] IMSGBODYTYPE bodytype);
674 HRESULT SetDisplayName(
675 [in] LPCSTR pszDisplay);
677 HRESULT GetDisplayName(
678 [out] LPSTR *ppszDisplay);
681 [out] LPBODYOFFSETS pOffsets);
683 HRESULT GetCurrentEncoding(
684 [out] ENCODINGTYPE *pietEncoding);
686 HRESULT SetCurrentEncoding(
687 [in] ENCODINGTYPE ietEncoding);
689 HRESULT GetEstimatedSize(
690 [in] ENCODINGTYPE ietEncoding,
691 [out] ULONG *pcbSize);
694 [in] ENCODINGTYPE ietEncoding,
695 [in] IStream *pStream);
698 [in] ENCODINGTYPE ietEncoding,
699 [out] IStream **ppStream);
702 [in] ENCODINGTYPE ietEncoding,
703 [in,unique] LPCSTR pszPriType,
704 [in,unique] LPCSTR pszSubType,
706 [in,iid_is(riid)] LPVOID pvObject);
708 HRESULT EmptyData(void);
711 [in] IMimeBody *pBody);
713 HRESULT GetTransmitInfo(
714 [in,out] LPTRANSMITINFO pTransmitInfo);
717 [in] ENCODINGTYPE ietEncoding,
718 [in] LPCSTR pszFilePath);
721 [out] LPHBODY phBody);
726 uuid(fd853cd4-7f86-11d0-8252-00c04fd85ab4),
729 interface IMimeMessageTree : IPersistStreamInit
731 typedef [unique] IMimeMessageTree *LPMIMEMESSAGETREE;
733 const HBODY HBODY_ROOT = (HBODY)-1;
735 typedef enum tagBODYLOCATION
745 typedef struct tagFINDBODY
750 } FINDBODY, *LPFINDBODY;
752 HRESULT GetMessageSource(
753 [out] IStream **ppStream,
756 HRESULT GetMessageSize(
757 [out] ULONG *pcbSize,
760 HRESULT LoadOffsetTable(
761 [in] IStream *pStream);
763 HRESULT SaveOffsetTable(
764 [in] IStream *pStream,
768 [out] DWORD *pdwFlags);
773 HRESULT HandsOffStorage();
775 HRESULT BindToObject(
776 [in] const HBODY hBody,
778 [out, iid_is(riid)] void **ppvObject);
783 [in] IStream *pStream);
786 [in] BODYLOCATION location,
788 [out] LPHBODY phBody);
791 [in] BODYLOCATION location,
793 [out] LPHBODY phBody);
801 [in] BODYLOCATION location);
805 [in] boolean fRecurse,
806 [out] ULONG *pcBodies);
809 [in, out] LPFINDBODY pFindBody,
810 [out] LPHBODY phBody);
813 [in, out] LPFINDBODY pFindBody,
814 [out] LPHBODY phBody);
821 [out] LPHBODY phBody);
825 [in] LPCSTR pszSubType,
826 [out] LPHBODY phMultipart);
828 HRESULT GetBodyOffsets(
830 [in, out] LPBODYOFFSETS pOffsets);
833 [out] LPHCHARSET phCharset);
836 [in] HCHARSET hCharset,
837 [in] CSETAPPLYTYPE applytype);
841 [in] IMSGBODYTYPE bodytype);
843 HRESULT IsContentType(
845 [in] LPCSTR pszPriType,
846 [in] LPCSTR pszSubType);
848 HRESULT QueryBodyProp(
851 [in] LPCSTR pszCriteria,
852 [in] boolean fSubString,
853 [in] boolean fCaseSensitive);
859 [in, out] LPPROPVARIANT pValue);
865 [in] LPCPROPVARIANT pValue);
867 HRESULT DeleteBodyProp(
869 [in] LPCSTR pszName);
872 [in] const TYPEDID oid,
873 [in] LPCPROPVARIANT pValue);
876 [in] const TYPEDID oid,
877 [in, out] LPPROPVARIANT pValue);
881 uuid(fd853cd5-7f86-11d0-8252-00c04fd85ab4),
884 interface IMimeMessage : IMimeMessageTree
886 typedef [unique] IMimeMessage *LPMIMEMESSAGE;
888 typedef DWORD TEXTTYPE;
890 typedef enum tagIMSGFLAGS
892 IMF_ATTACHMENTS = 0x00000001,
893 IMF_MULTIPART = 0x00000002,
894 IMF_SUBMULTIPART = 0x00000004,
895 IMF_MIME = 0x00000008,
896 IMF_HTML = 0x00000010,
897 IMF_PLAIN = 0x00000020,
898 IMF_PARTIAL = 0x00000040,
899 IMF_SIGNED = 0x00000080,
900 IMF_ENCRYPTED = 0x00000100,
901 IMF_TNEF = 0x00000200,
902 IMF_MHTML = 0x00000400,
903 IMF_SECURE = 0x00000800,
904 IMF_TEXT = 0x00001000,
905 IMF_CSETTAGGED = 0x00002000,
906 IMF_NEWS = 0x00004000,
907 IMF_VOICEMAIL = 0x00008000,
908 IMF_HASVCARD = 0x00010000,
909 IMF_RFC1154 = 0x00020000,
912 typedef enum tagIMSGPRIORITY
919 cpp_quote("#define WPF_HTML 0x00000001")
920 cpp_quote("#define WPF_AUTOINLINE 0x00000002")
921 cpp_quote("#define WPF_SLIDESHOW 0x00000004")
922 cpp_quote("#define WPF_ATTACHLINKS 0x00000008")
923 cpp_quote("#define WPF_IMAGESONLY 0x00000010")
924 cpp_quote("#define WPF_NOMETACHARSET 0x00000020")
926 typedef struct tagWEPAGEOPTIONS
932 } WEBPAGEOPTIONS, *LPWEBPAGEOPTIONS;
934 cpp_quote("#define TXT_PLAIN 1")
935 cpp_quote("#define TXT_HTML 2")
937 HRESULT CreateWebPage(
938 [in] IStream *pRootStm,
939 [in] LPWEBPAGEOPTIONS pOptions,
940 [in] IMimeMessageCallback *pCallback,
941 [out] IMoniker **ppMoniker);
946 [in,out] LPPROPVARIANT pValue);
951 [in] LPCPROPVARIANT pValue);
954 [in] LPCSTR pszName);
958 [in] LPCSTR pszCriteria,
959 [in] boolean fSubString,
960 [in] boolean fCaseSensitive);
963 [in] DWORD dwTxtType,
964 [in] ENCODINGTYPE ietEncoding,
965 [out] IStream **pStream,
966 [out] LPHBODY phBody);
969 [in] DWORD dwTxtType,
970 [in] ENCODINGTYPE ietEncoding,
971 [in] HBODY hAlternative,
972 [in] IStream *pStream,
973 [out] LPHBODY phBody);
975 HRESULT AttachObject(
977 [in, iid_is(riid)] void *pvObject,
978 [out] LPHBODY phBody);
981 [in] LPCSTR pszFilePath,
982 [in] IStream *pstmFile,
983 [out] LPHBODY phBody);
989 [in] IStream *pstmURL,
990 [out] LPSTR *ppszCIDURL,
991 [out] LPHBODY phBody);
993 HRESULT GetAttachments(
994 [out] ULONG *pcAttach,
995 [out] LPHBODY *pprghAttach);
997 HRESULT GetAddressTable(
998 [out] IMimeAddressTable **ppTable);
1001 [in, out] LPADDRESSPROPS pAddress);
1003 HRESULT GetAddressTypes(
1004 [in] DWORD dwAdrTypes,
1006 [in, out] LPADDRESSLIST pList);
1008 HRESULT GetAddressFormat(
1009 [in] DWORD dwAdrTypes,
1010 [in] ADDRESSFORMAT format,
1011 [out] LPSTR *ppszFormat);
1013 HRESULT EnumAddressTypes(
1014 [in] DWORD dwAdrTypes,
1016 [out] IMimeEnumAddressTypes **ppEnum);
1018 HRESULT SplitMessage(
1019 [in] ULONG cbMaxPart,
1020 [out] IMimeMessageParts **ppParts);
1022 HRESULT GetRootMoniker(
1023 [out] IMoniker **ppMoniker);
1027 uuid(761aa741-7bda-11d1-8aa9-00c04fb951f3),
1030 interface IMimeMessageCallback : IUnknown
1032 HRESULT OnWebPageSplitter(
1033 [in] DWORD cInlined,
1034 [in] IStream *ppStream);
1038 uuid(de4ad8da-555f-11d1-8dd0-00c04fb951f9),
1041 interface IPersistMime : IPersist
1043 /* FIXME: fill this in */
1047 uuid(c558834f-7f86-11d0-8252-00c04fd85ab4),
1050 interface IMimeMessageParts : IUnknown
1052 /* FIXME: fill this in */
1056 uuid(c558834d-7f86-11d0-8252-00c04fd85ab4),
1059 interface IMimeEnumHeaderRows : IUnknown
1061 typedef struct tagENUMHEADERROW
1067 DWORD_PTR dwReserved;
1068 } ENUMHEADERROW, *LPENUMHEADERROW;
1070 /* FIXME: fill this in */
1074 uuid(fd853cee-7f86-11d0-8252-00c04fd85ab4),
1077 interface IMimeEnumProperties : IUnknown
1079 typedef [unique] IMimeEnumProperties *LPMIMEENUMPROPERTIES;
1081 typedef struct tagENUMPROPERTY
1086 } ENUMPROPERTY, *LPENUMPROPERTY;
1090 [in, out] LPENUMPROPERTY prgProp,
1091 [out] ULONG *pcFetched);
1096 HRESULT Reset(void);
1099 [out] IMimeEnumProperties **ppEnum);
1102 [out] ULONG *pcItems);
1107 uuid(c5588354-7f86-11d0-8252-00c04fd85ab4),
1110 interface IMimeEnumAddressTypes : IUnknown
1112 /* FIXME: fill this in */
1116 uuid(c5588350-7f86-11d0-8252-00c04fd85ab4),
1119 interface IMimeEnumMessageParts : IUnknown
1121 /* FIXME: fill this in */
1125 uuid(64577981-86d7-11d1-bdfc-00c04fa31009),
1128 interface IHashTable : IUnknown
1130 /* FIXME: fill this in */
1134 uuid(c5588351-7f86-11d0-8252-00c04fd85ab4),
1137 interface IMimeAllocator : IMalloc
1139 typedef [unique] IMimeAllocator *LPMIMEALLOCATOR;
1141 HRESULT FreeParamInfoArray(
1143 [in] LPMIMEPARAMINFO prgParam,
1144 [in] boolean fFreeArray);
1146 HRESULT FreeAddressList(
1147 [in,out] LPADDRESSLIST pList);
1149 HRESULT FreeAddressProps(
1150 [in,out] LPADDRESSPROPS pAddress);
1152 HRESULT ReleaseObjects(
1153 [in] ULONG cObjects,
1154 [in] IUnknown **prgpUnknown,
1155 [in] boolean fFreeArray);
1157 HRESULT FreeEnumHeaderRowArray(
1159 [in] LPENUMHEADERROW prgRow,
1160 [in] boolean fFreeArray);
1162 HRESULT FreeEnumPropertyArray(
1164 [in] LPENUMPROPERTY prgProp,
1165 [in] boolean fFreeArray);
1167 HRESULT FreeThumbprint(
1168 [in] THUMBBLOB *pthumbprint);
1170 HRESULT PropVariantClear(
1171 [in] LPPROPVARIANT pProp);
1176 uuid(feceaffd-c441-11d1-960e-00c04fbd7c09),
1179 interface IMimeObjResolver : IUnknown
1181 /* FIXME: fill this in */
1185 uuid(b0d17fc2-7bc4-11d1-bdfa-00c04fa31009),
1188 interface IFontCache : IUnknown
1190 /* FIXME: fill this in */
1194 uuid(b0d17fc5-7bc4-11d1-bdfa-00c04fa31009),
1197 interface IFontCacheNotify : IUnknown
1199 /* FIXME: fill this in */
1203 uuid(70183210-7b36-11d2-8c12-00c04fa31009),
1206 interface IMimeEditTag : IUnknown
1208 /* FIXME: fill this in */
1212 uuid(d09ee528-7b38-11d2-8c12-00c04fa31009),
1215 interface IMimeEditTagCollection : IUnknown
1217 /* FIXME: fill this in */
1221 uuid(ba715ae0-a740-11d2-8b22-0080c76b34c6),
1224 interface IMimeSecurityCallback : IUnknown
1226 /* FIXME: fill this in */
1228 cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_UNKNOWN 0")
1229 cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_KEYTRANS 1")
1230 cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_KEYAGREE 2")
1231 cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_MAIL_LIST 3")
1233 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_CERTIFICATE 0")
1234 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_KEYTRANS 1")
1235 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_PROVIDER 2")
1236 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_EPHEMERAL_KEYAGREE 3")
1237 cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_STATIC_KEYAGREE 4")
1239 cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_CERTIFICATE 0")
1240 cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_ISSUERSERIAL 1")
1241 cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_KEY_ID 2")
1246 cpp_quote("#ifdef __cplusplus")
1247 cpp_quote(" extern \"C\" {")
1251 cpp_quote("HRESULT WINAPI MimeOleSetCompatMode(DWORD);")
1252 cpp_quote("HRESULT WINAPI MimeOleContentTypeFromUrl(LPCSTR,LPCSTR,LPSTR*);")
1253 cpp_quote("HRESULT WINAPI MimeOleParseMhtmlUrl(LPSTR,LPSTR*,LPSTR*);")
1254 cpp_quote("HRESULT WINAPI MimeOleObjectFromUrl(LPCSTR,BOOL,REFIID,LPVOID*,IUnknown**);")
1255 cpp_quote("HRESULT WINAPI MimeOleObjectFromMoniker(BINDF,IMoniker*,IBindCtx*,REFIID,LPVOID*,IMoniker**);")
1256 cpp_quote("HRESULT WINAPI MimeOleCombineURL(LPCSTR,ULONG,LPCSTR,ULONG,BOOL,LPSTR*);")
1257 cpp_quote("HRESULT WINAPI MimeOleGetSubjectFileName(IMimePropertySet*,ULONG*,ULONG*,LPSTR,ULONG);")
1258 cpp_quote("HRESULT WINAPI MimeOleCreateWebDocument(LPCSTR,LPCSTR,IMimeWebDocument**);")
1259 cpp_quote("HRESULT WINAPI MimeOleGetRelatedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);")
1260 cpp_quote("HRESULT WINAPI MimeOleGetMixedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);")
1261 cpp_quote("HRESULT WINAPI MimeOleGetAlternativeSection(IMimeMessageTree*,LPHBODY,boolean*);")
1262 cpp_quote("HRESULT WINAPI MimeOleGenerateCID(LPSTR,ULONG,boolean);")
1263 cpp_quote("HRESULT WINAPI MimeOleGenerateMID(LPSTR,ULONG,boolean);")
1264 cpp_quote("HRESULT WINAPI MimeOleCreateByteStream(IStream**);")
1265 cpp_quote("HRESULT WINAPI MimeOlGetPropertySchema(IMimePropertySchema**);")
1266 cpp_quote("HRESULT WINAPI MimeOleQueryString(LPCSTR,LPCSTR,boolean,boolean);")
1267 cpp_quote("HRESULT WINAPI MimeOleGetPropA(IMimePropertySet*,LPCSTR,DWORD,LPSTR*);")
1268 cpp_quote("HRESULT WINAPI MimeOleSetPropA(IMimePropertySet*,LPCSTR,DWORD,LPCSTR);")
1269 cpp_quote("HRESULT WINAPI MimeOleGetPropW(IMimePropertySet*,LPCSTR,DWORD,LPWSTR*);")
1270 cpp_quote("HRESULT WINAPI MimeOleSetPropW(IMimePropertySet*,LPCSTR,DWORD,LPCWSTR);")
1271 cpp_quote("HRESULT WINAPI MimeOleGetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPSTR*);")
1272 cpp_quote("HRESULT WINAPI MimeOleSetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCSTR);")
1273 cpp_quote("HRESULT WINAPI MimeOleGetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPWSTR*);")
1274 cpp_quote("HRESULT WINAPI MimeOleSetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCWSTR);")
1275 cpp_quote("HRESULT WINAPI MimeOleCreateHeaderTable(IMimeHeaderTable**);")
1276 cpp_quote("HRESULT WINAPI MimeOleVariantFree(LPPROPVARIANT);")
1277 cpp_quote("HRESULT WINAPI MimeOleVariantCopy(LPPROPVARIANT,LPPROPVARIANT);")
1278 cpp_quote("HRESULT WINAPI MimeOleGetExtClassId(LPCSTR,LPCLSID);")
1279 cpp_quote("HRESULT WINAPI MimeOleEncodeHeader(HCHARSET,LPPROPVARIANT,LPSTR*,LPRFC1522INFO);")
1280 cpp_quote("HRESULT WINAPI MimeOleDecodeHeader(HCHARSET,LPCSTR,LPPROPVARIANT,LPRFC1522INFO);")
1281 cpp_quote("HRESULT WINAPI MimeOleRfc1522Decode(LPCSTR,LPSTR,ULONG,LPSTR*);")
1282 cpp_quote("HRESULT WINAPI MimeOleRfc1522Encode(LPCSTR,HCHARSET,LPSTR*);")
1283 cpp_quote("HRESULT WINAPI MimeOleGetInternat(IMimeInternational**);")
1284 cpp_quote("HRESULT WINAPI MimeOleFindCharset(LPCSTR,LPHCHARSET);")
1285 cpp_quote("HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET,LPINETCSETINFO);")
1286 cpp_quote("HRESULT WINAPI MimeOleGetCodePageInfo(HCHARSET,LPCODEPAGEINFO);")
1287 cpp_quote("HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET);")
1288 cpp_quote("HRESULT WINAPI MimeOleSetDefaultCharset(HCHARSET);")
1289 cpp_quote("HRESULT WINAPI MimeOleGetCodePageCharset(CODEPAGEID,CHARSETTYPE,LPHCHARSET);")
1290 cpp_quote("HRESULT WINAPI MimeOleCreateVirtualStream(IStream**);")
1291 cpp_quote("HRESULT WINAPI MimeOleOpenFileStream(LPCSTR,DWORD,DWORD,IStream**);")
1292 cpp_quote("HRESULT WINAPI MimeOleIsTnefStream(IStream*);")
1293 cpp_quote("HRESULT WINAPI MimeOleGenerateFileName(LPCSTR,LPCSTR,LPCSTR,LPSTR*);")
1294 cpp_quote("HRESULT WINAPI MimeOleGetFileExtension(LPCSTR,LPSTR,ULONG);")
1295 cpp_quote("HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity**);")
1296 cpp_quote("HRESULT WINAPI MimeOleInetDateToFileTime(LPCSTR,LPFILETIME);")
1297 cpp_quote("HRESULT WINAPI MimeOleFileTimeToInetDate(LPFILETIME,LPSTR,ULONG);")
1298 cpp_quote("HRESULT WINAPI MimeOleCreateMessageParts(IMimeMessageParts**);")
1299 cpp_quote("HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator**);")
1300 cpp_quote("HRESULT WINAPI MimeOleParseRfc822Address(DWORD,ENCODINGTYPE,LPCSTR,LPADDRESSLIST);")
1301 cpp_quote("HRESULT WINAPI MimeOleCreateMessage(IUnknown*,IMimeMessage**);")
1302 cpp_quote("HRESULT WINAPI MimeOleMergePartialHeaders(IStream*,IStream*);")
1303 cpp_quote("HRESULT WINAPI MimeOleEscapeString(CODEPAGEID,LPCSTR,LPSTR*);")
1304 cpp_quote("HRESULT WINAPI MimeOleGetExtContentType(LPCSTR,LPSTR*);")
1305 cpp_quote("HRESULT WINAPI MimeOleGetContentTypeExt(LPCSTR,LPSTR*);")
1306 cpp_quote("HRESULT WINAPI MimeOleGetFileInfo(LPSTR,LPSTR*,LPSTR*,LPSTR*,LPSTR*,LPSTR*);")
1307 cpp_quote("HRESULT WINAPI MimeOleCreateBody(IMimeBody**);")
1308 cpp_quote("HRESULT WINAPI MimeOleCreatePropertySet(IUnknown*,IMimePropertySet**);")
1309 cpp_quote("HRESULT WINAPI MimeOleCreateMessageTree(IUnknown*,IMimeMessageTree**);")
1310 cpp_quote("HRESULT WINAPI MimeOleGetCertsFromThumbprints(THUMBBLOB*,X509CERTRESULT*,const HCERTSTORE*,DWORD);")
1311 cpp_quote("HRESULT WINAPI MimeOleSplitMessage(IMimeMessage*,ULONG,IMimeMessageParts**);")
1312 cpp_quote("HRESULT WINAPI MimeOleClearDirtyTree(IMimeMessageTree*);")
1313 cpp_quote("HRESULT WINAPI MimeOleConvertEnrichedToHTML(CODEPAGEID,IStream*,IStream*);")
1314 cpp_quote("HRESULT WINAPI MimeOleSMimeCapsToDlg(LPBYTE,DWORD,DWORD,PCX509CERT*,HWND,DWORD,DWORD,DWORD);")
1315 cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFromDlg(HWND,DWORD,DWORD,DWORD,LPBYTE,DWORD*);")
1316 cpp_quote("HRESULT WINAPI MimeOleSMimeCapInit(LPBYTE,DWORD,LPVOID*);")
1317 cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddSMimeCap(LPBYTE,DWORD,LPVOID);")
1318 cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddCert(LPBYTE,DWORD,BOOL,LPVOID);")
1319 cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetEncAlg(LPVOID,LPBYTE,DWORD*,DWORD*);")
1320 cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetHashAlg(LPVOID,LPBYTE,DWORD*,DWORD*);")
1321 cpp_quote("HRESULT WINAPI MimeOleSMimeCapRelease(LPVOID);")
1322 cpp_quote("HRESULT WINAPI MimeOleAlgNameFromSMimeap(LPBYTE,DWORD,LPCSTR*);")
1323 cpp_quote("HRESULT WINAPI MimeOleAlgStrengthFromSMimeCap(LPBYTE,DWORD,BOOL,DWORD*);")
1324 cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFull(LPVOID,BOOL,BOOL,LPBYTE,DWORD*);")
1325 cpp_quote("HRESULT WINAPI MimeOleCreateHashTable(DWORD,BOOL,IHashTable**);")
1326 cpp_quote("HRESULT WINAPI MimeOleStripHeaders(IMimeMessage*,HBODY,LPCSTR,LPCSTR,IStream**);")
1328 cpp_quote("HRESULT WINAPI MimeEditViewSource(HWND,IMimeMessage*);")
1329 cpp_quote("HRESULT WINAPI MimeEditIsSafeToRun(HWND,LPCSTR);")
1330 cpp_quote("HRESULT WINAPI MimeEditVerifyTrust(HWND,LPCSTR,LPCSTR);")
1331 cpp_quote("HRESULT WINAPI MimeEditCreateMimeDocument(IUnknown*,IMimeMessage*,DWORD,IMimeMessage**);")
1332 cpp_quote("HRESULT WINAPI MimeEditGetBackgroundImageUrl(IUnknown*,BSTR*);")
1333 cpp_quote("HRESULT WINAPI MimeEditDocumentFromStream(IStream*,REFIID,void**);")
1335 cpp_quote("#ifdef __cplusplus")