wordpad: Move printing functions to a separate file.
[wine.git] / include / mimeole.idl
blob0f21c1c0307965658a14efbdec9fe47864da8a54
1 /*
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
19 import "ocidl.idl";
20 import "objidl.idl";
21 import "propidl.idl";
23 #define DECLARE_HANDLE(name) typedef void *name
25 interface IMimeMessageCallback;
26 interface IMimeEnumAddressTypes;
27 interface IMimeMessageParts;
28 interface IMimeMessageTree;
29 interface IMimeBody;
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_IMimeMessage, 0xfd853ce3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
35 cpp_quote("#define MIME_E_REG_CREATE_KEY 0x800cce01")
36 cpp_quote("#define MIME_E_REG_QUERY_INFO 0x800cce02")
37 cpp_quote("#define MIME_E_INVALID_ENCTYPE 0x800cce03")
38 cpp_quote("#define MIME_E_BOUNDARY_MISMATCH 0x800cce04")
39 cpp_quote("#define MIME_E_NOT_FOUND 0x800cce05")
40 cpp_quote("#define MIME_E_NO_DATA 0x800cce05")
41 cpp_quote("#define MIME_E_BUFFER_TOO_SMALL 0x800cce06")
43 cpp_quote("typedef enum tagMIMEPROPID {")
44 cpp_quote(" PID_HDR_NEWSGROUP = 2,")
45 cpp_quote(" PID_HDR_NEWSGROUPS = 3,")
46 cpp_quote(" PID_HDR_REFS = 4,")
47 cpp_quote(" PID_HDR_SUBJECT = 5,")
48 cpp_quote(" PID_HDR_FROM = 6,")
49 cpp_quote(" PID_HDR_MESSAGEID = 7,")
50 cpp_quote(" PID_HDR_RETURNPATH = 8,")
51 cpp_quote(" PID_HDR_RR = 9,")
52 cpp_quote(" PID_HDR_RETRCPTO = 10,")
53 cpp_quote(" PID_HDR_APPARTO = 11,")
54 cpp_quote(" PID_HDR_DATE = 12,")
55 cpp_quote(" PID_HDR_RECEIVED = 13,")
56 cpp_quote(" PID_HDR_REPLYTO = 14,")
57 cpp_quote(" PID_HDR_XMAILER = 15,")
58 cpp_quote(" PID_HDR_BCC = 16,")
59 cpp_quote(" PID_HDR_MIMEVER = 17,")
60 cpp_quote(" PID_HDR_CNTTYPE = 18,")
61 cpp_quote(" PID_HDR_CNTXFER = 19,")
62 cpp_quote(" PID_HDR_CNTID = 20,")
63 cpp_quote(" PID_HDR_CNTDESC = 21,")
64 cpp_quote(" PID_HDR_CNTDISP = 22,")
65 cpp_quote(" PID_HDR_CNTBASE = 23,")
66 cpp_quote(" PID_HDR_CNTLOC = 24,")
67 cpp_quote(" PID_HDR_TO = 25,")
68 cpp_quote(" PID_HDR_PATH = 26,")
69 cpp_quote(" PID_HDR_FOLLOWUPTO = 27,")
70 cpp_quote(" PID_HDR_EXPIRES = 28,")
71 cpp_quote(" PID_HDR_CC = 29,")
73 cpp_quote(" PID_HDR_SENDER = 61,")
75 cpp_quote(" PID_HDR_INREPLYTO = 77,")
76 cpp_quote("} MIMEPROPID;")
78 cpp_quote("#define OID_HEADER_RELOAD_TYPE (0x00370000 | VT_UI4)")
82 uuid(e4b28371-83b0-11d0-8259-00c04fd85ab4),
83 version(1.0)
85 library MIMEOLE
87 importlib("stdole2.tlb");
89 DECLARE_HANDLE(HCHARSET);
90 DECLARE_HANDLE(HBODY);
91 DECLARE_HANDLE(HHEADERROW);
93 typedef HCHARSET *LPHCHARSET;
94 typedef HBODY *LPHBODY;
95 typedef HHEADERROW *LPHHEADERROW;
96 typedef DWORD TYPEDID;
97 typedef const PROPVARIANT *LPCPROPVARIANT;
98 typedef const BLOB *LPCBLOB;
100 typedef enum tagRELOADTYPE
102 RELOAD_HEADER_NONE,
103 RELOAD_HEADER_RESET,
104 RELOAD_HEADER_APPEND,
105 RELOAD_HEADER_REPLACE,
106 } RELOADTYPE;
108 typedef enum tagMIMESAVETYPE
110 SAVE_RFC822,
111 SAVE_RFC1521,
112 } MIMESAVETYPE;
114 typedef enum tagCSETAPPLYTYPE
116 CSET_APPLY_UNTAGGED,
117 CSET_APPLY_ALL,
118 CSET_APPLY_TAG_ALL,
119 } CSETAPPLYTYPE;
121 typedef enum tagENCODINGTYPE
123 IET_BINARY,
124 IET_BASE64,
125 IET_UUENCODE,
126 IET_QP,
127 IET_7BIT,
128 IET_8BIT,
129 IET_INETCSET,
130 IET_UNICODE,
131 IET_RFC1522,
132 IET_ENCODED,
133 IET_CURRENT,
134 IET_UNKNOWN,
135 IET_BINHEX40,
136 IET_LAST
137 } ENCODINGTYPE;
139 const SHORT IET_DECODED = IET_BINARY;
141 const SHORT CCHMAX_HEADER_LINE = 1000;
144 uuid(c5588349-7f86-11d0-8252-00c04fd85ab4),
145 object
147 interface IMimeInternational : IUnknown
149 typedef [unique] IMimeInternational *LPMIMEINTERNATIONAL;
150 typedef DWORD CODEPAGEID;
152 const CODEPAGEID CP_USASCII = 1252;
153 const CODEPAGEID CP_UNICODE = 1200;
154 const CODEPAGEID CP_JAUTODETECT = 50932;
155 const CODEPAGEID CP_KAUTODETECT = 50949;
156 const CODEPAGEID CP_ISO2022JPESC = 50221;
157 const CODEPAGEID CP_ISO2022JPSIO = 50222;
159 const SHORT CCHMAX_CSET_NAME = 128;
160 const SHORT CCHMAX_LANG_NAME = 128;
161 const SHORT CCHMAX_FACE_NAME = 128;
163 typedef struct tagINETCSETINFO
165 CHAR szName[CCHMAX_CSET_NAME];
166 HCHARSET hCharset;
167 CODEPAGEID cpiWindows;
168 CODEPAGEID cpiInternet;
169 DWORD dwReserved1;
170 } INETCSETINFO, *LPINETCSETINFO;
172 typedef enum tagINETLANGMASK
174 ILM_FAMILY = 0x01,
175 ILM_NAME = 0x02,
176 ILM_BODYCSET = 0x04,
177 ILM_HEADERCSET = 0x08,
178 ILM_WEBCSET = 0x10,
179 ILM_FIXEDFONT = 0x20,
180 ILM_VARIABLEFONT = 0x40,
181 } INETLANGMASK;
183 typedef struct tagCODEPAGEINFO
185 DWORD dwMask;
186 CODEPAGEID cpiCodePage;
187 BOOL fIsValidCodePage;
188 ULONG ulMaxCharSize;
189 BOOL fInternetCP;
190 CODEPAGEID cpiFamily;
191 CHAR szName[CCHMAX_LANG_NAME];
192 CHAR szBodyCset[CCHMAX_CSET_NAME];
193 CHAR szHeaderCset[CCHMAX_CSET_NAME];
194 CHAR szWebCset[CCHMAX_CSET_NAME];
195 CHAR szFixedFont[CCHMAX_FACE_NAME];
196 CHAR szVariableFont[CCHMAX_FACE_NAME];
197 ENCODINGTYPE ietNewsDefault;
198 ENCODINGTYPE ietMailDefault;
199 DWORD dwReserved1;
200 } CODEPAGEINFO, *LPCODEPAGEINFO;
202 typedef struct tagRFC1522INFO
204 BOOL fRfc1522Allowed;
205 BOOL fRfc1522Used;
206 BOOL fAllow8bit;
207 HCHARSET hRfc1522Cset;
208 } RFC1522INFO, *LPRFC1522INFO;
210 typedef enum tagCHARSETTYPE
212 CHARSET_BODY,
213 CHARSET_HEADER,
214 CHARSET_WEB,
215 } CHARSETTYPE;
218 HRESULT SetDefaultCharset(
219 [in] HCHARSET hCharset);
220 HRESULT GetDefaultCharset(
221 [out] LPHCHARSET phCharset);
222 HRESULT GetCodePageCharset(
223 [in] CODEPAGEID cpiCodePage,
224 [in] CHARSETTYPE ctCsetType,
225 [out] LPHCHARSET phCharset);
226 HRESULT FindCharset(
227 [in] LPCSTR pszCharset,
228 [out] LPHCHARSET phCharset);
229 HRESULT GetCharsetInfo(
230 [in] HCHARSET hCharset,
231 [in, out] LPINETCSETINFO pCsetInfo);
232 HRESULT GetCodePageInfo(
233 [in] CODEPAGEID cpiCodePage,
234 [in, out] LPCODEPAGEINFO pCodePageInfo);
235 HRESULT DecodeHeader(
236 [in] HCHARSET hCharset,
237 [in] LPCSTR pszData,
238 [in, out] LPPROPVARIANT pDecoded,
239 [in, out] LPRFC1522INFO pRfc1522Info);
240 HRESULT EncodeHeader(
241 [in] HCHARSET hCharset,
242 [in] LPPROPVARIANT pData,
243 [out] LPSTR *ppszEncoded,
244 [in, out] LPRFC1522INFO pRfc1522Info);
245 HRESULT ConvertBuffer(
246 [in] CODEPAGEID cpiSource,
247 [in] CODEPAGEID cpiDest,
248 [in] LPBLOB pIn,
249 [in, out] LPBLOB pOut,
250 [out] ULONG *pcbRead);
251 HRESULT ConvertString(
252 [in] CODEPAGEID cpiSource,
253 [in] CODEPAGEID cpiDest,
254 [in] LPPROPVARIANT pIn,
255 [in, out] LPPROPVARIANT pOut);
256 HRESULT MLANG_ConvertInetReset();
257 HRESULT MLANG_ConvertInetString(
258 [in] CODEPAGEID cpiSource,
259 [in] CODEPAGEID cpiDest,
260 [in] LPCSTR pSource,
261 [in] int *pnSizeOfSource,
262 [out] LPSTR pDestination,
263 [in] int *pnDstSize);
264 HRESULT Rfc1522Decode(
265 [in] LPCSTR pszValue,
266 [in] LPCSTR pszCharset,
267 [in] ULONG cchmax,
268 [out] LPSTR *ppszDecoded);
269 HRESULT Rfc1522Encode(
270 [in] LPCSTR pszValue,
271 [in] HCHARSET hCharset,
272 [out] LPSTR *ppszEncoded);
276 uuid(c5588353-7f86-11d0-8252-00c04fd85ab4),
277 object
279 interface IMimeSecurity : IUnknown
281 typedef [unique] IMimeSecurity *LPMIMESECURITY;
283 cpp_quote("#ifdef __WINE_WINCRYPT_H")
284 cpp_quote("typedef PCCERT_CONTEXT PCX509CERT;")
285 cpp_quote("#else")
286 typedef const void *PCX509CERT;
287 typedef void *HCERTSTORE;
288 cpp_quote("#endif")
290 typedef BLOB THUMBBLOB;
291 typedef void *HCAPICERTSTORE;
293 typedef enum tagCERTSTATE
295 CERTIFICATE_OK,
296 CERTIFICATE_NOT_PRESENT,
297 CERTIFICATE_EXPIRED,
298 CERTIFICATE_CHAIN_TOO_LONG,
299 CERTIFICATE_MISSING_ISSUER,
300 CERTIFICATE_CRL_LISTED,
301 CERTIFICATE_NOT_TRUSTED,
302 CERTIFICATE_INVALID,
303 CERTIFICATE_ERROR,
304 CERTIFICATE_NOPRINT,
305 CERTIFICATE_UNKNOWN
306 } CERTSTATE;
308 typedef enum tagCERTNAMETYPE
310 SIMPLE,
311 OID,
312 X500,
313 } CERTNAMETYPE;
315 typedef enum tagCERTDATAID
317 CDID_EMAIL,
318 CDID_MAX
319 } CERTDATAID;
321 typedef struct tagX509CERTRESULT
323 DWORD cEntries;
324 CERTSTATE *rgcs;
325 PCX509CERT *rgpCert;
326 } X509CERTRESULT, *PX509CERTRESULT;
327 typedef const X509CERTRESULT *PCX509CERTRESULT;
329 HRESULT InitNew(void);
331 HRESULT CheckInit(void);
333 HRESULT EncodeMessage(
334 [in] IMimeMessageTree */*const*/ pTree,
335 [in] DWORD dwFlags);
337 HRESULT EncodeBody(
338 [in] IMimeMessageTree */*const*/ pTree,
339 [in] HBODY hEncodeRoot,
340 [in] DWORD dwFlags);
342 HRESULT DecodeMessage(
343 [in] IMimeMessageTree */*const*/ pTree,
344 [in] DWORD dwFlags);
346 HRESULT DecodeBody(
347 [in] IMimeMessageTree */*const*/ pTree,
348 [in] HBODY hDecodeRoot,
349 [in] DWORD dwFlags);
351 HRESULT EnumCertificates(
352 [in] HCAPICERTSTORE hc,
353 [in] DWORD dwUsage,
354 [in] PCX509CERT pPrev,
355 [out] PCX509CERT *ppCert);
357 HRESULT GetCertificateName(
358 [in] const PCX509CERT pX509Cert,
359 [in] const CERTNAMETYPE cn,
360 [out] LPSTR *ppszName);
362 HRESULT GetMessageType(
363 [in] const HWND hwndParent,
364 [in] IMimeBody */*const*/ pBody,
365 [out] DWORD */*const*/ pdwSecType);
367 HRESULT GetCertData(
368 [in] const PCX509CERT pX509Cert,
369 [in] const CERTDATAID dataid,
370 [out, ref] LPPROPVARIANT pValue);
374 uuid(fd853cd1-7f86-11d0-8252-00c04fd85ab4),
375 object
377 interface IMimeHeaderTable : IPersistStream
379 /* FIXME: fill this in */
383 uuid(fd853cec-7f86-11d0-8252-00c04fd85ab4),
384 object
386 interface IMimePropertySchema : IUnknown
388 typedef enum tagMIMEPROPFLAGS
390 MPF_INETCSET = 0x01,
391 MPF_RFC1522 = 0x02,
392 MPF_ADDRESS = 0x04,
393 MPF_HASPARAMS = 0x08,
394 MPF_MIME = 0x10,
395 MPF_READONLY = 0x20
396 } MIMEPROPFLAGS;
398 /* FIXME: fill this in */
402 uuid(fd853cd3-7f86-11d0-8252-00c04fd85ab4),
403 object
405 interface IMimePropertySet : IPersistStreamInit
407 typedef [unique] IMimePropertySet *LPMIMEPROPERTYSET;
409 cpp_quote("#define PDF_ENCODED 0x00000001")
410 cpp_quote("#define PDF_NAMEINDATA 0x00000002")
411 cpp_quote("#define PDF_HEADERFORMAT (0x00000004 | PDF_ENCODED)")
412 cpp_quote("#define PDF_NOCOMMENTS 0x00000008")
413 cpp_quote("#define PDF_SAVENOENCODE 0x00000010")
414 cpp_quote("#define PDF_VECTOR 0x00000020")
416 typedef struct tagMIMEPARAMINFO
418 LPSTR pszName;
419 LPSTR pszData;
420 } MIMEPARAMINFO, *LPMIMEPARAMINFO;
422 typedef enum tagPROPINFOMASK
424 PIM_CHARSET = 0x01,
425 PIM_ENCODINGTYPE = 0x02,
426 PIM_ROWNUMBER = 0x04,
427 PIM_FLAGS = 0x08,
428 PIM_PROPID = 0x10,
429 PIM_VALUES = 0x20,
430 PIM_VTDEFAULT = 0x40,
431 PIM_VTCURRENT = 0x80
432 } PROPINFOMASK;
434 typedef struct tagMIMEPROPINFO
436 DWORD dwMask;
437 HCHARSET hCharset;
438 ENCODINGTYPE ietEncoding;
439 DWORD dwRowNumber;
440 DWORD dwFlags;
441 DWORD dwPropId;
442 DWORD cValues;
443 VARTYPE vtDefault;
444 VARTYPE vtCurrent;
445 } MIMEPROPINFO, *LPMIMEPROPINFO;
446 typedef const MIMEPROPINFO *LPCMIMEPROPINFO;
448 HRESULT GetPropInfo(
449 [in] LPCSTR pszName,
450 [in,out] LPMIMEPROPINFO pInfo);
452 HRESULT SetPropInfo(
453 [in] LPCSTR pszName,
454 [in] LPCMIMEPROPINFO pInfo);
456 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
457 cpp_quote("#undef GetProp")
458 cpp_quote("#undef SetProp")
459 cpp_quote("#undef EnumProps")
460 cpp_quote("#endif")
461 HRESULT GetProp(
462 [in] LPCSTR pszName,
463 [in] DWORD dwFlags,
464 [in,out] LPPROPVARIANT pValue);
466 HRESULT SetProp(
467 [in] LPCSTR pszName,
468 [in] DWORD dwFlags,
469 [in] LPCPROPVARIANT pValue);
471 HRESULT AppendProp(
472 [in] LPCSTR pszName,
473 [in] DWORD dwFlags,
474 [in] LPPROPVARIANT pValue);
476 HRESULT DeleteProp(
477 [in] LPCSTR pszName);
479 HRESULT CopyProps(
480 [in] ULONG cNames,
481 [in,unique] LPCSTR *prgszName,
482 [in] IMimePropertySet *pPropertySet);
484 HRESULT MoveProps(
485 [in] ULONG cNames,
486 [in] LPCSTR *prgszName,
487 [in] IMimePropertySet *pPropertySet);
489 HRESULT DeleteExcept(
490 [in] ULONG cNames,
491 [in] LPCSTR *prgszName);
493 HRESULT QueryProp(
494 [in] LPCSTR pszName,
495 [in] LPCSTR pszCriteria,
496 [in] boolean fSubString,
497 [in] boolean fCaseSensitive);
499 HRESULT GetCharset(
500 [out] LPHCHARSET phCharset);
502 HRESULT SetCharset(
503 [in] HCHARSET hCharset,
504 [in] CSETAPPLYTYPE applytype);
506 HRESULT GetParameters(
507 [in] LPCSTR pszName,
508 [out] ULONG *pcParams,
509 [out] LPMIMEPARAMINFO *pprgParam);
511 HRESULT IsContentType(
512 [in] LPCSTR pszPriType,
513 [in,unique] LPCSTR pszSubType);
515 HRESULT BindToObject(
516 [in] REFIID riid,
517 [out,iid_is(riid)] void **ppvObject);
519 HRESULT Clone(
520 [out] IMimePropertySet **ppPropertySet);
522 HRESULT SetOption(
523 [in] const TYPEDID oid,
524 [in] LPCPROPVARIANT pValue);
526 HRESULT GetOption(
527 [in] const TYPEDID oid,
528 [in,out] LPPROPVARIANT pValue);
530 cpp_quote("#define EPF_NONAME 0x00000001")
532 HRESULT EnumProps(
533 [in] DWORD dwFlags,
534 [out] IMimeEnumProperties **ppEnum);
539 uuid(c558834a-7f86-11d0-8252-00c04fd85ab4),
540 object
542 interface IMimeAddressTable : IUnknown
544 typedef [unique] IMimeAddressTable *LPMIMEADDRESSTABLE;
546 DECLARE_HANDLE(HADDRESS);
547 typedef HADDRESS *LPHADDRESS;
548 typedef DWORD IADDRESSTYPE;
550 typedef enum tagADDRESSFORMAT
552 AFT_DISPLAY_FRIENDLY,
553 AFT_DISPLAY_EMAIL,
554 AFT_DISPLAY_BOTH,
555 AFT_RFC822_DECODED,
556 AFT_RFC822_ENCODED,
557 AFT_RFC822_TRANSMIT,
558 } ADDRESSFORMAT;
560 typedef struct tagADDRESSPROPS
562 DWORD dwProps;
563 HADDRESS hAddress;
564 ENCODINGTYPE ietFriendly;
565 HCHARSET hCharset;
566 DWORD dwAdrType;
567 LPSTR pszFriendly;
568 LPWSTR pwszReserved;
569 LPSTR pszEmail;
570 CERTSTATE certstate;
571 THUMBBLOB tbSigning;
572 THUMBBLOB tbEncryption;
573 DWORD dwCookie;
574 DWORD dwReserved1;
575 DWORD dwReserved2;
576 } ADRESSPROPS, *LPADDRESSPROPS;
578 typedef struct tagADDRESSLIST
580 ULONG cAdrs;
581 LPADDRESSPROPS prgAdr;
582 } ADDRESSLIST, *LPADDRESSLIST;
584 /* FIXME: fill this in */
588 uuid(ee519f11-851a-11d0-8252-00c04fd85ab4),
589 object
591 interface IMimeWebDocument : IUnknown
593 /* FIXME: fill this in */
597 uuid(c558834c-7f86-11d0-8252-00c04fd85ab4),
598 object
600 interface IMimeBody : IMimePropertySet
602 typedef [unique] IMimeBody *LPMIMEBODY;
604 typedef enum tagIMSGBODYTYPE
606 IBT_SECURE,
607 IBT_ATTACHMENT,
608 IBT_EMPTY,
609 IBT_CSETTAGGED,
610 IBT_AUTOATTACH,
611 } IMSGBODYTYPE;
613 typedef struct tagBODYOFFSETS
615 DWORD cbBoundaryStart;
616 DWORD cbHeaderStart;
617 DWORD cbBodyStart;
618 DWORD cbBodyEnd;
619 } BODYOFFSETS, *LPBODYOFFSETS;
621 typedef struct tagTRANSMITINFO
623 ENCODINGTYPE ietCurrent;
624 ENCODINGTYPE ietXmitMime;
625 ENCODINGTYPE ietXmit822;
626 ULONG cbLongestLine;
627 ULONG cExtended;
628 ULONG ulPercentExt;
629 ULONG cbSize;
630 ULONG cLines;
631 } TRANSMITINFO, *LPTRANSMITINFO;
633 HRESULT IsType(
634 [in] IMSGBODYTYPE bodytype);
636 HRESULT SetDisplayName(
637 [in] LPCSTR pszDisplay);
639 HRESULT GetDisplayName(
640 [out] LPSTR *ppszDisplay);
642 HRESULT GetOffsets(
643 [out] LPBODYOFFSETS pOffsets);
645 HRESULT GetCurrentEncoding(
646 [out] ENCODINGTYPE *pietEncoding);
648 HRESULT SetCurrentEncoding(
649 [in] ENCODINGTYPE ietEncoding);
651 HRESULT GetEstimatedSize(
652 [in] ENCODINGTYPE ietEncoding,
653 [out] ULONG *pcbSize);
655 HRESULT GetDataHere(
656 [in] ENCODINGTYPE ietEncoding,
657 [in] IStream *pStream);
659 HRESULT GetData(
660 [in] ENCODINGTYPE ietEncoding,
661 [out] IStream **ppStream);
663 HRESULT SetData(
664 [in] ENCODINGTYPE ietEncoding,
665 [in,unique] LPCSTR pszPriType,
666 [in,unique] LPCSTR pszSubType,
667 [in] REFIID riid,
668 [in,iid_is(riid)] LPVOID pvObject);
670 HRESULT EmptyData(void);
672 HRESULT CopyTo(
673 [in] IMimeBody *pBody);
675 HRESULT GetTransmitInfo(
676 [in,out] LPTRANSMITINFO pTransmitInfo);
678 HRESULT SaveToFile(
679 [in] ENCODINGTYPE ietEncoding,
680 [in] LPCSTR pszFilePath);
682 HRESULT GetHandle(
683 [out] LPHBODY phBody);
688 uuid(fd853cd4-7f86-11d0-8252-00c04fd85ab4),
689 object
691 interface IMimeMessageTree : IPersistStreamInit
693 typedef [unique] IMimeMessageTree *LPMIMEMESSAGETREE;
695 const HBODY HBODY_ROOT = (HBODY)-1;
697 typedef enum tagBODYLOCATION
699 IBL_ROOT,
700 IBL_PARENT,
701 IBL_FIRST,
702 IBL_LAST,
703 IBL_NEXT,
704 IBL_PREVIOUS,
705 } BODYLOCATION;
707 typedef struct tagFINDBODY
709 LPSTR pszPriType;
710 LPSTR pszSubType;
711 DWORD dwReserved;
712 } FINDBODY, *LPFINDBODY;
714 HRESULT GetMessageSource(
715 [out] IStream **ppStream,
716 [in] DWORD dwFlags);
718 HRESULT GetMessageSize(
719 [out] ULONG *pcbSize,
720 [in] DWORD dwFlags);
722 HRESULT LoadOffsetTable(
723 [in] IStream *pStream);
725 HRESULT SaveOffsetTable(
726 [in] IStream *pStream,
727 [in] DWORD dwFlags);
729 HRESULT GetFlags(
730 [out] DWORD *pdwFlags);
732 HRESULT Commit(
733 [in] DWORD dwFlags);
735 HRESULT HandsOffStorage();
737 HRESULT BindToObject(
738 [in] const HBODY hBody,
739 [in] REFIID riid,
740 [out, iid_is(riid)] void **ppvObject);
742 HRESULT SaveBody(
743 [in] HBODY hBody,
744 [in] DWORD dwFlags,
745 [in] IStream *pStream);
747 HRESULT InsertBody(
748 [in] BODYLOCATION location,
749 [in] HBODY hPivot,
750 [out] LPHBODY phBody);
752 HRESULT GetBody(
753 [in] BODYLOCATION location,
754 [in] HBODY hPivot,
755 [out] LPHBODY phBody);
757 HRESULT DeleteBody(
758 [in] HBODY hBody,
759 [in] DWORD dwFlags);
761 HRESULT MoveBody(
762 [in] HBODY hBody,
763 [in] BODYLOCATION location);
765 HRESULT CountBodies(
766 [in] HBODY hParent,
767 [in] boolean fRecurse,
768 [out] ULONG *pcBodies);
770 HRESULT FindFirst(
771 [in, out] LPFINDBODY pFindBody,
772 [out] LPHBODY phBody);
774 HRESULT FindNext(
775 [in, out] LPFINDBODY pFindBody,
776 [out] LPHBODY phBody);
778 HRESULT ResolveURL(
779 [in] HBODY hRelated,
780 [in] LPCSTR pszBase,
781 [in] LPCSTR pszURL,
782 [in] DWORD dwFlags,
783 [out] LPHBODY phBody);
785 HRESULT ToMultipart(
786 [in] HBODY hBody,
787 [in] LPCSTR pszSubType,
788 [out] LPHBODY phMultipart);
790 HRESULT GetBodyOffsets(
791 [in] HBODY hBody,
792 [in, out] LPBODYOFFSETS pOffsets);
794 HRESULT GetCharset(
795 [out] LPHCHARSET phCharset);
797 HRESULT SetCharset(
798 [in] HCHARSET hCharset,
799 [in] CSETAPPLYTYPE applytype);
801 HRESULT IsBodyType(
802 [in] HBODY hBody,
803 [in] IMSGBODYTYPE bodytype);
805 HRESULT IsContentType(
806 [in] HBODY hBody,
807 [in] LPCSTR pszPriType,
808 [in] LPCSTR pszSubType);
810 HRESULT QueryBodyProp(
811 [in] HBODY hBody,
812 [in] LPCSTR pszName,
813 [in] LPCSTR pszCriteria,
814 [in] boolean fSubString,
815 [in] boolean fCaseSensitive);
817 HRESULT GetBodyProp(
818 [in] HBODY hBody,
819 [in] LPCSTR pszName,
820 [in] DWORD dwFlags,
821 [in, out] LPPROPVARIANT pValue);
823 HRESULT SetBodyProp(
824 [in] HBODY hBody,
825 [in] LPCSTR pszName,
826 [in] DWORD dwFlags,
827 [in] LPCPROPVARIANT pValue);
829 HRESULT DeleteBodyProp(
830 [in] HBODY hBody,
831 [in] LPCSTR pszName);
833 HRESULT SetOption(
834 [in] const TYPEDID oid,
835 [in] LPCPROPVARIANT pValue);
837 HRESULT GetOption(
838 [in] const TYPEDID oid,
839 [in, out] LPPROPVARIANT pValue);
843 uuid(fd853cd5-7f86-11d0-8252-00c04fd85ab4),
844 object
846 interface IMimeMessage : IMimeMessageTree
848 typedef [unique] IMimeMessage *LPMIMEMESSAGE;
850 typedef DWORD TEXTTYPE;
852 typedef enum tagIMSGFLAGS
854 IMF_ATTACHMENTS = 0x00000001,
855 IMF_MULTIPART = 0x00000002,
856 IMF_SUBMULTIPART = 0x00000004,
857 IMF_MIME = 0x00000008,
858 IMF_HTML = 0x00000010,
859 IMF_PLAIN = 0x00000020,
860 IMF_PARTIAL = 0x00000040,
861 IMF_SIGNED = 0x00000080,
862 IMF_ENCRYPTED = 0x00000100,
863 IMF_TNEF = 0x00000200,
864 IMF_MHTML = 0x00000400,
865 IMF_SECURE = 0x00000800,
866 IMF_TEXT = 0x00001000,
867 IMF_CSETTAGGED = 0x00002000,
868 IMF_NEWS = 0x00004000,
869 IMF_VOICEMAIL = 0x00008000,
870 IMF_HASVCARD = 0x00010000,
871 IMF_RFC1154 = 0x00020000,
872 } IMSGFLAGS;
874 typedef enum tagIMSGPRIORITY
876 IMSG_PRI_LOW = 5,
877 IMSG_PRI_NORMAL = 3,
878 IMSG_PRI_HIGH = 1,
879 } IMSGPRIORITY;
881 cpp_quote("#define WPF_HTML 0x00000001")
882 cpp_quote("#define WPF_AUTOINLINE 0x00000002")
883 cpp_quote("#define WPF_SLIDESHOW 0x00000004")
884 cpp_quote("#define WPF_ATTACHLINKS 0x00000008")
885 cpp_quote("#define WPF_IMAGESONLY 0x00000010")
886 cpp_quote("#define WPF_NOMETACHARSET 0x00000020")
888 typedef struct tagWEPAGEOPTIONS
890 DWORD cbSize;
891 DWORD dwFlags;
892 DWORD dwDelay;
893 WCHAR wchQuote;
894 } WEBPAGEOPTIONS, *LPWEBPAGEOPTIONS;
896 HRESULT CreateWebPage(
897 [in] IStream *pRootStm,
898 [in] LPWEBPAGEOPTIONS pOptions,
899 [in] IMimeMessageCallback *pCallback,
900 [out] IMoniker **ppMoniker);
902 HRESULT GetProp(
903 [in] LPCSTR pszName,
904 [in] DWORD dwFlags,
905 [in,out] LPPROPVARIANT pValue);
907 HRESULT SetProp(
908 [in] LPCSTR pszName,
909 [in] DWORD dwFlags,
910 [in] LPCPROPVARIANT pValue);
912 HRESULT DeleteProp(
913 [in] LPCSTR pszName);
915 HRESULT QueryProp(
916 [in] LPCSTR pszName,
917 [in] LPCSTR pszCriteria,
918 [in] boolean fSubString,
919 [in] boolean fCaseSensitive);
921 HRESULT GetTextBody(
922 [in] DWORD dwTxtType,
923 [in] ENCODINGTYPE ietEncoding,
924 [out] IStream **pStream,
925 [out] LPHBODY phBody);
927 HRESULT SetTextBody(
928 [in] DWORD dwTxtType,
929 [in] ENCODINGTYPE ietEncoding,
930 [in] HBODY hAlternative,
931 [in] IStream *pStream,
932 [out] LPHBODY phBody);
934 HRESULT AttachObject(
935 [in] REFIID riid,
936 [in, iid_is(riid)] void *pvObject,
937 [out] LPHBODY phBody);
939 HRESULT AttachFile(
940 [in] LPCSTR pszFilePath,
941 [in] IStream *pstmFile,
942 [out] LPHBODY phBody);
944 HRESULT AttachURL(
945 [in] LPCSTR pszBase,
946 [in] LPCSTR pszURL,
947 [in] DWORD dwFlags,
948 [in] IStream *pstmURL,
949 [out] LPSTR *ppszCIDURL,
950 [out] LPHBODY phBody);
952 HRESULT GetAttachments(
953 [out] ULONG *pcAttach,
954 [out] LPHBODY *pprghAttach);
956 HRESULT GetAddressTable(
957 [out] IMimeAddressTable **ppTable);
959 HRESULT GetSender(
960 [in, out] LPADDRESSPROPS pAddress);
962 HRESULT GetAddressTypes(
963 [in] DWORD dwAdrTypes,
964 [in] DWORD dwProps,
965 [in, out] LPADDRESSLIST pList);
967 HRESULT GetAddressFormat(
968 [in] DWORD dwAdrTypes,
969 [in] ADDRESSFORMAT format,
970 [out] LPSTR *ppszFormat);
972 HRESULT EnumAddressTypes(
973 [in] DWORD dwAdrTypes,
974 [in] DWORD dwProps,
975 [out] IMimeEnumAddressTypes **ppEnum);
977 HRESULT SplitMessage(
978 [in] ULONG cbMaxPart,
979 [out] IMimeMessageParts **ppParts);
981 HRESULT GetRootMoniker(
982 [out] IMoniker **ppMoniker);
986 uuid(761aa741-7bda-11d1-8aa9-00c04fb951f3),
987 object
989 interface IMimeMessageCallback : IUnknown
991 HRESULT OnWebPageSplitter(
992 [in] DWORD cInlined,
993 [in] IStream *ppStream);
997 uuid(de4ad8da-555f-11d1-8dd0-00c04fb951f9),
998 object
1000 interface IPersistMime : IPersist
1002 /* FIXME: fill this in */
1006 uuid(c558834f-7f86-11d0-8252-00c04fd85ab4),
1007 object
1009 interface IMimeMessageParts : IUnknown
1011 /* FIXME: fill this in */
1015 uuid(c558834d-7f86-11d0-8252-00c04fd85ab4),
1016 object
1018 interface IMimeEnumHeaderRows : IUnknown
1020 /* FIXME: fill this in */
1024 uuid(fd853cee-7f86-11d0-8252-00c04fd85ab4),
1025 object
1027 interface IMimeEnumProperties : IUnknown
1029 /* FIXME: fill this in */
1033 uuid(c5588354-7f86-11d0-8252-00c04fd85ab4),
1034 object
1036 interface IMimeEnumAddressTypes : IUnknown
1038 /* FIXME: fill this in */
1042 uuid(c5588350-7f86-11d0-8252-00c04fd85ab4),
1043 object
1045 interface IMimeEnumMessageParts : IUnknown
1047 /* FIXME: fill this in */
1051 uuid(64577981-86d7-11d1-bdfc-00c04fa31009),
1052 object
1054 interface IHashTable : IUnknown
1056 /* FIXME: fill this in */
1060 uuid(c5588351-7f86-11d0-8252-00c04fd85ab4),
1061 object
1063 interface IMimeAllocator : IMalloc
1065 /* FIXME: fill this in */
1069 uuid(feceaffd-c441-11d1-960e-00c04fbd7c09),
1070 object
1072 interface IMimeObjResolver : IUnknown
1074 /* FIXME: fill this in */
1078 uuid(b0d17fc2-7bc4-11d1-bdfa-00c04fa31009),
1079 object
1081 interface IFontCache : IUnknown
1083 /* FIXME: fill this in */
1087 uuid(b0d17fc5-7bc4-11d1-bdfa-00c04fa31009),
1088 object
1090 interface IFontCacheNotify : IUnknown
1092 /* FIXME: fill this in */
1096 uuid(70183210-7b36-11d2-8c12-00c04fa31009),
1097 object
1099 interface IMimeEditTag : IUnknown
1101 /* FIXME: fill this in */
1105 uuid(d09ee528-7b38-11d2-8c12-00c04fa31009),
1106 object
1108 interface IMimeEditTagCollection : IUnknown
1110 /* FIXME: fill this in */
1114 cpp_quote("#ifdef __cplusplus")
1115 cpp_quote(" extern \"C\" {")
1116 cpp_quote("#endif")
1118 cpp_quote("")
1119 cpp_quote("HRESULT WINAPI MimeOleSetCompatMode(DWORD);")
1120 cpp_quote("HRESULT WINAPI MimeOleContentTypeFromUrl(LPCSTR,LPCSTR,LPSTR*);")
1121 cpp_quote("HRESULT WINAPI MimeOleParseMhtmlUrl(LPSTR,LPSTR*,LPSTR*);")
1122 cpp_quote("HRESULT WINAPI MimeOleObjectFromUrl(LPCSTR,BOOL,REFIID,LPVOID*,IUnknown**);")
1123 cpp_quote("HRESULT WINAPI MimeOleObjectFromMoniker(BINDF,IMoniker*,IBindCtx*,REFIID,LPVOID*,IMoniker**);")
1124 cpp_quote("HRESULT WINAPI MimeOleCombineURL(LPCSTR,ULONG,LPCSTR,ULONG,BOOL,LPSTR*);")
1125 cpp_quote("HRESULT WINAPI MimeOleGetSubjectFileName(IMimePropertySet*,ULONG*,ULONG*,LPSTR,ULONG);")
1126 cpp_quote("HRESULT WINAPI MimeOleCreateWebDocument(LPCSTR,LPCSTR,IMimeWebDocument**);")
1127 cpp_quote("HRESULT WINAPI MimeOleGetRelatedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);")
1128 cpp_quote("HRESULT WINAPI MimeOleGetMixedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);")
1129 cpp_quote("HRESULT WINAPI MimeOleGetAlternativeSection(IMimeMessageTree*,LPHBODY,boolean*);")
1130 cpp_quote("HRESULT WINAPI MimeOleGenerateCID(LPSTR,ULONG,boolean);")
1131 cpp_quote("HRESULT WINAPI MimeOleGenerateMID(LPSTR,ULONG,boolean);")
1132 cpp_quote("HRESULT WINAPI MimeOleCreateByteStream(IStream**);")
1133 cpp_quote("HRESULT WINAPI MimeOlGetPropertySchema(IMimePropertySchema**);")
1134 cpp_quote("HRESULT WINAPI MimeOleQueryString(LPCSTR,LPCSTR,boolean,boolean);")
1135 cpp_quote("HRESULT WINAPI MimeOleGetPropA(IMimePropertySet*,LPCSTR,DWORD,LPSTR*);")
1136 cpp_quote("HRESULT WINAPI MimeOleSetPropA(IMimePropertySet*,LPCSTR,DWORD,LPCSTR);")
1137 cpp_quote("HRESULT WINAPI MimeOleGetPropW(IMimePropertySet*,LPCSTR,DWORD,LPWSTR*);")
1138 cpp_quote("HRESULT WINAPI MimeOleSetPropW(IMimePropertySet*,LPCSTR,DWORD,LPCWSTR);")
1139 cpp_quote("HRESULT WINAPI MimeOleGetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPSTR*);")
1140 cpp_quote("HRESULT WINAPI MimeOleSetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCSTR);")
1141 cpp_quote("HRESULT WINAPI MimeOleGetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPWSTR*);")
1142 cpp_quote("HRESULT WINAPI MimeOleSetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCWSTR);")
1143 cpp_quote("HRESULT WINAPI MimeOleCreateHeaderTable(IMimeHeaderTable**);")
1144 cpp_quote("HRESULT WINAPI MimeOleVariantFree(LPPROPVARIANT);")
1145 cpp_quote("HRESULT WINAPI MimeOleVariantCopy(LPPROPVARIANT,LPPROPVARIANT);")
1146 cpp_quote("HRESULT WINAPI MimeOleGetExtClassId(LPCSTR,LPCLSID);")
1147 cpp_quote("HRESULT WINAPI MimeOleEncodeHeader(HCHARSET,LPPROPVARIANT,LPSTR*,LPRFC1522INFO);")
1148 cpp_quote("HRESULT WINAPI MimeOleDecodeHeader(HCHARSET,LPCSTR,LPPROPVARIANT,LPRFC1522INFO);")
1149 cpp_quote("HRESULT WINAPI MimeOleRfc1522Decode(LPCSTR,LPSTR,ULONG,LPSTR*);")
1150 cpp_quote("HRESULT WINAPI MimeOleRfc1522Encode(LPCSTR,HCHARSET,LPSTR*);")
1151 cpp_quote("HRESULT WINAPI MimeOleGetInternat(IMimeInternational**);")
1152 cpp_quote("HRESULT WINAPI MimeOleFindCharset(LPCSTR,LPHCHARSET);")
1153 cpp_quote("HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET,LPINETCSETINFO);")
1154 cpp_quote("HRESULT WINAPI MimeOleGetCodePageInfo(HCHARSET,LPCODEPAGEINFO);")
1155 cpp_quote("HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET);")
1156 cpp_quote("HRESULT WINAPI MimeOleSetDefaultCharset(HCHARSET);")
1157 cpp_quote("HRESULT WINAPI MimeOleGetCodePageCharset(CODEPAGEID,CHARSETTYPE,LPHCHARSET);")
1158 cpp_quote("HRESULT WINAPI MimeOleCreateVirtualStream(IStream**);")
1159 cpp_quote("HRESULT WINAPI MimeOleOpenFileStream(LPCSTR,DWORD,DWORD,IStream**);")
1160 cpp_quote("HRESULT WINAPI MimeOleIsTnefStream(IStream*);")
1161 cpp_quote("HRESULT WINAPI MimeOleGenerateFileName(LPCSTR,LPCSTR,LPCSTR,LPSTR*);")
1162 cpp_quote("HRESULT WINAPI MimeOleGetFileExtension(LPCSTR,LPSTR,ULONG);")
1163 cpp_quote("HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity**);")
1164 cpp_quote("HRESULT WINAPI MimeOleInetDateToFileTime(LPCSTR,LPFILETIME);")
1165 cpp_quote("HRESULT WINAPI MimeOleFileTimeToInetDate(LPFILETIME,LPSTR,ULONG);")
1166 cpp_quote("HRESULT WINAPI MimeOleCreateMessageParts(IMimeMessageParts**);")
1167 cpp_quote("HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator**);")
1168 cpp_quote("HRESULT WINAPI MimeOleParseRfc822Address(DWORD,ENCODINGTYPE,LPCSTR,LPADDRESSLIST);")
1169 cpp_quote("HRESULT WINAPI MimeOleCreateMessage(IUnknown*,IMimeMessage**);")
1170 cpp_quote("HRESULT WINAPI MimeOleMergePartialHeaders(IStream*,IStream*);")
1171 cpp_quote("HRESULT WINAPI MimeOleEscapeString(CODEPAGEID,LPCSTR,LPSTR*);")
1172 cpp_quote("HRESULT WINAPI MimeOleGetExtContentType(LPCSTR,LPSTR*);")
1173 cpp_quote("HRESULT WINAPI MimeOleGetContentTypeExt(LPCSTR,LPSTR*);")
1174 cpp_quote("HRESULT WINAPI MimeOleGetFileInfo(LPSTR,LPSTR*,LPSTR*,LPSTR*,LPSTR*,LPSTR*);")
1175 cpp_quote("HRESULT WINAPI MimeOleCreateBody(IMimeBody**);")
1176 cpp_quote("HRESULT WINAPI MimeOleCreatePropertySet(IUnknown*,IMimePropertySet**);")
1177 cpp_quote("HRESULT WINAPI MimeOleCreateMessageTree(IUnknown*,IMimeMessageTree**);")
1178 cpp_quote("HRESULT WINAPI MimeOleGetCertsFromThumbprints(THUMBBLOB*,X509CERTRESULT*,const HCERTSTORE*,DWORD);")
1179 cpp_quote("HRESULT WINAPI MimeOleSplitMessage(IMimeMessage*,ULONG,IMimeMessageParts**);")
1180 cpp_quote("HRESULT WINAPI MimeOleClearDirtyTree(IMimeMessageTree*);")
1181 cpp_quote("HRESULT WINAPI MimeOleConvertEnrichedToHTML(CODEPAGEID,IStream*,IStream*);")
1182 cpp_quote("HRESULT WINAPI MimeOleSMimeCapsToDlg(LPBYTE,DWORD,DWORD,PCX509CERT*,HWND,DWORD,DWORD,DWORD);")
1183 cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFromDlg(HWND,DWORD,DWORD,DWORD,LPBYTE,DWORD*);")
1184 cpp_quote("HRESULT WINAPI MimeOleSMimeCapInit(LPBYTE,DWORD,LPVOID*);")
1185 cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddSMimeCap(LPBYTE,DWORD,LPVOID);")
1186 cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddCert(LPBYTE,DWORD,BOOL,LPVOID);")
1187 cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetEncAlg(LPVOID,LPBYTE,DWORD*,DWORD*);")
1188 cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetHashAlg(LPVOID,LPBYTE,DWORD*,DWORD*);")
1189 cpp_quote("HRESULT WINAPI MimeOleSMimeCapRelease(LPVOID);")
1190 cpp_quote("HRESULT WINAPI MimeOleAlgNameFromSMimeap(LPBYTE,DWORD,LPCSTR*);")
1191 cpp_quote("HRESULT WINAPI MimeOleAlgStrengthFromSMimeCap(LPBYTE,DWORD,BOOL,DWORD*);")
1192 cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFull(LPVOID,BOOL,BOOL,LPBYTE,DWORD*);")
1193 cpp_quote("HRESULT WINAPI MimeOleCreateHashTable(DWORD,BOOL,IHashTable**);")
1194 cpp_quote("HRESULT WINAPI MimeOleStripHeaders(IMimeMessage*,HBODY,LPCSTR,LPCSTR,IStream**);")
1196 cpp_quote("HRESULT WINAPI MimeEditViewSource(HWND,IMimeMessage*);")
1197 cpp_quote("HRESULT WINAPI MimeEditIsSafeToRun(HWND,LPCSTR);")
1198 cpp_quote("HRESULT WINAPI MimeEditVerifyTrust(HWND,LPCSTR,LPCSTR);")
1199 cpp_quote("HRESULT WINAPI MimeEditCreateMimeDocument(IUnknown*,IMimeMessage*,DWORD,IMimeMessage**);")
1200 cpp_quote("HRESULT WINAPI MimeEditGetBackgroundImageUrl(IUnknown*,BSTR*);")
1201 cpp_quote("HRESULT WINAPI MimeEditDocumentFromStream(IStream*,REFIID,void**);")
1203 cpp_quote("#ifdef __cplusplus")
1204 cpp_quote("}")
1205 cpp_quote("#endif")