mimeole.idl 56.3 KB
Newer Older
Rob Shearman's avatar
Rob Shearman committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*
 * Copyright 2007 Robert Shearman for CodeWeavers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

import "ocidl.idl";
import "objidl.idl";
import "propidl.idl";

#define DECLARE_HANDLE(name) typedef void *name

interface IMimeMessageCallback;
interface IMimeEnumAddressTypes;
interface IMimeMessageParts;
28 29 30 31 32
interface IMimeMessageTree;
interface IMimeBody;
interface IMimeEnumProperties;

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 36
cpp_quote("DEFINE_GUID(CLSID_IMimeSecurity,  0xfd853cde, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("DEFINE_GUID(CLSID_IVirtualStream, 0xfd853cdf, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
37 38
cpp_quote("DEFINE_GUID(CLSID_IMimeHtmlProtocol,0x5300401,0xbcbc, 0x11d0, 0x85, 0xe3, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("DEFINE_GUID(CLSID_MimeEdit,       0x1c82ead9, 0x508e, 0x11d1, 0x8d, 0xcf, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf9);")
39 40 41 42 43 44 45 46

cpp_quote("#define MIME_E_REG_CREATE_KEY         0x800cce01")
cpp_quote("#define MIME_E_REG_QUERY_INFO         0x800cce02")
cpp_quote("#define MIME_E_INVALID_ENCTYPE        0x800cce03")
cpp_quote("#define MIME_E_BOUNDARY_MISMATCH      0x800cce04")
cpp_quote("#define MIME_E_NOT_FOUND              0x800cce05")
cpp_quote("#define MIME_E_NO_DATA                0x800cce05")
cpp_quote("#define MIME_E_BUFFER_TOO_SMALL       0x800cce06")
47 48 49 50 51 52
cpp_quote("#define MIME_E_INVALID_ITEM_FLAGS     0x800cce07")
cpp_quote("#define MIME_E_ONE_LINE_ITEME         0x800cce08")
cpp_quote("#define MIME_E_INVALID_HANDLE         0x800cce09")
cpp_quote("#define MIME_E_CHARSET_TRANSLATE      0x800cce0a")
cpp_quote("#define MIME_E_NOT_INITIALIZED        0x800cce0b")

53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
cpp_quote("#define MIME_E_INVALID_OPTION_VALUE   0x800cce1f")
cpp_quote("#define MIME_E_INVALID_OPTION_ID      0x800cce20")
cpp_quote("#define MIME_E_INVALID_HEADER_NAME    0x800cce21")
cpp_quote("#define MIME_E_NOT_BOUND              0x800cce22")
cpp_quote("#define MIME_E_MAX_SIZE_TOO_SMALL     0x800cce23")
cpp_quote("#define MIME_E_MULTIPART_HAS_CHILDREN 0x800cce25")
cpp_quote("#define MIME_E_INVALID_PROP_FLAGS     0x800cce26")
cpp_quote("#define MIME_E_INVALID_ADDRESS_TYPE   0x800cce27")
cpp_quote("#define MIME_E_INVALID_OBJECT_IID     0x800cce28")
cpp_quote("#define MIME_E_MLANG_DLL_NOT_FOUND    0x800cce29")
cpp_quote("#define MIME_E_ROOT_NOT_EMPTY         0x800cce2a")
cpp_quote("#define MIME_E_MLANG_BAD_DLL          0x800cce2b")
cpp_quote("#define MIME_E_REG_OPEN_KEY           0x800cce2c")
cpp_quote("#define MIME_E_INVALID_INET_DATE      0x800cce2d")
cpp_quote("#define MIME_E_INVALID_BODYTYPE       0x800cce2e")
cpp_quote("#define MIME_E_INVALID_DELETE_TYPE    0x800cce2f")
cpp_quote("#define MIME_E_OPTION_HAS_NO_VALUE    0x800cce30")
70
cpp_quote("#define MIME_E_INVALID_CHARSET_TYPE   0x800cce31")
71

72 73
cpp_quote("#define MIME_E_INVALID_TEXT_TYPE      0x800cce38")

74 75 76
cpp_quote("#define MIME_E_SECURITY_NOOP          0x800cceb1")
cpp_quote("#define MIME_S_SECURITY_NOOP          0x000cceb1")

77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
cpp_quote("typedef enum tagMIMEPROPID {")
cpp_quote("    PID_HDR_NEWSGROUP  = 2,")
cpp_quote("    PID_HDR_NEWSGROUPS = 3,")
cpp_quote("    PID_HDR_REFS       = 4,")
cpp_quote("    PID_HDR_SUBJECT    = 5,")
cpp_quote("    PID_HDR_FROM       = 6,")
cpp_quote("    PID_HDR_MESSAGEID  = 7,")
cpp_quote("    PID_HDR_RETURNPATH = 8,")
cpp_quote("    PID_HDR_RR         = 9,")
cpp_quote("    PID_HDR_RETRCPTO   = 10,")
cpp_quote("    PID_HDR_APPARTO    = 11,")
cpp_quote("    PID_HDR_DATE       = 12,")
cpp_quote("    PID_HDR_RECEIVED   = 13,")
cpp_quote("    PID_HDR_REPLYTO    = 14,")
cpp_quote("    PID_HDR_XMAILER    = 15,")
cpp_quote("    PID_HDR_BCC        = 16,")
cpp_quote("    PID_HDR_MIMEVER    = 17,")
cpp_quote("    PID_HDR_CNTTYPE    = 18,")
cpp_quote("    PID_HDR_CNTXFER    = 19,")
cpp_quote("    PID_HDR_CNTID      = 20,")
cpp_quote("    PID_HDR_CNTDESC    = 21,")
cpp_quote("    PID_HDR_CNTDISP    = 22,")
cpp_quote("    PID_HDR_CNTBASE    = 23,")
cpp_quote("    PID_HDR_CNTLOC     = 24,")
cpp_quote("    PID_HDR_TO         = 25,")
cpp_quote("    PID_HDR_PATH       = 26,")
cpp_quote("    PID_HDR_FOLLOWUPTO = 27,")
cpp_quote("    PID_HDR_EXPIRES    = 28,")
cpp_quote("    PID_HDR_CC         = 29,")
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
cpp_quote("    PID_HDR_CONTROL    = 30,")
cpp_quote("    PID_HDR_DISTRIB    = 31,")
cpp_quote("    PID_HDR_KEYWORDS   = 32,")
cpp_quote("    PID_HDR_SUMMARY    = 33,")
cpp_quote("    PID_HDR_APPROVED   = 34,")
cpp_quote("    PID_HDR_LINES      = 35,")
cpp_quote("    PID_HDR_XREF       = 36,")
cpp_quote("    PID_HDR_ORG        = 37,")
cpp_quote("    PID_HDR_XNEWSRDR   = 38,")
cpp_quote("    PID_HDR_XPRI       = 39,")
cpp_quote("    PID_HDR_XMSPRI     = 40,")
cpp_quote("    PID_PAR_FILENAME   = 41,")
cpp_quote("    PID_PAR_BOUNDARY   = 42,")
cpp_quote("    PID_PAR_CHARSET    = 43,")
cpp_quote("    PID_PAR_NAME       = 44,")
cpp_quote("    PID_ATT_FILENAME   = 45,")
cpp_quote("    PID_ATT_GENFNAME   = 46,")
cpp_quote("    PID_ATT_PRITYPE    = 47,")
cpp_quote("    PID_ATT_SUBTYPE    = 48,")
cpp_quote("    PID_ATT_NORMSUBJ   = 49,")
cpp_quote("    PID_ATT_ILLEGAL    = 50,")
cpp_quote("    PID_ATT_RENDERED   = 51,")
cpp_quote("    PID_ATT_SENTTIME   = 52,")
cpp_quote("    PID_ATT_RECVTIME   = 53,")
cpp_quote("    PID_ATT_PRIORITY   = 54,")
cpp_quote("    PID_HDR_COMMENT    = 55,")
cpp_quote("    PID_HDR_ENCODING   = 56,")
cpp_quote("    PID_HDR_ENCRYPTED  = 57,")
cpp_quote("    PID_HDR_OFFSETS    = 58,")
cpp_quote("    PID_HDR_XUNSENT    = 59,")
cpp_quote("    PID_HDR_ARTICLEID  = 60,")
137
cpp_quote("    PID_HDR_SENDER     = 61,")
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
cpp_quote("    PID_ATT_SERVER     = 62,")
cpp_quote("    PID_ATT_ACCOUNT    = 63,")
cpp_quote("    PID_ATT_UIDL       = 64,")
cpp_quote("    PID_ATT_STOREMSGID = 65,")
cpp_quote("    PID_ATT_USERNAME   = 66,")
cpp_quote("    PID_ATT_FORWARDTO  = 67,")
cpp_quote("    PID_ATT_STOREFOLDERID = 68,")
cpp_quote("    PID_ATT_GHOSTED       = 69,")
cpp_quote("    PID_ATT_UNCACHEDSIZE  = 70,")
cpp_quote("    PID_ATT_COMBINED      = 71,")
cpp_quote("    PID_ATT_AUTOINLINED   = 72,")
cpp_quote("    PID_HDR_DISP_NOTIFICATION_TO = 73,")
cpp_quote("    PID_PAR_REPLYTYPE     = 74,")
cpp_quote("    PID_PAR_FORMAT        = 75,")
cpp_quote("    PID_ATT_FORMAT        = 76,")
cpp_quote("    PID_HDR_INREPLYTO     = 77,")
cpp_quote("    PID_ATT_ACCOUNTNAME   = 78,")
cpp_quote("    PID_LAST              = 79,")
156 157
cpp_quote("} MIMEPROPID;")

158 159 160 161
cpp_quote("#define ISPIDSTR(_name)               (((DWORD_PTR)(_name) >> 16) == 0)")
cpp_quote("#define STRTOPID(_name)               ((DWORD)((DWORD_PTR)((LPCSTR)(_name))))")
cpp_quote("#define PIDTOSTR(_id)                 ((LPCSTR)((DWORD_PTR)(_id)))")

162
cpp_quote("#define TYPEDID_ID(_typedid)          (((ULONG)(_typedid))>>16)")
163 164 165
cpp_quote("#define TYPEDID_MASK                  ((ULONG)0xffff)")
cpp_quote("#define TYPEDID_TYPE(t)               ((VARTYPE)((t) & TYPEDID_MASK))")

166 167 168 169 170 171 172 173
cpp_quote("#define OID_ALLOW_8BIT_HEADER         (0x00010000 | VT_BOOL)")
cpp_quote("#define OID_CBMAX_HEADER_LINE         (0x00020000 | VT_UI4)")
cpp_quote("#define OID_SAVE_FORMAT               (0x00030000 | VT_UI4)")
cpp_quote("#define OID_WRAP_BODY_TEXT            (0x00040000 | VT_BOOL)")
cpp_quote("#define OID_CBMAX_BODY_LINE           (0x00050000 | VT_UI4)")
cpp_quote("#define OID_TRANSMIT_BODY_ENCODING    (0x00060000 | VT_UI4)")
cpp_quote("#define OID_TRANSMIT_TEXT_ENCODING    (0x00070000 | VT_UI4)")
cpp_quote("#define OID_GENERATE_MESSAGE_ID       (0x00080000 | VT_BOOL)")
174
cpp_quote("#define OID_HIDE_TNEF_ATTACHMENTS     (0x000e0000 | VT_BOOL)")
175 176 177 178 179
cpp_quote("#define OID_CLEANUP_TREE_ON_SAVE      (0x000f0000 | VT_BOOL)")
cpp_quote("#define OID_BODY_REMOVE_NBSP          (0x00140000 | VT_BOOL)")
cpp_quote("#define OID_DEFAULT_BODY_CHARSET      (0x00150000 | VT_UI4)")
cpp_quote("#define OID_DEFAULT_HEADER_CHARSET    (0x00160000 | VT_UI4)")
cpp_quote("#define OID_DBCS_ESCAPE_IS_8BIT       (0x00170000 | VT_BOOL)")
180 181
cpp_quote("#define OID_SECURITY_TYPE             (0x00180000 | VT_UI4)")
cpp_quote("#define OID_SECURITY_HWND_OWNER       (0x00320000 | VT_UI4)")
182
cpp_quote("#define OID_HEADER_RELOAD_TYPE        (0x00370000 | VT_UI4)")
183
cpp_quote("#define OID_CAN_INLINE_TEXT_BODIES    (0x00380000 | VT_BOOL)")
184
cpp_quote("#define OID_SHOW_MACBINARY            (0x00390000 | VT_BOOL)")
185
cpp_quote("#define OID_SAVEBODY_KEEPBOUNDARY     (0x00400000 | VT_BOOL)")
Rob Shearman's avatar
Rob Shearman committed
186

187 188 189
cpp_quote("#define OID_SECURITY_2KEY_CERT_BAG    (0x00590000 | VT_VECTOR | VT_UI4)")
cpp_quote("#define OID_SECURITY_2KEY_CERT_BAG_64 (0x00590000 | VT_VECTOR | VT_UI8)")

Rob Shearman's avatar
Rob Shearman committed
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
[
    uuid(e4b28371-83b0-11d0-8259-00c04fd85ab4),
    version(1.0)
]
library MIMEOLE
{
    importlib("stdole2.tlb");

    DECLARE_HANDLE(HCHARSET);
    DECLARE_HANDLE(HBODY);
    DECLARE_HANDLE(HHEADERROW);

    typedef HCHARSET *LPHCHARSET;
    typedef HBODY *LPHBODY;
    typedef HHEADERROW *LPHHEADERROW;
    typedef DWORD TYPEDID;
    typedef const PROPVARIANT *LPCPROPVARIANT;
    typedef const BLOB *LPCBLOB;

    typedef enum tagRELOADTYPE
    {
        RELOAD_HEADER_NONE,
        RELOAD_HEADER_RESET,
        RELOAD_HEADER_APPEND,
        RELOAD_HEADER_REPLACE,
    } RELOADTYPE;

    typedef enum tagMIMESAVETYPE
    {
        SAVE_RFC822,
        SAVE_RFC1521,
    } MIMESAVETYPE;

    typedef enum tagCSETAPPLYTYPE
    {
        CSET_APPLY_UNTAGGED,
        CSET_APPLY_ALL,
        CSET_APPLY_TAG_ALL,
    } CSETAPPLYTYPE;

    typedef enum tagENCODINGTYPE
    {
        IET_BINARY,
        IET_BASE64,
        IET_UUENCODE,
        IET_QP,
        IET_7BIT,
        IET_8BIT,
        IET_INETCSET,
        IET_UNICODE,
        IET_RFC1522,
        IET_ENCODED,
        IET_CURRENT,
        IET_UNKNOWN,
        IET_BINHEX40,
        IET_LAST
    } ENCODINGTYPE;

    const SHORT IET_DECODED = IET_BINARY;

    const SHORT CCHMAX_HEADER_LINE = 1000;

    [
        uuid(c5588349-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeInternational : IUnknown
    {
        typedef [unique] IMimeInternational *LPMIMEINTERNATIONAL;
        typedef DWORD CODEPAGEID;

        const CODEPAGEID CP_USASCII = 1252;
        const CODEPAGEID CP_UNICODE = 1200;
        const CODEPAGEID CP_JAUTODETECT = 50932;
        const CODEPAGEID CP_KAUTODETECT = 50949;
        const CODEPAGEID CP_ISO2022JPESC = 50221;
        const CODEPAGEID CP_ISO2022JPSIO = 50222;

        const SHORT CCHMAX_CSET_NAME = 128;
        const SHORT CCHMAX_LANG_NAME = 128;
        const SHORT CCHMAX_FACE_NAME = 128;

        typedef struct tagINETCSETINFO
        {
            CHAR        szName[CCHMAX_CSET_NAME];
            HCHARSET    hCharset;
            CODEPAGEID  cpiWindows;
            CODEPAGEID  cpiInternet;
            DWORD       dwReserved1;
        } INETCSETINFO, *LPINETCSETINFO;

        typedef enum tagINETLANGMASK
        {
            ILM_FAMILY          = 0x01,
            ILM_NAME            = 0x02,
            ILM_BODYCSET        = 0x04,
            ILM_HEADERCSET      = 0x08,
            ILM_WEBCSET         = 0x10,
            ILM_FIXEDFONT       = 0x20,
            ILM_VARIABLEFONT    = 0x40,
        } INETLANGMASK;

        typedef struct tagCODEPAGEINFO
        {
            DWORD dwMask;
            CODEPAGEID cpiCodePage;
            BOOL fIsValidCodePage;
            ULONG ulMaxCharSize;
            BOOL fInternetCP;
            CODEPAGEID cpiFamily;
            CHAR szName[CCHMAX_LANG_NAME];
            CHAR szBodyCset[CCHMAX_CSET_NAME];
            CHAR szHeaderCset[CCHMAX_CSET_NAME];
            CHAR szWebCset[CCHMAX_CSET_NAME];
            CHAR szFixedFont[CCHMAX_FACE_NAME];
            CHAR szVariableFont[CCHMAX_FACE_NAME];
            ENCODINGTYPE ietNewsDefault;
            ENCODINGTYPE ietMailDefault;
            DWORD dwReserved1;
        } CODEPAGEINFO, *LPCODEPAGEINFO;

        typedef struct tagRFC1522INFO
        {
            BOOL fRfc1522Allowed;
            BOOL fRfc1522Used;
            BOOL fAllow8bit;
            HCHARSET hRfc1522Cset;
        } RFC1522INFO, *LPRFC1522INFO;

        typedef enum tagCHARSETTYPE
        {
            CHARSET_BODY,
            CHARSET_HEADER,
            CHARSET_WEB,
        } CHARSETTYPE;


        HRESULT SetDefaultCharset(
            [in]        HCHARSET hCharset);
        HRESULT GetDefaultCharset(
            [out]       LPHCHARSET phCharset);
        HRESULT GetCodePageCharset(
            [in]        CODEPAGEID cpiCodePage,
            [in]        CHARSETTYPE ctCsetType,
            [out]       LPHCHARSET phCharset);
        HRESULT FindCharset(
            [in]        LPCSTR pszCharset,
            [out]       LPHCHARSET phCharset);
        HRESULT GetCharsetInfo(
            [in]        HCHARSET hCharset,
            [in, out]   LPINETCSETINFO pCsetInfo);
        HRESULT GetCodePageInfo(
            [in]        CODEPAGEID cpiCodePage,
            [in, out]   LPCODEPAGEINFO pCodePageInfo);
344 345 346
        HRESULT CanConvertCodePages(
            [in]        CODEPAGEID cpiSource,
            [in]        CODEPAGEID cpiDest);
Rob Shearman's avatar
Rob Shearman committed
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
        HRESULT DecodeHeader(
            [in]        HCHARSET hCharset,
            [in]        LPCSTR pszData,
            [in, out]   LPPROPVARIANT pDecoded,
            [in, out]   LPRFC1522INFO pRfc1522Info);
        HRESULT EncodeHeader(
            [in]        HCHARSET hCharset,
            [in]        LPPROPVARIANT pData,
            [out]       LPSTR *ppszEncoded,
            [in, out]   LPRFC1522INFO pRfc1522Info);
        HRESULT ConvertBuffer(
            [in]        CODEPAGEID cpiSource,
            [in]        CODEPAGEID cpiDest,
            [in]        LPBLOB pIn,
            [in, out]   LPBLOB pOut,
            [out]       ULONG *pcbRead);
        HRESULT ConvertString(
            [in]        CODEPAGEID cpiSource,
            [in]        CODEPAGEID cpiDest,
            [in]        LPPROPVARIANT pIn,
            [in, out]   LPPROPVARIANT pOut);
368
        HRESULT MLANG_ConvertInetReset(void);
Rob Shearman's avatar
Rob Shearman committed
369 370 371 372 373
        HRESULT MLANG_ConvertInetString(
            [in]        CODEPAGEID cpiSource,
            [in]        CODEPAGEID cpiDest,
            [in]        LPCSTR pSource,
            [in]        int *pnSizeOfSource,
374
            [in,out,unique]  LPSTR pDestination,
Rob Shearman's avatar
Rob Shearman committed
375 376 377
            [in]        int *pnDstSize);
        HRESULT Rfc1522Decode(
            [in]        LPCSTR pszValue,
378
            [in,ref]    LPSTR pszCharset,
Rob Shearman's avatar
Rob Shearman committed
379 380 381 382
            [in]        ULONG cchmax,
            [out]       LPSTR *ppszDecoded);
        HRESULT Rfc1522Encode(
            [in]        LPCSTR pszValue,
383
            [in]        HCHARSET hCharset,
Rob Shearman's avatar
Rob Shearman committed
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
            [out]       LPSTR *ppszEncoded);
    }

    [
        uuid(c5588353-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeSecurity : IUnknown
    {
        typedef [unique] IMimeSecurity *LPMIMESECURITY;

        cpp_quote("#ifdef __WINE_WINCRYPT_H")
        cpp_quote("typedef PCCERT_CONTEXT PCX509CERT;")
        cpp_quote("#else")
        typedef const void *PCX509CERT;
        typedef void *HCERTSTORE;
        cpp_quote("#endif")

        typedef BLOB THUMBBLOB;
        typedef void *HCAPICERTSTORE;

405 406 407 408 409 410 411 412 413 414 415 416 417
        cpp_quote("#define MST_NONE             0x00000000")
        cpp_quote("#define MST_THIS_SIGN        0x00000001")
        cpp_quote("#define MST_THIS_ENCRYPT     0x00000002")
        cpp_quote("#define MST_BLOB_FLAG        0x00000004")
        cpp_quote("#define MST_THIS_BLOBSIGN    (MST_BLOB_FLAG | MST_THIS_SIGN)")
        cpp_quote("#define MST_CHILD_SIGN       0x00000100")
        cpp_quote("#define MST_CHILD_ENCRYPT    0x00000200")
        cpp_quote("#define MST_SUBMSG_SIGN      0x00001000")
        cpp_quote("#define MST_SUBMSG_ENCRYPT   0x00002000")
        cpp_quote("#define MST_RECEIPT_REQUEST  0x00010000")
        cpp_quote("#define MST_CLASS_SMIME_V1   0x00000000")
        cpp_quote("#define MST_CLASS_PGP        0x01000000")

Rob Shearman's avatar
Rob Shearman committed
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
        typedef enum tagCERTSTATE
        {
            CERTIFICATE_OK,
            CERTIFICATE_NOT_PRESENT,
            CERTIFICATE_EXPIRED,
            CERTIFICATE_CHAIN_TOO_LONG,
            CERTIFICATE_MISSING_ISSUER,
            CERTIFICATE_CRL_LISTED,
            CERTIFICATE_NOT_TRUSTED,
            CERTIFICATE_INVALID,
            CERTIFICATE_ERROR,
            CERTIFICATE_NOPRINT,
            CERTIFICATE_UNKNOWN
        } CERTSTATE;

        typedef enum tagCERTNAMETYPE
        {
            SIMPLE,
            OID,
            X500,
        } CERTNAMETYPE;

440 441 442 443 444 445
        typedef enum tagCERTDATAID
        {
            CDID_EMAIL,
            CDID_MAX
        } CERTDATAID;

Rob Shearman's avatar
Rob Shearman committed
446 447 448 449 450 451 452 453
        typedef struct tagX509CERTRESULT
        {
            DWORD       cEntries;
            CERTSTATE  *rgcs;
            PCX509CERT *rgpCert;
        } X509CERTRESULT, *PX509CERTRESULT;
        typedef const X509CERTRESULT *PCX509CERTRESULT;

454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
        HRESULT InitNew(void);

        HRESULT CheckInit(void);

        HRESULT EncodeMessage(
            [in]    IMimeMessageTree */*const*/ pTree,
            [in]    DWORD dwFlags);

        HRESULT EncodeBody(
            [in]    IMimeMessageTree */*const*/ pTree,
            [in]    HBODY hEncodeRoot,
            [in]    DWORD dwFlags);

        HRESULT DecodeMessage(
            [in]    IMimeMessageTree */*const*/ pTree,
            [in]    DWORD dwFlags);

        HRESULT DecodeBody(
            [in]    IMimeMessageTree */*const*/ pTree,
            [in]    HBODY hDecodeRoot,
            [in]    DWORD dwFlags);

        HRESULT EnumCertificates(
            [in]    HCAPICERTSTORE hc,
            [in]    DWORD dwUsage,
            [in]    PCX509CERT pPrev,
            [out]   PCX509CERT *ppCert);

        HRESULT GetCertificateName(
            [in]    const PCX509CERT pX509Cert,
            [in]    const CERTNAMETYPE cn,
            [out]   LPSTR *ppszName);

        HRESULT GetMessageType(
            [in]    const HWND hwndParent,
            [in]    IMimeBody */*const*/ pBody,
            [out]   DWORD */*const*/ pdwSecType);

        HRESULT GetCertData(
            [in]        const PCX509CERT pX509Cert,
            [in]        const CERTDATAID dataid,
            [out, ref]  LPPROPVARIANT pValue);
Rob Shearman's avatar
Rob Shearman committed
496 497
    }

498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
    [
        uuid(c558834d-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeEnumHeaderRows : IUnknown
    {
        typedef struct tagENUMHEADERROW
        {
            HHEADERROW   hRow;
            LPSTR        pszHeader;
            LPSTR        pszData;
            ULONG        cchData;
            DWORD_PTR    dwReserved;
        } ENUMHEADERROW, *LPENUMHEADERROW;

        HRESULT Next(
            [in]     ULONG           fetch,
            [in,out] LPENUMHEADERROW row,
            [out]    ULONG           *fetched);

        HRESULT Skip(
            [in] ULONG items);

        HRESULT Reset(void);

        HRESULT Clone(
            [out] IMimeEnumHeaderRows **rows);

        HRESULT Count(
            [out] ULONG *pcItems);
    }

Rob Shearman's avatar
Rob Shearman committed
530 531 532 533 534 535
    [
        uuid(fd853cd1-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeHeaderTable : IPersistStream
    {
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608
        typedef struct tagFINDHEADER
        {
            LPCSTR pszHeader;
            DWORD  dwReserved;
        } FINDHEADER, *LPFINDHEADER;

        typedef struct tagHEADERROWINFO
        {
            DWORD dwRowNumber;
            ULONG cboffStart;
            ULONG cboffColon;
            ULONG cboffEnd;
        } HEADERROWINFO, *LPHEADERROWINFO;

        typedef enum tagHEADERTABLEFLAGS
        {
            HTF_NAMEINDATA      = 0x00000001,
            HTF_ENUMHANDLESONLY = 0x00000002
        } HEADERTABLEFLAGS;

        HRESULT FindFirstRow(
            [in]  LPFINDHEADER header,
            [out] LPHHEADERROW row);

        HRESULT FindNextRow(
            [in]  LPFINDHEADER header,
            [out] LPHHEADERROW row);

        HRESULT CountRows(
            [in]  const char *header,
            [out] ULONG *rows);

        HRESULT AppendRow(
            [in]  const char   *header,
            [in]  DWORD        flags,
            [in]  const char   *data,
            [in]  ULONG        count,
            [out] LPHHEADERROW row);

        HRESULT DeleteRow(
            [in] HHEADERROW row);

        HRESULT GetRowData(
            [in]  HHEADERROW row,
            [in]  DWORD      flags,
            [out] char       **data,
            [out] ULONG      *len);

        HRESULT SetRowData(
            [in] HHEADERROW row,
            [in] DWORD      flags,
            [in] const char *data,
            [in] ULONG      len);

        HRESULT GetRowInfo(
            [in]     HHEADERROW      row,
            [in,out] LPHEADERROWINFO info);

        HRESULT SetRowNumber(
            [in] HHEADERROW row,
            [in] DWORD      number);

        HRESULT EnumRows(
            [in]  const char          *header,
            [in]  DWORD               flags,
            [out] IMimeEnumHeaderRows **rows);

        HRESULT Clone(
            [out] IMimeHeaderTable **table);

        HRESULT BindToObject(
            [in] REFIID              riid,
            [out, iid_is(riid)] void *object);
Rob Shearman's avatar
Rob Shearman committed
609 610 611 612 613 614 615 616
    }

    [
        uuid(fd853cec-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimePropertySchema : IUnknown
    {
617 618
        typedef [unique] IMimePropertySchema *LPMIMEPROPERTYSCHEMA;

619 620 621 622 623 624 625 626 627 628
        typedef enum tagMIMEPROPFLAGS
        {
            MPF_INETCSET            = 0x01,
            MPF_RFC1522             = 0x02,
            MPF_ADDRESS             = 0x04,
            MPF_HASPARAMS           = 0x08,
            MPF_MIME                = 0x10,
            MPF_READONLY            = 0x20
        } MIMEPROPFLAGS;

629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652
        HRESULT RegisterProperty(
                [in]  const char *name,
                [in]  DWORD      flags,
                [in]  DWORD      rownumber,
                [in]  VARTYPE    vtdefault,
                [out] DWORD      *propid);

        HRESULT ModifyProperty(
                [in] const char  *name,
                [in] DWORD       flags,
                [in] DWORD       rownumber,
                [in] VARTYPE     vtdefault);

        HRESULT GetPropertyId(
                [in]  const char *name,
                [out] DWORD      *propid);

        HRESULT GetPropertyName(
                [in]  DWORD      propid,
                [out] char       **name);

        HRESULT RegisterAddressType(
                [in]  const char *name,
                [out] DWORD      *adrtype);
Rob Shearman's avatar
Rob Shearman committed
653 654 655 656 657 658 659 660
    }

    [
        uuid(fd853cd3-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimePropertySet : IPersistStreamInit
    {
661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789
        typedef [unique] IMimePropertySet *LPMIMEPROPERTYSET;

        cpp_quote("#define PDF_ENCODED              0x00000001")
        cpp_quote("#define PDF_NAMEINDATA           0x00000002")
        cpp_quote("#define PDF_HEADERFORMAT        (0x00000004 | PDF_ENCODED)")
        cpp_quote("#define PDF_NOCOMMENTS           0x00000008")
        cpp_quote("#define PDF_SAVENOENCODE         0x00000010")
        cpp_quote("#define PDF_VECTOR               0x00000020")

        typedef struct tagMIMEPARAMINFO
        {
            LPSTR           pszName;
            LPSTR           pszData;
        } MIMEPARAMINFO, *LPMIMEPARAMINFO;

        typedef enum tagPROPINFOMASK
        {
            PIM_CHARSET           = 0x01,
            PIM_ENCODINGTYPE      = 0x02,
            PIM_ROWNUMBER         = 0x04,
            PIM_FLAGS             = 0x08,
            PIM_PROPID            = 0x10,
            PIM_VALUES            = 0x20,
            PIM_VTDEFAULT         = 0x40,
            PIM_VTCURRENT         = 0x80
        } PROPINFOMASK;

        typedef struct tagMIMEPROPINFO
        {
            DWORD           dwMask;
            HCHARSET        hCharset;
            ENCODINGTYPE    ietEncoding;
            DWORD           dwRowNumber;
            DWORD           dwFlags;
            DWORD           dwPropId;
            DWORD           cValues;
            VARTYPE         vtDefault;
            VARTYPE         vtCurrent;
        } MIMEPROPINFO, *LPMIMEPROPINFO;
        typedef const MIMEPROPINFO *LPCMIMEPROPINFO;

        HRESULT GetPropInfo(
            [in]        LPCSTR               pszName,
            [in,out]    LPMIMEPROPINFO       pInfo);

        HRESULT SetPropInfo(
            [in]        LPCSTR               pszName,
            [in]        LPCMIMEPROPINFO      pInfo);

cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef GetProp")
cpp_quote("#undef SetProp")
cpp_quote("#undef EnumProps")
cpp_quote("#endif")
        HRESULT GetProp(
            [in]        LPCSTR               pszName,
            [in]        DWORD                dwFlags,
            [in,out]    LPPROPVARIANT        pValue);

        HRESULT SetProp(
            [in]        LPCSTR               pszName,
            [in]        DWORD                dwFlags,
            [in]        LPCPROPVARIANT       pValue);

        HRESULT AppendProp(
            [in]        LPCSTR               pszName,
            [in]        DWORD                dwFlags,
            [in]        LPPROPVARIANT        pValue);

        HRESULT DeleteProp(
            [in]        LPCSTR               pszName);

        HRESULT CopyProps(
            [in]        ULONG                cNames,
            [in,unique] LPCSTR               *prgszName,
            [in]        IMimePropertySet     *pPropertySet);

        HRESULT MoveProps(
            [in]        ULONG                cNames,
            [in]        LPCSTR               *prgszName,
            [in]        IMimePropertySet     *pPropertySet);

        HRESULT DeleteExcept(
            [in]        ULONG                cNames,
            [in]        LPCSTR               *prgszName);

        HRESULT QueryProp(
            [in]        LPCSTR               pszName,
            [in]        LPCSTR               pszCriteria,
            [in]        boolean              fSubString,
            [in]        boolean              fCaseSensitive);

        HRESULT GetCharset(
            [out]       LPHCHARSET           phCharset);

        HRESULT SetCharset(
            [in]        HCHARSET             hCharset,
            [in]        CSETAPPLYTYPE        applytype);

        HRESULT GetParameters(
            [in]        LPCSTR               pszName,
            [out]       ULONG                *pcParams,
            [out]       LPMIMEPARAMINFO      *pprgParam);

        HRESULT IsContentType(
            [in]        LPCSTR               pszPriType,
            [in,unique] LPCSTR               pszSubType);

        HRESULT BindToObject(
            [in]        REFIID               riid,
            [out,iid_is(riid)] void          **ppvObject);

        HRESULT Clone(
            [out]       IMimePropertySet     **ppPropertySet);

        HRESULT SetOption(
            [in]        const TYPEDID        oid,
            [in]        LPCPROPVARIANT       pValue);

        HRESULT GetOption(
            [in]        const TYPEDID        oid,
            [in,out]    LPPROPVARIANT        pValue);

        cpp_quote("#define EPF_NONAME 0x00000001")

        HRESULT EnumProps(
            [in]        DWORD                dwFlags,
            [out]       IMimeEnumProperties  **ppEnum);

Rob Shearman's avatar
Rob Shearman committed
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813
    }

    [
        uuid(c558834a-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeAddressTable : IUnknown
    {
        typedef [unique] IMimeAddressTable *LPMIMEADDRESSTABLE;

        DECLARE_HANDLE(HADDRESS);
        typedef HADDRESS *LPHADDRESS;
        typedef DWORD IADDRESSTYPE;

        typedef enum tagADDRESSFORMAT
        {
            AFT_DISPLAY_FRIENDLY,
            AFT_DISPLAY_EMAIL,
            AFT_DISPLAY_BOTH,
            AFT_RFC822_DECODED,
            AFT_RFC822_ENCODED,
            AFT_RFC822_TRANSMIT,
        } ADDRESSFORMAT;

814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829
        cpp_quote("#define IAT_UNKNOWN              0x00000000")
        cpp_quote("#define IAT_FROM                 0x00000001")
        cpp_quote("#define IAT_SENDER               0x00000002")
        cpp_quote("#define IAT_TO                   0x00000004")
        cpp_quote("#define IAT_CC                   0x00000008")
        cpp_quote("#define IAT_BCC                  0x00000010")
        cpp_quote("#define IAT_REPLYTO              0x00000020")
        cpp_quote("#define IAT_RETURNPATH           0x00000040")
        cpp_quote("#define IAT_RETRCPTTO            0x00000080")
        cpp_quote("#define IAT_RR                   0x00000100")
        cpp_quote("#define IAT_APPARTO              0x00000200")
        cpp_quote("#define IAT_DISP_NOTIFICATION_TO 0x00000400")
        cpp_quote("#define IAT_ALL                  0xffffffff")
        cpp_quote("#define IAT_KNOWN                (IAT_FROM | IAT_TO | IAT_CC | IAT_BCC | IAT_REPLYTO | IAT_SENDER)")
        cpp_quote("#define IAT_RECIPS               (IAT_TO | IAT_CC | IAT_BCC)")

Rob Shearman's avatar
Rob Shearman committed
830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845
        typedef struct tagADDRESSPROPS
        {
            DWORD           dwProps;
            HADDRESS        hAddress;
            ENCODINGTYPE    ietFriendly;
            HCHARSET        hCharset;
            DWORD           dwAdrType;
            LPSTR           pszFriendly;
            LPWSTR          pwszReserved;
            LPSTR           pszEmail;
            CERTSTATE       certstate;
            THUMBBLOB       tbSigning;
            THUMBBLOB       tbEncryption;
            DWORD           dwCookie;
            DWORD           dwReserved1;
            DWORD           dwReserved2;
846
        } ADDRESSPROPS, *LPADDRESSPROPS;
Rob Shearman's avatar
Rob Shearman committed
847

848 849 850 851 852 853 854 855 856 857 858 859 860
        cpp_quote("#define IAP_CHARSET              0x00000001")
        cpp_quote("#define IAP_HANDLE               0x00000002")
        cpp_quote("#define IAP_ADRTYPE              0x00000004")
        cpp_quote("#define IAP_FRIENDLY             0x00000008")
        cpp_quote("#define IAP_EMAIL                0x00000020")
        cpp_quote("#define IAP_CERTSTATE            0x00000100")
        cpp_quote("#define IAP_SIGNING_PRINT        0x00000200")
        cpp_quote("#define IAP_ENCRYPTION_PRINT     0x00000400")
        cpp_quote("#define IAP_ENCODING             0x00000800")
        cpp_quote("#define IAP_COOKIE               0x00001000")
        cpp_quote("#define IAP_FRIENDLYW            0x00002000")
        cpp_quote("#define IAP_ALL                  0xffffffff")

Rob Shearman's avatar
Rob Shearman committed
861 862 863 864 865 866
        typedef struct tagADDRESSLIST
        {
            ULONG           cAdrs;
            LPADDRESSPROPS  prgAdr;
        } ADDRESSLIST, *LPADDRESSLIST;

867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930
        HRESULT Append(
                [in]        DWORD                   addrtype,
                [in]        ENCODINGTYPE            encoding,
                [in]        const char              *friendly,
                [in,unique] const char              *email,
                [in,out,unique] HADDRESS            *address);

        HRESULT Insert(
                [in]        ADDRESSPROPS            *addressprop,
                [in,out,unique] HADDRESS            *address);

        HRESULT SetProps(
                [in]        HADDRESS                address,
                [in]        ADDRESSPROPS            *addressprop);

        HRESULT GetProps(
                [in]        HADDRESS                address,
                [in]        ADDRESSPROPS            *addressprop);

        HRESULT GetSender(
                [in,out]    ADDRESSPROPS            *addressprop);

        HRESULT CountTypes(
                [in]        DWORD                   addrtype,
                [out]       ULONG                   *count);

        HRESULT GetTypes(
                [in]        DWORD                   addrtype,
                [in]        DWORD                   dwProps,
                [in,out]    ADDRESSLIST             *list);

        HRESULT EnumTypes(
                [in]        DWORD                   addrtype,
                [in]        DWORD                   props,
                [out]       IMimeEnumAddressTypes   **types);

        HRESULT Delete(
                [in]        HADDRESS                hAddress);

        HRESULT DeleteTypes(
                [in]        DWORD                   addrtype);

        HRESULT GetFormat(
                [in]        DWORD                   addrtype,
                [in]        ADDRESSFORMAT           addrformat,
                [out]       char                    **format);

        HRESULT AppendRfc822(
                [in]        DWORD                   addrtype,
                [in]        ENCODINGTYPE            encoding,
                [in]        const char              *rfcaddr);

        HRESULT ParseRfc822(
                [in]        DWORD                   addrtype,
                [in]        ENCODINGTYPE            encoding,
                [in]        const char              *rfcaddr,
                [in,out]    ADDRESSLIST             *list);

        HRESULT Clone(
                [out]       IMimeAddressTable       **table);

        HRESULT BindToObject(
                [in]        REFIID                  riid,
                [out, iid_is(riid)] void            **obj);
Rob Shearman's avatar
Rob Shearman committed
931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978
    }

    [
        uuid(ee519f11-851a-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeWebDocument : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(c558834c-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeBody : IMimePropertySet
    {
        typedef [unique] IMimeBody *LPMIMEBODY;

        typedef enum tagIMSGBODYTYPE
        {
            IBT_SECURE,
            IBT_ATTACHMENT,
            IBT_EMPTY,
            IBT_CSETTAGGED,
            IBT_AUTOATTACH,
        } IMSGBODYTYPE;

        typedef struct tagBODYOFFSETS
        {
            DWORD cbBoundaryStart;
            DWORD cbHeaderStart;
            DWORD cbBodyStart;
            DWORD cbBodyEnd;
        } BODYOFFSETS, *LPBODYOFFSETS;

        typedef struct tagTRANSMITINFO
        {
            ENCODINGTYPE ietCurrent;
            ENCODINGTYPE ietXmitMime;
            ENCODINGTYPE ietXmit822;
            ULONG cbLongestLine;
            ULONG cExtended;
            ULONG ulPercentExt;
            ULONG cbSize;
            ULONG cLines;
        } TRANSMITINFO, *LPTRANSMITINFO;

979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030
        HRESULT IsType(
            [in]        IMSGBODYTYPE     bodytype);

        HRESULT SetDisplayName(
            [in]        LPCSTR           pszDisplay);

        HRESULT GetDisplayName(
            [out]       LPSTR            *ppszDisplay);

        HRESULT GetOffsets(
            [out]       LPBODYOFFSETS     pOffsets);

        HRESULT GetCurrentEncoding(
            [out]       ENCODINGTYPE     *pietEncoding);

        HRESULT SetCurrentEncoding(
            [in]        ENCODINGTYPE     ietEncoding);

        HRESULT GetEstimatedSize(
            [in]        ENCODINGTYPE     ietEncoding,
            [out]       ULONG            *pcbSize);

        HRESULT GetDataHere(
            [in]        ENCODINGTYPE     ietEncoding,
            [in]        IStream          *pStream);

        HRESULT GetData(
            [in]        ENCODINGTYPE     ietEncoding,
            [out]       IStream          **ppStream);

        HRESULT SetData(
            [in]        ENCODINGTYPE     ietEncoding,
            [in,unique] LPCSTR           pszPriType,
            [in,unique] LPCSTR           pszSubType,
            [in]        REFIID           riid,
            [in,iid_is(riid)]  LPVOID    pvObject);

        HRESULT EmptyData(void);

        HRESULT CopyTo(
            [in]        IMimeBody        *pBody);

        HRESULT GetTransmitInfo(
            [in,out]    LPTRANSMITINFO   pTransmitInfo);

        HRESULT SaveToFile(
            [in]        ENCODINGTYPE     ietEncoding,
            [in]        LPCSTR           pszFilePath);

        HRESULT GetHandle(
           [out]        LPHBODY          phBody);

Rob Shearman's avatar
Rob Shearman committed
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102
    }

    [
        uuid(fd853cd4-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeMessageTree : IPersistStreamInit
    {
        typedef [unique] IMimeMessageTree *LPMIMEMESSAGETREE;

        const HBODY HBODY_ROOT = (HBODY)-1;

        typedef enum tagBODYLOCATION
        {
            IBL_ROOT,
            IBL_PARENT,
            IBL_FIRST,
            IBL_LAST,
            IBL_NEXT,
            IBL_PREVIOUS,
        } BODYLOCATION;

        typedef struct tagFINDBODY
        {
            LPSTR pszPriType;
            LPSTR pszSubType;
            DWORD dwReserved;
        } FINDBODY, *LPFINDBODY;

        HRESULT GetMessageSource(
            [out]       IStream **ppStream,
            [in]        DWORD dwFlags);

        HRESULT GetMessageSize(
            [out]       ULONG *pcbSize,
            [in]        DWORD dwFlags);

        HRESULT LoadOffsetTable(
            [in]        IStream *pStream);

        HRESULT SaveOffsetTable(
            [in]        IStream *pStream,
            [in]        DWORD dwFlags);

        HRESULT GetFlags(
            [out]       DWORD *pdwFlags);

        HRESULT Commit(
            [in]        DWORD dwFlags);

        HRESULT HandsOffStorage();

        HRESULT BindToObject(
            [in]        const HBODY hBody,
            [in]        REFIID riid,
            [out, iid_is(riid)] void **ppvObject);

        HRESULT SaveBody(
            [in]        HBODY hBody,
            [in]        DWORD dwFlags,
            [in]        IStream *pStream);

        HRESULT InsertBody(
            [in]        BODYLOCATION location,
            [in]        HBODY hPivot,
            [out]       LPHBODY phBody);

        HRESULT GetBody(
            [in]        BODYLOCATION location,
            [in]        HBODY hPivot,
            [out]       LPHBODY phBody);

1103 1104 1105 1106
        HRESULT DeleteBody(
            [in]        HBODY hBody,
            [in]        DWORD dwFlags);

Rob Shearman's avatar
Rob Shearman committed
1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167
        HRESULT MoveBody(
            [in]        HBODY hBody,
            [in]        BODYLOCATION location);

        HRESULT CountBodies(
            [in]        HBODY hParent,
            [in]        boolean fRecurse,
            [out]       ULONG *pcBodies);

        HRESULT FindFirst(
            [in, out]   LPFINDBODY pFindBody,
            [out]       LPHBODY phBody);

        HRESULT FindNext(
            [in, out]   LPFINDBODY pFindBody,
            [out]       LPHBODY phBody);

        HRESULT ResolveURL(
            [in]        HBODY hRelated,
            [in]        LPCSTR pszBase,
            [in]        LPCSTR pszURL,
            [in]        DWORD dwFlags,
            [out]       LPHBODY phBody);

        HRESULT ToMultipart(
            [in]        HBODY hBody,
            [in]        LPCSTR pszSubType,
            [out]       LPHBODY phMultipart);

        HRESULT GetBodyOffsets(
            [in]        HBODY hBody,
            [in, out]   LPBODYOFFSETS pOffsets);

        HRESULT GetCharset(
            [out]       LPHCHARSET phCharset);

        HRESULT SetCharset(
            [in]        HCHARSET hCharset,
            [in]        CSETAPPLYTYPE applytype);

        HRESULT IsBodyType(
            [in]        HBODY hBody,
            [in]        IMSGBODYTYPE bodytype);

        HRESULT IsContentType(
            [in]        HBODY hBody,
            [in]        LPCSTR pszPriType,
            [in]        LPCSTR pszSubType);

        HRESULT QueryBodyProp(
            [in]        HBODY hBody,
            [in]        LPCSTR pszName,
            [in]        LPCSTR pszCriteria,
            [in]        boolean fSubString,
            [in]        boolean fCaseSensitive);

        HRESULT GetBodyProp(
            [in]        HBODY hBody,
            [in]        LPCSTR pszName,
            [in]        DWORD dwFlags,
            [in, out]   LPPROPVARIANT pValue);
1168 1169 1170 1171 1172 1173

        HRESULT SetBodyProp(
            [in]        HBODY hBody,
            [in]        LPCSTR pszName,
            [in]        DWORD dwFlags,
            [in]        LPCPROPVARIANT pValue);
Rob Shearman's avatar
Rob Shearman committed
1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226

        HRESULT DeleteBodyProp(
            [in]        HBODY hBody,
            [in]        LPCSTR pszName);

        HRESULT SetOption(
            [in]        const TYPEDID oid,
            [in]        LPCPROPVARIANT pValue);

        HRESULT GetOption(
            [in]        const TYPEDID oid,
            [in, out]   LPPROPVARIANT pValue);
    }

    [
        uuid(fd853cd5-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeMessage : IMimeMessageTree
    {
        typedef [unique] IMimeMessage *LPMIMEMESSAGE;

        typedef DWORD TEXTTYPE;

        typedef enum tagIMSGFLAGS
        {
            IMF_ATTACHMENTS     = 0x00000001,
            IMF_MULTIPART       = 0x00000002,
            IMF_SUBMULTIPART    = 0x00000004,
            IMF_MIME            = 0x00000008,
            IMF_HTML            = 0x00000010,
            IMF_PLAIN           = 0x00000020,
            IMF_PARTIAL         = 0x00000040,
            IMF_SIGNED          = 0x00000080,
            IMF_ENCRYPTED       = 0x00000100,
            IMF_TNEF            = 0x00000200,
            IMF_MHTML           = 0x00000400,
            IMF_SECURE          = 0x00000800,
            IMF_TEXT            = 0x00001000,
            IMF_CSETTAGGED      = 0x00002000,
            IMF_NEWS            = 0x00004000,
            IMF_VOICEMAIL       = 0x00008000,
            IMF_HASVCARD        = 0x00010000,
            IMF_RFC1154         = 0x00020000,
        } IMSGFLAGS;

        typedef enum tagIMSGPRIORITY
        {
            IMSG_PRI_LOW    = 5,
            IMSG_PRI_NORMAL = 3,
            IMSG_PRI_HIGH   = 1,
        } IMSGPRIORITY;

1227 1228 1229 1230 1231 1232 1233
        cpp_quote("#define WPF_HTML             0x00000001")
        cpp_quote("#define WPF_AUTOINLINE       0x00000002")
        cpp_quote("#define WPF_SLIDESHOW        0x00000004")
        cpp_quote("#define WPF_ATTACHLINKS      0x00000008")
        cpp_quote("#define WPF_IMAGESONLY       0x00000010")
        cpp_quote("#define WPF_NOMETACHARSET    0x00000020")

Rob Shearman's avatar
Rob Shearman committed
1234 1235 1236 1237 1238 1239 1240 1241
        typedef struct tagWEPAGEOPTIONS
        {
            DWORD cbSize;
            DWORD dwFlags;
            DWORD dwDelay;
            WCHAR wchQuote;
        } WEBPAGEOPTIONS, *LPWEBPAGEOPTIONS;

1242 1243 1244
        cpp_quote("#define TXT_PLAIN       1")
        cpp_quote("#define TXT_HTML        2")

Rob Shearman's avatar
Rob Shearman committed
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339
        HRESULT CreateWebPage(
            [in]        IStream *pRootStm,
            [in]        LPWEBPAGEOPTIONS pOptions,
            [in]        IMimeMessageCallback *pCallback,
            [out]       IMoniker **ppMoniker);

        HRESULT GetProp(
            [in]        LPCSTR pszName,
            [in]        DWORD dwFlags,
            [in,out]    LPPROPVARIANT pValue);

        HRESULT SetProp(
            [in]        LPCSTR pszName,
            [in]        DWORD dwFlags,
            [in]        LPCPROPVARIANT pValue);

        HRESULT DeleteProp(
            [in]        LPCSTR pszName);

        HRESULT QueryProp(
            [in]        LPCSTR pszName,
            [in]        LPCSTR pszCriteria,
            [in]        boolean fSubString,
            [in]        boolean fCaseSensitive);

        HRESULT GetTextBody(
            [in]        DWORD dwTxtType,
            [in]        ENCODINGTYPE ietEncoding,
            [out]       IStream **pStream,
            [out]       LPHBODY phBody);

        HRESULT SetTextBody(
            [in]        DWORD dwTxtType,
            [in]        ENCODINGTYPE ietEncoding,
            [in]        HBODY hAlternative,
            [in]        IStream *pStream,
            [out]       LPHBODY phBody);

        HRESULT AttachObject(
            [in]        REFIID riid,
            [in, iid_is(riid)] void *pvObject,
            [out]       LPHBODY phBody);

        HRESULT AttachFile(
            [in]        LPCSTR pszFilePath,
            [in]        IStream *pstmFile,
            [out]       LPHBODY phBody);

        HRESULT AttachURL(
            [in]        LPCSTR pszBase,
            [in]        LPCSTR pszURL,
            [in]        DWORD dwFlags,
            [in]        IStream *pstmURL,
            [out]       LPSTR *ppszCIDURL,
            [out]       LPHBODY phBody);

        HRESULT GetAttachments(
            [out]       ULONG *pcAttach,
            [out]       LPHBODY *pprghAttach);

        HRESULT GetAddressTable(
            [out]       IMimeAddressTable **ppTable);

        HRESULT GetSender(
            [in, out]   LPADDRESSPROPS pAddress);

        HRESULT GetAddressTypes(
            [in]        DWORD dwAdrTypes,
            [in]        DWORD dwProps,
            [in, out]   LPADDRESSLIST pList);

        HRESULT GetAddressFormat(
            [in]        DWORD dwAdrTypes,
            [in]        ADDRESSFORMAT format,
            [out]       LPSTR *ppszFormat);

        HRESULT EnumAddressTypes(
            [in]        DWORD dwAdrTypes,
            [in]        DWORD dwProps,
            [out]       IMimeEnumAddressTypes **ppEnum);

        HRESULT SplitMessage(
            [in]        ULONG cbMaxPart,
            [out]       IMimeMessageParts **ppParts);

        HRESULT GetRootMoniker(
            [out]       IMoniker **ppMoniker);
    }

    [
        uuid(761aa741-7bda-11d1-8aa9-00c04fb951f3),
        object
    ]
    interface IMimeMessageCallback : IUnknown
    {
1340 1341 1342
        HRESULT OnWebPageSplitter(
            [in]       DWORD cInlined,
            [in]       IStream *ppStream);
Rob Shearman's avatar
Rob Shearman committed
1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368
    }

    [
        uuid(de4ad8da-555f-11d1-8dd0-00c04fb951f9),
        object
    ]
    interface IPersistMime : IPersist
    {
        /* FIXME: fill this in */
    }

    [
        uuid(c558834f-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeMessageParts : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(fd853cee-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeEnumProperties : IUnknown
    {
1369 1370
        typedef [unique] IMimeEnumProperties *LPMIMEENUMPROPERTIES;

1371 1372 1373 1374 1375 1376 1377
        typedef struct tagENUMPROPERTY
        {
            LPSTR       pszName;
            HHEADERROW  hRow;
            DWORD       dwPropId;
        } ENUMPROPERTY, *LPENUMPROPERTY;

1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393
        HRESULT Next(
            [in]      ULONG cFetch,
            [in, out] LPENUMPROPERTY prgProp,
            [out]     ULONG *pcFetched);

        HRESULT Skip(
            [in]      ULONG cItems);

        HRESULT Reset(void);

        HRESULT Clone(
            [out]      IMimeEnumProperties **ppEnum);

        HRESULT Count(
            [out]      ULONG *pcItems);

Rob Shearman's avatar
Rob Shearman committed
1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428
    }

    [
        uuid(c5588354-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeEnumAddressTypes : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(c5588350-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeEnumMessageParts : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(64577981-86d7-11d1-bdfc-00c04fa31009),
        object
    ]
    interface IHashTable : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(c5588351-7f86-11d0-8252-00c04fd85ab4),
        object
    ]
    interface IMimeAllocator : IMalloc
    {
1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462
        typedef [unique] IMimeAllocator *LPMIMEALLOCATOR;

        HRESULT FreeParamInfoArray(
            [in] ULONG            cParams,
            [in] LPMIMEPARAMINFO  prgParam,
            [in] boolean          fFreeArray);

        HRESULT FreeAddressList(
            [in,out] LPADDRESSLIST pList);

        HRESULT FreeAddressProps(
            [in,out] LPADDRESSPROPS pAddress);

        HRESULT ReleaseObjects(
            [in] ULONG            cObjects,
            [in] IUnknown         **prgpUnknown,
            [in] boolean          fFreeArray);

        HRESULT FreeEnumHeaderRowArray(
            [in] ULONG            cRows,
            [in] LPENUMHEADERROW  prgRow,
            [in] boolean          fFreeArray);

        HRESULT FreeEnumPropertyArray(
            [in] ULONG            cProps,
            [in] LPENUMPROPERTY   prgProp,
            [in] boolean          fFreeArray);

        HRESULT FreeThumbprint(
            [in] THUMBBLOB         *pthumbprint);

        HRESULT PropVariantClear(
            [in] LPPROPVARIANT     pProp);

Rob Shearman's avatar
Rob Shearman committed
1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508
    }

    [
        uuid(feceaffd-c441-11d1-960e-00c04fbd7c09),
        object
    ]
    interface IMimeObjResolver : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(b0d17fc2-7bc4-11d1-bdfa-00c04fa31009),
        object
    ]
    interface IFontCache : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(b0d17fc5-7bc4-11d1-bdfa-00c04fa31009),
        object
    ]
    interface IFontCacheNotify : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(70183210-7b36-11d2-8c12-00c04fa31009),
        object
    ]
    interface IMimeEditTag : IUnknown
    {
        /* FIXME: fill this in */
    }

    [
        uuid(d09ee528-7b38-11d2-8c12-00c04fa31009),
        object
    ]
    interface IMimeEditTagCollection : IUnknown
    {
        /* FIXME: fill this in */
    }
1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533

    [
         uuid(ba715ae0-a740-11d2-8b22-0080c76b34c6),
         local
    ]
    interface IMimeSecurityCallback : IUnknown
    {
        /* FIXME: fill this in */

        cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_UNKNOWN                0")
        cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_KEYTRANS               1")
        cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_KEYAGREE               2")
        cpp_quote("#define CMS_RECIPIENT_INFO_TYPE_MAIL_LIST              3")

        cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_CERTIFICATE          0")
        cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_KEYTRANS             1")
        cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_PROVIDER             2")
        cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_EPHEMERAL_KEYAGREE   3")
        cpp_quote("#define CMS_RECIPIENT_INFO_PUBKEY_STATIC_KEYAGREE      4")

        cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_CERTIFICATE           0")
        cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_ISSUERSERIAL          1")
        cpp_quote("#define CMS_RECIPIENT_INFO_KEYID_KEY_ID                2")

    }
Rob Shearman's avatar
Rob Shearman committed
1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620
}

cpp_quote("")
cpp_quote("HRESULT WINAPI MimeOleSetCompatMode(DWORD);")
cpp_quote("HRESULT WINAPI MimeOleContentTypeFromUrl(LPCSTR,LPCSTR,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleParseMhtmlUrl(LPSTR,LPSTR*,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleObjectFromUrl(LPCSTR,BOOL,REFIID,LPVOID*,IUnknown**);")
cpp_quote("HRESULT WINAPI MimeOleObjectFromMoniker(BINDF,IMoniker*,IBindCtx*,REFIID,LPVOID*,IMoniker**);")
cpp_quote("HRESULT WINAPI MimeOleCombineURL(LPCSTR,ULONG,LPCSTR,ULONG,BOOL,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleGetSubjectFileName(IMimePropertySet*,ULONG*,ULONG*,LPSTR,ULONG);")
cpp_quote("HRESULT WINAPI MimeOleCreateWebDocument(LPCSTR,LPCSTR,IMimeWebDocument**);")
cpp_quote("HRESULT WINAPI MimeOleGetRelatedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);")
cpp_quote("HRESULT WINAPI MimeOleGetMixedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);")
cpp_quote("HRESULT WINAPI MimeOleGetAlternativeSection(IMimeMessageTree*,LPHBODY,boolean*);")
cpp_quote("HRESULT WINAPI MimeOleGenerateCID(LPSTR,ULONG,boolean);")
cpp_quote("HRESULT WINAPI MimeOleGenerateMID(LPSTR,ULONG,boolean);")
cpp_quote("HRESULT WINAPI MimeOleCreateByteStream(IStream**);")
cpp_quote("HRESULT WINAPI MimeOlGetPropertySchema(IMimePropertySchema**);")
cpp_quote("HRESULT WINAPI MimeOleQueryString(LPCSTR,LPCSTR,boolean,boolean);")
cpp_quote("HRESULT WINAPI MimeOleGetPropA(IMimePropertySet*,LPCSTR,DWORD,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleSetPropA(IMimePropertySet*,LPCSTR,DWORD,LPCSTR);")
cpp_quote("HRESULT WINAPI MimeOleGetPropW(IMimePropertySet*,LPCSTR,DWORD,LPWSTR*);")
cpp_quote("HRESULT WINAPI MimeOleSetPropW(IMimePropertySet*,LPCSTR,DWORD,LPCWSTR);")
cpp_quote("HRESULT WINAPI MimeOleGetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleSetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCSTR);")
cpp_quote("HRESULT WINAPI MimeOleGetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPWSTR*);")
cpp_quote("HRESULT WINAPI MimeOleSetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCWSTR);")
cpp_quote("HRESULT WINAPI MimeOleCreateHeaderTable(IMimeHeaderTable**);")
cpp_quote("HRESULT WINAPI MimeOleVariantFree(LPPROPVARIANT);")
cpp_quote("HRESULT WINAPI MimeOleVariantCopy(LPPROPVARIANT,LPPROPVARIANT);")
cpp_quote("HRESULT WINAPI MimeOleGetExtClassId(LPCSTR,LPCLSID);")
cpp_quote("HRESULT WINAPI MimeOleEncodeHeader(HCHARSET,LPPROPVARIANT,LPSTR*,LPRFC1522INFO);")
cpp_quote("HRESULT WINAPI MimeOleDecodeHeader(HCHARSET,LPCSTR,LPPROPVARIANT,LPRFC1522INFO);")
cpp_quote("HRESULT WINAPI MimeOleRfc1522Decode(LPCSTR,LPSTR,ULONG,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleRfc1522Encode(LPCSTR,HCHARSET,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleGetInternat(IMimeInternational**);")
cpp_quote("HRESULT WINAPI MimeOleFindCharset(LPCSTR,LPHCHARSET);")
cpp_quote("HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET,LPINETCSETINFO);")
cpp_quote("HRESULT WINAPI MimeOleGetCodePageInfo(HCHARSET,LPCODEPAGEINFO);")
cpp_quote("HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET);")
cpp_quote("HRESULT WINAPI MimeOleSetDefaultCharset(HCHARSET);")
cpp_quote("HRESULT WINAPI MimeOleGetCodePageCharset(CODEPAGEID,CHARSETTYPE,LPHCHARSET);")
cpp_quote("HRESULT WINAPI MimeOleCreateVirtualStream(IStream**);")
cpp_quote("HRESULT WINAPI MimeOleOpenFileStream(LPCSTR,DWORD,DWORD,IStream**);")
cpp_quote("HRESULT WINAPI MimeOleIsTnefStream(IStream*);")
cpp_quote("HRESULT WINAPI MimeOleGenerateFileName(LPCSTR,LPCSTR,LPCSTR,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleGetFileExtension(LPCSTR,LPSTR,ULONG);")
cpp_quote("HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity**);")
cpp_quote("HRESULT WINAPI MimeOleInetDateToFileTime(LPCSTR,LPFILETIME);")
cpp_quote("HRESULT WINAPI MimeOleFileTimeToInetDate(LPFILETIME,LPSTR,ULONG);")
cpp_quote("HRESULT WINAPI MimeOleCreateMessageParts(IMimeMessageParts**);")
cpp_quote("HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator**);")
cpp_quote("HRESULT WINAPI MimeOleParseRfc822Address(DWORD,ENCODINGTYPE,LPCSTR,LPADDRESSLIST);")
cpp_quote("HRESULT WINAPI MimeOleCreateMessage(IUnknown*,IMimeMessage**);")
cpp_quote("HRESULT WINAPI MimeOleMergePartialHeaders(IStream*,IStream*);")
cpp_quote("HRESULT WINAPI MimeOleEscapeString(CODEPAGEID,LPCSTR,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleGetExtContentType(LPCSTR,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleGetContentTypeExt(LPCSTR,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleGetFileInfo(LPSTR,LPSTR*,LPSTR*,LPSTR*,LPSTR*,LPSTR*);")
cpp_quote("HRESULT WINAPI MimeOleCreateBody(IMimeBody**);")
cpp_quote("HRESULT WINAPI MimeOleCreatePropertySet(IUnknown*,IMimePropertySet**);")
cpp_quote("HRESULT WINAPI MimeOleCreateMessageTree(IUnknown*,IMimeMessageTree**);")
cpp_quote("HRESULT WINAPI MimeOleGetCertsFromThumbprints(THUMBBLOB*,X509CERTRESULT*,const HCERTSTORE*,DWORD);")
cpp_quote("HRESULT WINAPI MimeOleSplitMessage(IMimeMessage*,ULONG,IMimeMessageParts**);")
cpp_quote("HRESULT WINAPI MimeOleClearDirtyTree(IMimeMessageTree*);")
cpp_quote("HRESULT WINAPI MimeOleConvertEnrichedToHTML(CODEPAGEID,IStream*,IStream*);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapsToDlg(LPBYTE,DWORD,DWORD,PCX509CERT*,HWND,DWORD,DWORD,DWORD);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFromDlg(HWND,DWORD,DWORD,DWORD,LPBYTE,DWORD*);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapInit(LPBYTE,DWORD,LPVOID*);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddSMimeCap(LPBYTE,DWORD,LPVOID);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddCert(LPBYTE,DWORD,BOOL,LPVOID);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetEncAlg(LPVOID,LPBYTE,DWORD*,DWORD*);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetHashAlg(LPVOID,LPBYTE,DWORD*,DWORD*);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapRelease(LPVOID);")
cpp_quote("HRESULT WINAPI MimeOleAlgNameFromSMimeap(LPBYTE,DWORD,LPCSTR*);")
cpp_quote("HRESULT WINAPI MimeOleAlgStrengthFromSMimeCap(LPBYTE,DWORD,BOOL,DWORD*);")
cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFull(LPVOID,BOOL,BOOL,LPBYTE,DWORD*);")
cpp_quote("HRESULT WINAPI MimeOleCreateHashTable(DWORD,BOOL,IHashTable**);")
cpp_quote("HRESULT WINAPI MimeOleStripHeaders(IMimeMessage*,HBODY,LPCSTR,LPCSTR,IStream**);")

cpp_quote("HRESULT WINAPI MimeEditViewSource(HWND,IMimeMessage*);")
cpp_quote("HRESULT WINAPI MimeEditIsSafeToRun(HWND,LPCSTR);")
cpp_quote("HRESULT WINAPI MimeEditVerifyTrust(HWND,LPCSTR,LPCSTR);")
cpp_quote("HRESULT WINAPI MimeEditCreateMimeDocument(IUnknown*,IMimeMessage*,DWORD,IMimeMessage**);")
cpp_quote("HRESULT WINAPI MimeEditGetBackgroundImageUrl(IUnknown*,BSTR*);")
cpp_quote("HRESULT WINAPI MimeEditDocumentFromStream(IStream*,REFIID,void**);")

1621
cpp_quote("HRESULT WINAPI MimeOleGetPropertySchema(IMimePropertySchema**);")
1622
cpp_quote("HRESULT WINAPI MimeGetAddressFormatW(REFIID,void*,DWORD,ADDRESSFORMAT,WCHAR**);")