23#define NONAMELESSUNION
30#include "wine/winternl.h"
198 IStream_AddRef(iface);
224 IStream_Release(
This->base);
240 TRACE(
"(%p, %d, %p)\n", pv,
cb, pcbRead);
243 IStream_Seek(
This->base, tmp_pos, STREAM_SEEK_SET,
NULL);
245 if(
This->pos.QuadPart +
cb >
This->length.QuadPart)
246 cb =
This->length.QuadPart -
This->pos.QuadPart;
248 hr = IStream_Read(
This->base, pv,
cb, pcbRead);
250 This->pos.QuadPart += *pcbRead;
274 TRACE(
"(%08x.%08x, %x, %p)\n", dlibMove.
u.HighPart, dlibMove.
u.LowPart, dwOrigin, plibNewPosition);
278 case STREAM_SEEK_SET:
281 case STREAM_SEEK_CUR:
284 case STREAM_SEEK_END:
296 if(plibNewPosition) *plibNewPosition =
This->pos;
321 TRACE(
"(%p)->(%p, %d, %p, %p)\n", iface, pstm,
cb.u.LowPart, pcbRead, pcbWritten);
326 while (
cb.QuadPart > 0 )
328 if (
cb.QuadPart >=
sizeof(tmpBuffer) )
329 copySize =
sizeof(tmpBuffer);
331 copySize =
cb.u.LowPart;
333 hr = IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
336 totalBytesRead.
QuadPart += bytesRead;
345 if (bytesRead != copySize)
348 cb.QuadPart -= bytesRead;
359 DWORD grfCommitFlags)
398 FIXME(
"(%p)->(%p, %08x)\n",
This, pstatstg, grfStatFlag);
399 memset(pstatstg, 0,
sizeof(*pstatstg));
400 pstatstg->cbSize =
This->length;
442 This->pos.QuadPart = 0;
452 STATSTG statstg = {
NULL};
456 hres = IStream_Stat(
stream, &statstg, STATFLAG_NONAME);
458 *
size = statstg.cbSize;
491#define PARSER_BUF_SIZE 1024
537 if(new_end - last_end == 2)
541 IStream_Seek(stm, off, STREAM_SEEK_CUR,
NULL);
564 if(!colon)
return NULL;
572 TRACE(
"%s: found match with default property id %d\n", *
ptr, prop->
id);
584 TRACE(
"%s: found match with already added new property id %d\n", *
ptr, prop_entry->
prop.
id);
585 prop = &prop_entry->
prop;
597 prop = &prop_entry->
prop;
598 TRACE(
"%s: allocating new prop id %d\n", *
ptr, prop_entry->
prop.
id);
604 PropVariantInit(&
ret->value);
616 while(*
cp ==
' ' || *
cp ==
'\t')
631 }
while(*
cp ==
' ' || *
cp ==
'\t');
641 while(*
str ==
' ' || *
str ==
'\t')
str++;
657 WARN(
"quote in unquoted string\n");
675 TRACE(
"got param %s\n",
p);
677 while (*
key ==
' ' || *
key ==
'\t' )
key++;
682 WARN(
"malformed parameter - skipping\n");
705 if(!in_quotes && *
cp ==
';')
713 in_quotes = !in_quotes;
727 }
while(*
end ==
' ' || *
end ==
'\t');
737 if(
header->prop->flags & MPF_HASPARAMS)
757 WARN(
"malformed context type value\n");
763 body->content_pri_type[
len] =
'\0';
772 body->encoding = IET_BASE64;
774 body->encoding = IET_QP;
776 body->encoding = IET_7BIT;
778 body->encoding = IET_8BIT;
785 char *header_buf, *cur_header_ptr;
792 cur_header_ptr = header_buf;
798 switch(
header->prop->id) {
888 return MIME_E_NOT_FOUND;
899 if(STRTOPID(
name) == prop_def->
id)
911 TRACE(
"%s: found match with default property id %d\n", prop_def->
name, prop_def->
id);
989 *pClassID = IID_IMimeBody;
1011 FIXME(
"(%p)->(%p, %d)\n",
This, pStm, fClearDirty);
1020 FIXME(
"(%p)->(%p) stub\n",
This, pcbSize);
1035 LPMIMEPROPINFO pInfo)
1040 DWORD supported = PIM_PROPID | PIM_VTDEFAULT;
1044 if(!pszName || !pInfo)
1047 TRACE(
"mask 0x%04x\n", pInfo->dwMask);
1049 if(pInfo->dwMask & ~supported)
1050 FIXME(
"Unsupported mask flags 0x%04x\n", pInfo->dwMask & ~supported);
1055 if(pInfo->dwMask & PIM_CHARSET)
1056 pInfo->hCharset = 0;
1057 if(pInfo->dwMask & PIM_FLAGS)
1058 pInfo->dwFlags = 0x00000000;
1059 if(pInfo->dwMask & PIM_ROWNUMBER)
1060 pInfo->dwRowNumber = 0;
1061 if(pInfo->dwMask & PIM_ENCODINGTYPE)
1062 pInfo->ietEncoding = 0;
1063 if(pInfo->dwMask & PIM_VALUES)
1065 if(pInfo->dwMask & PIM_PROPID)
1066 pInfo->dwPropId =
header->prop->id;
1067 if(pInfo->dwMask & PIM_VTDEFAULT)
1068 pInfo->vtDefault =
header->prop->default_vt;
1069 if(pInfo->dwMask & PIM_VTCURRENT)
1070 pInfo->vtCurrent = 0;
1079 LPCMIMEPROPINFO pInfo)
1101 if(!ISPIDSTR(pszName) && !
lstrcmpiA(pszName,
"att:pri-content-type"))
1145 if(ISPIDSTR(pszName))
1147 if(STRTOPID(pszName) == prop_entry->
prop.
id)
1149 TRACE(
"Found match with already added new property id %d\n", prop_entry->
prop.
id);
1150 prop = &prop_entry->
prop;
1156 TRACE(
"Found match with already added new property id %d\n", prop_entry->
prop.
id);
1157 prop = &prop_entry->
prop;
1180 prop_entry->
prop.
id = prop_def->
id;
1184 if(ISPIDSTR(pszName))
1188 return MIME_E_NOT_FOUND;
1198 prop = &prop_entry->
prop;
1199 TRACE(
"Allocating new prop id %d\n", prop_entry->
prop.
id);
1236 if(ISPIDSTR(pszName))
1237 found = STRTOPID(pszName) ==
cursor->prop->id;
1248 return MIME_E_NOT_FOUND;
1255 IMimePropertySet* pPropertySet)
1258 FIXME(
"(%p)->(%d, %p, %p) stub\n",
This, cNames, prgszName, pPropertySet);
1266 IMimePropertySet* pPropertySet)
1269 FIXME(
"(%p)->(%d, %p, %p) stub\n",
This, cNames, prgszName, pPropertySet);
1279 FIXME(
"(%p)->(%d, %p) stub\n",
This, cNames, prgszName);
1288 boolean fCaseSensitive)
1297 LPHCHARSET phCharset)
1300 FIXME(
"(%p)->(%p) stub\n",
This, phCharset);
1308 CSETAPPLYTYPE applytype)
1311 FIXME(
"(%p)->(%p, %d) stub\n",
This, hCharset, applytype);
1319 LPMIMEPARAMINFO* pprgParam)
1325 TRACE(
"(%p)->(%s, %p, %p)\n", iface,
debugstr_a(pszName), pcParams, pprgParam);
1336 IMimeAllocator *
alloc;
1338 MIMEPARAMINFO *
info;
1342 *pprgParam =
info = IMimeAllocator_Alloc(
alloc, *pcParams *
sizeof(**pprgParam));
1355 IMimeAllocator_Release(
alloc);
1370 const char *pri =
This->content_pri_type;
1371 if(!pri) pri =
"text";
1377 const char *sub =
This->content_sub_type;
1378 if(!sub) sub =
"plain";
1397 IMimePropertySet** ppPropertySet)
1400 FIXME(
"(%p)->(%p) stub\n",
This, ppPropertySet);
1413 if(
pValue->vt != TYPEDID_TYPE(oid))
1415 WARN(
"Called with vartype %04x and oid %08x\n",
pValue->vt, oid);
1421 case OID_SECURITY_HWND_OWNER:
1422 FIXME(
"OID_SECURITY_HWND_OWNER (value %08x): ignoring\n",
pValue->u.ulVal);
1425 case OID_TRANSMIT_BODY_ENCODING:
1426 FIXME(
"OID_TRANSMIT_BODY_ENCODING (value %08x): ignoring\n",
pValue->u.ulVal);
1430 FIXME(
"Unhandled oid %08x\n", oid);
1449 IMimeEnumProperties** ppEnum)
1458 IMSGBODYTYPE bodytype)
1468 FIXME(
"Unimplemented bodytype %d - returning S_OK\n", bodytype);
1487 FIXME(
"(%p)->(%p) stub\n",
This, ppszDisplay);
1493 LPBODYOFFSETS pOffsets)
1498 *pOffsets =
This->body_offsets;
1500 if(
This->body_offsets.cbBodyEnd == 0)
return MIME_E_NO_DATA;
1506 ENCODINGTYPE* pietEncoding)
1510 TRACE(
"(%p)->(%p)\n",
This, pietEncoding);
1512 *pietEncoding =
This->encoding;
1518 ENCODINGTYPE ietEncoding)
1522 TRACE(
"(%p)->(%d)\n",
This, ietEncoding);
1524 This->encoding = ietEncoding;
1530 ENCODINGTYPE ietEncoding,
1534 FIXME(
"(%p)->(%d, %p) stub\n",
This, ietEncoding, pcbSize);
1540 ENCODINGTYPE ietEncoding,
1544 FIXME(
"(%p)->(%d, %p) stub\n",
This, ietEncoding, pStream);
1550 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1551 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1552 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
1553 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
1554 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1555 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
1556 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1557 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
1562 const unsigned char *
ptr, *
end;
1563 unsigned char buf[1024];
1566 unsigned char in[4];
1600 *
ret++ =
in[0] << 2 |
in[1] >> 4;
1603 *
ret++ =
in[1] << 4 |
in[2] >> 2;
1606 *
ret++ = ((
in[2] << 6) & 0xc0) |
in[3];
1619 hres = IStream_Seek(output,
pos, STREAM_SEEK_SET,
NULL);
1621 IStream_Release(output);
1625 *ret_stream = output;
1631 if(
'0' <=
c &&
c <=
'9')
1633 if(
'A' <=
c &&
c <=
'F')
1634 return c -
'A' + 10;
1635 if(
'a' <=
c &&
c <=
'f')
1636 return c -
'a' + 10;
1642 const unsigned char *
ptr, *
end;
1643 unsigned char *
ret, prev = 0;
1644 unsigned char buf[1024];
1669 unsigned char byte = *
ptr++;
1683 if(prev !=
'\r' ||
byte !=
'\n') {
1685 if(h1 != -1 && h2 != -1)
1686 *
ret++ = (h1 << 4) | h2;
1703 hres = IStream_Seek(output,
pos, STREAM_SEEK_SET,
NULL);
1705 IStream_Release(output);
1709 *ret_stream = output;
1715 ENCODINGTYPE ietEncoding,
1722 TRACE(
"(%p)->(%d %p)\n",
This, ietEncoding, ppStream);
1724 if(
This->encoding != ietEncoding) {
1725 switch(
This->encoding) {
1733 FIXME(
"Decoding %d is not supported.\n",
This->encoding);
1736 if(ietEncoding != IET_BINARY)
1737 FIXME(
"Encoding %d is not supported.\n", ietEncoding);
1751 ENCODINGTYPE ietEncoding,
1762 IStream_AddRef((
IStream *)pvObject);
1773 This->data = pvObject;
1775 IMimeBody_SetCurrentEncoding(iface, ietEncoding);
1797 FIXME(
"(%p)->(%p) stub\n",
This, pBody);
1803 LPTRANSMITINFO pTransmitInfo)
1806 FIXME(
"(%p)->(%p) stub\n",
This, pTransmitInfo);
1812 ENCODINGTYPE ietEncoding,
1825 TRACE(
"(%p)->(%p)\n", iface, phBody);
1830 *phBody =
This->handle;
1831 return This->handle ?
S_OK : MIME_E_NO_DATA;
1883 TRACE(
"setting offsets to %d, %d, %d, %d\n",
offsets->cbBoundaryStart,
1890#define FIRST_CUSTOM_PROP_ID 0x100
1895 BODYOFFSETS body_offsets;
1909 This->encoding = IET_7BIT;
1913 body_offsets.cbBoundaryStart = body_offsets.cbHeaderStart = 0;
1914 body_offsets.cbBodyStart = body_offsets.cbBodyEnd = 0;
1975 IMimeMessage_AddRef(iface);
2001 IMimeBody_Release(&
body->mime_body->IMimeBody_iface);
2017 if(
This->stream) IStream_Release(
This->stream);
2029 FIXME(
"(%p)->(%p)\n", iface, pClassID);
2037 FIXME(
"(%p)->()\n", iface);
2046 body->mime_body = mime_body;
2066 int boundary_len =
strlen(boundary);
2067 char *
buf, *
ptr, *overlap;
2076 overlap_no = boundary_len + 5;
2081 hr = IStream_Seek(stm,
zero, STREAM_SEEK_CUR, &
cur);
2087 if(
read == 0)
break;
2088 overlap[
read] =
'\0';
2093 is_first_line =
FALSE;
2103 if(*
ptr ==
'-' && *(
ptr + 1) ==
'-' && !
memcmp(
ptr + 2, boundary, boundary_len)) {
2104 ptr += boundary_len + 2;
2106 if(*
ptr ==
'\r' && *(
ptr + 1) ==
'\n')
2111 cur_body->
offsets.cbBodyEnd = boundary_start - 2;
2115 cur_body->
offsets.cbBoundaryStart = boundary_start;
2118 else if(*
ptr ==
'-' && *(
ptr + 1) ==
'-')
2122 cur_body->
offsets.cbBodyEnd = boundary_start - 2;
2133 overlap =
buf + overlap_no;
2157 IStream_Seek(pStm,
pos, STREAM_SEEK_SET,
NULL);
2163 hr = IStream_Seek(pStm,
pos, STREAM_SEEK_CUR, &
start);
2175 MIMEPARAMINFO *param_info;
2177 IMimeAllocator *
alloc;
2187 if(!
lstrcmpiA(param_info[
i].pszName,
"boundary"))
2189 struct list offset_list;
2204 IMimeAllocator_FreeParamInfoArray(
alloc,
count, param_info,
TRUE);
2205 IMimeAllocator_Release(
alloc);
2218 TRACE(
"(%p)->(%p)\n", iface, pStm);
2222 FIXME(
"already loaded a message\n");
2228 IStream_AddRef(pStm);
2229 This->stream = pStm;
2236 IStream_Seek(pStm,
zero, STREAM_SEEK_END, &
cur);
2247 FIXME(
"(%p)->(%p, %s)\n", iface, pStm, fClearDirty ?
"TRUE" :
"FALSE");
2255 FIXME(
"(%p)->(%p)\n", iface, pcbSize);
2262 FIXME(
"(%p)->()\n", iface);
2274 IStream_AddRef(
This->stream);
2275 *ppStream =
This->stream;
2292 FIXME(
"(%p)->(%p)\n", iface, pStream);
2310 FIXME(
"(%p)->(%p)\n", iface, pdwFlags);
2326 FIXME(
"(%p)->()\n", iface);
2335 if(hbody == HBODY_ROOT)
2369 IMimeBody_AddRef(&
body->mime_body->IMimeBody_iface);
2383 FIXME(
"(%p)->(%p, 0x%x, %p)\n", iface, hBody,
dwFlags, pStream);
2410 hr = MIME_E_NOT_FOUND;
2418 hr = MIME_E_NOT_FOUND;
2426 hr = MIME_E_NOT_FOUND;
2434 hr = MIME_E_NOT_FOUND;
2442 hr = MIME_E_NOT_FOUND;
2461 FIXME(
"(%p)->(%d, %p, %p)\n", iface,
location, hPivot, phBody);
2472 TRACE(
"(%p)->(%d, %p, %p)\n", iface,
location, hPivot, phBody);
2522 TRACE(
"(%p)->(%p, %s, %p)\n", iface, hParent, fRecurse ?
"TRUE" :
"FALSE", pcBodies);
2546 if (!
body->parent)
return MIME_E_NOT_FOUND;
2554 if (IMimeBody_IsContentType(&
body->mime_body->IMimeBody_iface,
find->pszPriType,
2561 return MIME_E_NOT_FOUND;
2568 TRACE(
"(%p)->(%p, %p)\n", iface, pFindBody, phBody);
2570 pFindBody->dwReserved = 0;
2580 TRACE(
"(%p)->(%p, %p)\n", iface, pFindBody, phBody);
2583 if (
hr !=
S_OK)
return MIME_E_NOT_FOUND;
2595 FIXME(
"(%p)->(%p, %s, %s, 0x%x, %p)\n", iface, hRelated, pszBase, pszURL,
dwFlags, phBody);
2603 LPHBODY phMultipart)
2605 FIXME(
"(%p)->(%p, %s, %p)\n", iface, hBody, pszSubType, phMultipart);
2612 LPBODYOFFSETS pOffsets)
2614 FIXME(
"(%p)->(%p, %p)\n", iface, hBody, pOffsets);
2620 LPHCHARSET phCharset)
2622 FIXME(
"(%p)->(%p)\n", iface, phCharset);
2630 CSETAPPLYTYPE applytype)
2632 FIXME(
"(%p)->(%p, %d)\n", iface, hCharset, applytype);
2639 IMSGBODYTYPE bodytype)
2643 TRACE(
"(%p)->(%p, %d)\n", iface, hBody, bodytype);
2645 hr = IMimeMessage_BindToObject(iface, hBody, &IID_IMimeBody, (
void**)&mime_body);
2648 hr = IMimeBody_IsType(mime_body, bodytype);
2664 hr = IMimeMessage_BindToObject(iface, hBody, &IID_IMimeBody, (
void**)&mime_body);
2667 hr = IMimeBody_IsContentType(mime_body, pszPriType, pszSubType);
2668 IMimeBody_Release(mime_body);
2678 boolean fCaseSensitive)
2680 FIXME(
"(%p)->(%p, %s, %s, %s, %s)\n", iface, hBody, pszName, pszCriteria, fSubString ?
"TRUE" :
"FALSE", fCaseSensitive ?
"TRUE" :
"FALSE");
2696 hr = IMimeMessage_BindToObject(iface, hBody, &IID_IMimeBody, (
void**)&mime_body);
2700 IMimeBody_Release(mime_body);
2721 FIXME(
"(%p)->(%p, %s)\n", iface, hBody, pszName);
2736 if(TYPEDID_ID(oid) < TYPEDID_ID(OID_ALLOW_8BIT_HEADER) || TYPEDID_ID(oid) > TYPEDID_ID(OID_SECURITY_2KEY_CERT_BAG_64))
2738 WARN(
"oid (%08x) out of range\n", oid);
2739 return MIME_E_INVALID_OPTION_ID;
2742 if(
pValue->vt != TYPEDID_TYPE(oid))
2744 WARN(
"Called with vartype %04x and oid %08x\n",
pValue->vt, oid);
2750 case OID_HIDE_TNEF_ATTACHMENTS:
2751 FIXME(
"OID_HIDE_TNEF_ATTACHMENTS (value %d): ignoring\n",
pValue->u.boolVal);
2753 case OID_SHOW_MACBINARY:
2754 FIXME(
"OID_SHOW_MACBINARY (value %d): ignoring\n",
pValue->u.boolVal);
2756 case OID_SAVEBODY_KEEPBOUNDARY:
2757 FIXME(
"OID_SAVEBODY_KEEPBOUNDARY (value %d): ignoring\n",
pValue->u.boolVal);
2759 case OID_CLEANUP_TREE_ON_SAVE:
2760 FIXME(
"OID_CLEANUP_TREE_ON_SAVE (value %d): ignoring\n",
pValue->u.boolVal);
2763 FIXME(
"Unhandled oid %08x\n", oid);
2764 hr = MIME_E_INVALID_OPTION_ID;
2783 LPWEBPAGEOPTIONS pOptions,
2787 FIXME(
"(%p)->(%p, %p, %p, %p)\n", iface, pRootStm, pOptions,
pCallback, ppMoniker);
2816 FIXME(
"(%p)->(%s)\n", iface, pszName);
2825 boolean fCaseSensitive)
2827 FIXME(
"(%p)->(%s, %s, %s, %s)\n", iface, pszName, pszCriteria, fSubString ?
"TRUE" :
"FALSE", fCaseSensitive ?
"TRUE" :
"FALSE");
2834 ENCODINGTYPE ietEncoding,
2840 FINDBODY find_struct;
2842 static char text[] =
"text";
2843 static char plain[] =
"plain";
2844 static char html[] =
"html";
2846 TRACE(
"(%p)->(%d, %d, %p, %p)\n", iface, dwTxtType, ietEncoding, pStream, phBody);
2848 find_struct.pszPriType =
text;
2853 find_struct.pszSubType = plain;
2856 find_struct.pszSubType = html;
2859 return MIME_E_INVALID_TEXT_TYPE;
2862 hr = IMimeMessage_FindFirst(iface, &find_struct, &hbody);
2865 TRACE(
"not found hr %08x\n",
hr);
2870 IMimeMessage_BindToObject(iface, hbody, &IID_IMimeBody, (
void**)&mime_body);
2872 IMimeBody_GetData(mime_body, ietEncoding, pStream);
2874 IMimeBody_Release(mime_body);
2881 ENCODINGTYPE ietEncoding,
2886 FIXME(
"(%p)->(%d, %d, %p, %p, %p)\n", iface, dwTxtType, ietEncoding, hAlternative, pStream, phBody);
2906 FIXME(
"(%p)->(%s, %p, %p)\n", iface, pszFilePath, pstmFile, phBody);
2919 FIXME(
"(%p)->(%s, %s, 0x%x, %p, %p, %p)\n", iface, pszBase, pszURL,
dwFlags, pstmURL, ppszCIDURL, phBody);
2926 LPHBODY *pprghAttach)
2929 FINDBODY find_struct;
2934 TRACE(
"(%p)->(%p, %p)\n", iface, pcAttach, pprghAttach);
2939 find_struct.pszPriType = find_struct.pszSubType =
NULL;
2940 hr = IMimeMessage_FindFirst(iface, &find_struct, &hbody);
2943 hr = IMimeMessage_IsContentType(iface, hbody,
"multipart",
NULL);
2944 TRACE(
"IsCT rets %08x %d\n",
hr, *pcAttach);
2947 if(*pcAttach + 1 >
size)
2952 array[*pcAttach] = hbody;
2955 hr = IMimeMessage_FindNext(iface, &find_struct, &hbody);
2958 *pprghAttach =
array;
2964 IMimeAddressTable **ppTable)
2966 FIXME(
"(%p)->(%p)\n", iface, ppTable);
2972 LPADDRESSPROPS pAddress)
2974 FIXME(
"(%p)->(%p)\n", iface, pAddress);
2982 LPADDRESSLIST
pList)
2984 FIXME(
"(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, dwProps,
pList);
2994 FIXME(
"(%p)->(%d, %d, %p)\n", iface, dwAdrTypes,
format, ppszFormat);
3002 IMimeEnumAddressTypes **ppEnum)
3004 FIXME(
"(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, dwProps, ppEnum);
3011 IMimeMessageParts **ppParts)
3013 FIXME(
"(%p)->(%d, %p)\n", iface, cbMaxPart, ppParts);
3021 FIXME(
"(%p)->(%p)\n", iface, ppMoniker);
3095 FIXME(
"outer unknown not supported yet\n");
3108 This->next_index = 1;
3114 *
obj = &
This->IMimeMessage_iface;
3123 TRACE(
"(%p, %p)\n", pUnkOuter, ppMessage);
3132 FIXME(
"(0x%x)\n", dwMode);
3142 FIXME(
"(%p)\n", ppStream);
3167 IMimeSecurity_AddRef(iface);
3202 FIXME(
"(%p)->(): stub\n", iface);
3209 FIXME(
"(%p)->(): stub\n", iface);
3215 IMimeMessageTree* pTree,
3218 FIXME(
"(%p)->(%p, %08x): stub\n", iface, pTree,
dwFlags);
3224 IMimeMessageTree* pTree,
3228 FIXME(
"(%p)->(%p, %p, %08x): stub\n", iface, pTree, hEncodeRoot,
dwFlags);
3234 IMimeMessageTree* pTree,
3237 FIXME(
"(%p)->(%p, %08x): stub\n", iface, pTree,
dwFlags);
3243 IMimeMessageTree* pTree,
3247 FIXME(
"(%p)->(%p, %p, %08x): stub\n", iface, pTree, hDecodeRoot,
dwFlags);
3258 FIXME(
"(%p)->(%p, %08x, %p, %p): stub\n", iface, hc, dwUsage, pPrev, ppCert);
3264 const PCX509CERT pX509Cert,
3265 const CERTNAMETYPE
cn,
3268 FIXME(
"(%p)->(%p, %08x, %p): stub\n", iface, pX509Cert,
cn,
ppszName);
3278 FIXME(
"(%p)->(%p, %p, %p): stub\n", iface,
hwndParent, pBody, pdwSecType);
3284 const PCX509CERT pX509Cert,
3285 const CERTDATAID dataid,
3288 FIXME(
"(%p)->(%p, %x, %p): stub\n", iface, pX509Cert, dataid,
pValue);
3324 *
obj = &
This->IMimeSecurity_iface;
3337 IMimeAllocator* iface,
3348 IMimeAllocator_AddRef(iface);
3358 IMimeAllocator* iface)
3364 IMimeAllocator* iface)
3370 IMimeAllocator* iface,
3377 IMimeAllocator* iface,
3385 IMimeAllocator* iface,
3392 IMimeAllocator* iface,
3400 IMimeAllocator* iface,
3408 IMimeAllocator* iface)
3415 IMimeAllocator* iface,
3417 LPMIMEPARAMINFO prgParam,
3421 TRACE(
"(%p)->(%d, %p, %d)\n", iface, cParams, prgParam, fFreeArray);
3423 for(
i = 0;
i < cParams;
i++)
3425 IMimeAllocator_Free(iface, prgParam[
i].pszName);
3426 IMimeAllocator_Free(iface, prgParam[
i].pszData);
3428 if(fFreeArray) IMimeAllocator_Free(iface, prgParam);
3433 IMimeAllocator* iface,
3434 LPADDRESSLIST
pList)
3441 IMimeAllocator* iface,
3442 LPADDRESSPROPS pAddress)
3449 IMimeAllocator* iface,
3460 IMimeAllocator* iface,
3462 LPENUMHEADERROW prgRow,
3470 IMimeAllocator* iface,
3472 LPENUMPROPERTY prgProp,
3480 IMimeAllocator* iface,
3481 THUMBBLOB *pthumbprint)
3489 IMimeAllocator* iface,
3490 LPPROPVARIANT pProp)
3564 IMimePropertySchema_AddRef(iface);
3597 FIXME(
"(%p)->(%s, %x, %d, %d, %p) stub\n",
This,
debugstr_a(
name),
flags, rownumber, vtdefault, propid);
3699 WCHAR *display_name, *mhtml_url;
3705 WARN(
"(0x%08x, %p, %p, %s, %p, %p) semi-stub\n",
bindf,
moniker, binding,
debugstr_guid(
riid),
out, moniker_new);
static INT pivot(list_t &list, INT i, INT j)
char * strstr(char *String1, char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
#define UlongToHandle(ul)
#define _strnicmp(_String1, _String2, _MaxCount)
#define HeapFree(x, y, z)
static HRESULT WINAPI propschema_GetPropertyName(IMimePropertySchema *iface, DWORD propid, char **name)
static HRESULT WINAPI MimeMessage_LoadOffsetTable(IMimeMessage *iface, IStream *pStream)
HRESULT VirtualStream_create(IUnknown *outer, void **obj)
HRESULT WINAPI MimeGetAddressFormatW(REFIID riid, void *object, DWORD addr_type, ADDRESSFORMAT addr_format, WCHAR **address)
static HRESULT create_body_offset_list(IStream *stm, const char *boundary, struct list *body_offsets)
static HRESULT WINAPI MimeMessage_EnumAddressTypes(IMimeMessage *iface, DWORD dwAdrTypes, DWORD dwProps, IMimeEnumAddressTypes **ppEnum)
static HRESULT WINAPI MimeBody_QueryProp(IMimeBody *iface, LPCSTR pszName, LPCSTR pszCriteria, boolean fSubString, boolean fCaseSensitive)
static HRESULT WINAPI MimeAlloc_FreeThumbprint(IMimeAllocator *iface, THUMBBLOB *pthumbprint)
static HRESULT WINAPI sub_stream_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI MimeMessage_ResolveURL(IMimeMessage *iface, HBODY hRelated, LPCSTR pszBase, LPCSTR pszURL, DWORD dwFlags, LPHBODY phBody)
static void WINAPI MimeAlloc_Free(IMimeAllocator *iface, LPVOID pv)
static HRESULT WINAPI MimeMessage_GetMessageSize(IMimeMessage *iface, ULONG *pcbSize, DWORD dwFlags)
static HRESULT WINAPI MimeBody_CopyTo(IMimeBody *iface, IMimeBody *pBody)
static HRESULT WINAPI MimeBody_IsType(IMimeBody *iface, IMSGBODYTYPE bodytype)
static ULONG WINAPI MimeSecurity_Release(IMimeSecurity *iface)
HRESULT WINAPI MimeOleGetPropertySchema(IMimePropertySchema **schema)
static void init_content_encoding(MimeBody *body, header_t *header)
static HRESULT WINAPI MimeBody_GetTransmitInfo(IMimeBody *iface, LPTRANSMITINFO pTransmitInfo)
static HRESULT MimeBody_set_offsets(MimeBody *body, const BODYOFFSETS *offsets)
static HRESULT WINAPI MimeMessage_GetRootMoniker(IMimeMessage *iface, IMoniker **ppMoniker)
static HRESULT WINAPI MimeMessage_GetMessageSource(IMimeMessage *iface, IStream **ppStream, DWORD dwFlags)
static HRESULT WINAPI MimeMessage_AttachObject(IMimeMessage *iface, REFIID riid, void *pvObject, LPHBODY phBody)
static void unfold_header(char *header, int len)
static HRESULT WINAPI MimeBody_GetDisplayName(IMimeBody *iface, LPSTR *ppszDisplay)
static sub_stream_t * impl_from_IStream(IStream *iface)
static HRESULT WINAPI MimeMessage_InitNew(IMimeMessage *iface)
static HRESULT get_body(MimeMessage *msg, BODYLOCATION location, HBODY pivot, body_t **out)
static HRESULT WINAPI MimeBody_GetData(IMimeBody *iface, ENCODINGTYPE ietEncoding, IStream **ppStream)
static const IUnknownVtbl mime_obj_vtbl
static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop)
static LPSTR strdupA(LPCSTR str)
static HRESULT WINAPI MimeBody_GetParameters(IMimeBody *iface, LPCSTR pszName, ULONG *pcParams, LPMIMEPARAMINFO *pprgParam)
static HRESULT WINAPI MimeMessage_GetTextBody(IMimeMessage *iface, DWORD dwTxtType, ENCODINGTYPE ietEncoding, IStream **pStream, LPHBODY phBody)
static HRESULT WINAPI propschema_ModifyProperty(IMimePropertySchema *iface, const char *name, DWORD flags, DWORD rownumber, VARTYPE vtdefault)
static const IMimeSecurityVtbl MimeSecurityVtbl
static HRESULT WINAPI MimeBody_GetClassID(IMimeBody *iface, CLSID *pClassID)
static HRESULT WINAPI MimeSecurity_DecodeBody(IMimeSecurity *iface, IMimeMessageTree *pTree, HBODY hDecodeRoot, DWORD dwFlags)
static void free_header(header_t *header)
static HRESULT WINAPI propschema_RegisterAddressType(IMimePropertySchema *iface, const char *name, DWORD *adrtype)
static HRESULT WINAPI MimeMessage_DeleteProp(IMimeMessage *iface, LPCSTR pszName)
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
static char * unquote_string(const char *str)
static HRESULT WINAPI MimeSecurity_DecodeMessage(IMimeSecurity *iface, IMimeMessageTree *pTree, DWORD dwFlags)
static HRESULT WINAPI MimeBody_GetHandle(IMimeBody *iface, LPHBODY phBody)
static HRESULT WINAPI MimeBody_IsDirty(IMimeBody *iface)
static HRESULT WINAPI MimeBody_GetOption(IMimeBody *iface, const TYPEDID oid, LPPROPVARIANT pValue)
static void count_children(body_t *body, boolean recurse, ULONG *count)
static LPVOID WINAPI MimeAlloc_Alloc(IMimeAllocator *iface, SIZE_T cb)
static HRESULT WINAPI MimeMessage_SetCharset(IMimeMessage *iface, HCHARSET hCharset, CSETAPPLYTYPE applytype)
static HRESULT WINAPI MimeBody_SetDisplayName(IMimeBody *iface, LPCSTR pszDisplay)
static HRESULT WINAPI propschema_QueryInterface(IMimePropertySchema *iface, REFIID riid, void **out)
static HRESULT WINAPI sub_stream_QueryInterface(IStream *iface, REFIID riid, void **ppv)
static void init_content_type(MimeBody *body, header_t *header)
static HRESULT WINAPI MimeSecurity_EncodeMessage(IMimeSecurity *iface, IMimeMessageTree *pTree, DWORD dwFlags)
static HRESULT WINAPI MimeAlloc_FreeEnumPropertyArray(IMimeAllocator *iface, ULONG cProps, LPENUMPROPERTY prgProp, boolean fFreeArray)
static LPVOID WINAPI MimeAlloc_Realloc(IMimeAllocator *iface, LPVOID pv, SIZE_T cb)
static ULONG WINAPI MimeMessage_AddRef(IMimeMessage *iface)
static HRESULT WINAPI mime_obj_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static HRESULT decode_base64(IStream *input, IStream **ret_stream)
static void empty_body_list(struct list *list)
static HRESULT find_next(MimeMessage *This, body_t *body, FINDBODY *find, HBODY *out)
static HRESULT WINAPI MimeMessage_GetSender(IMimeMessage *iface, LPADDRESSPROPS pAddress)
static MimeBody * mimebody_create(void)
static void read_value(header_t *header, char **cur)
static HRESULT WINAPI MimeSecurity_EncodeBody(IMimeSecurity *iface, IMimeMessageTree *pTree, HBODY hEncodeRoot, DWORD dwFlags)
static propschema * impl_from_IMimePropertySchema(IMimePropertySchema *iface)
static HRESULT WINAPI MimeMessage_BindToObject(IMimeMessage *iface, const HBODY hBody, REFIID riid, void **ppvObject)
static HRESULT WINAPI MimeMessage_GetAttachments(IMimeMessage *iface, ULONG *pcAttach, LPHBODY *pprghAttach)
static HRESULT WINAPI MimeMessage_SaveOffsetTable(IMimeMessage *iface, IStream *pStream, DWORD dwFlags)
static HRESULT WINAPI MimeBody_SetCharset(IMimeBody *iface, HCHARSET hCharset, CSETAPPLYTYPE applytype)
static void empty_param_list(struct list *list)
static HRESULT WINAPI MimeBody_DeleteProp(IMimeBody *iface, LPCSTR pszName)
static HRESULT WINAPI sub_stream_Revert(IStream *iface)
static HRESULT WINAPI MimeMessage_GetCharset(IMimeMessage *iface, LPHCHARSET phCharset)
static HRESULT WINAPI MimeSecurity_QueryInterface(IMimeSecurity *iface, REFIID riid, void **ppv)
static HRESULT WINAPI MimeMessage_AttachFile(IMimeMessage *iface, LPCSTR pszFilePath, IStream *pstmFile, LPHBODY phBody)
static HRESULT WINAPI propschema_GetPropertyId(IMimePropertySchema *iface, const char *name, DWORD *propid)
static HRESULT parse_headers(MimeBody *body, IStream *stm)
static HRESULT WINAPI MimeMessage_GetBodyProp(IMimeMessage *iface, HBODY hBody, LPCSTR pszName, DWORD dwFlags, LPPROPVARIANT pValue)
static void add_param(header_t *header, const char *p)
static HRESULT WINAPI MimeBody_Save(IMimeBody *iface, IStream *pStm, BOOL fClearDirty)
static void WINAPI MimeAlloc_HeapMinimize(IMimeAllocator *iface)
static HRESULT WINAPI sub_stream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
static HRESULT WINAPI MimeBody_GetCurrentEncoding(IMimeBody *iface, ENCODINGTYPE *pietEncoding)
static HRESULT WINAPI MimeBody_GetEstimatedSize(IMimeBody *iface, ENCODINGTYPE ietEncoding, ULONG *pcbSize)
static HRESULT decode_qp(IStream *input, IStream **ret_stream)
static HRESULT WINAPI MimeAlloc_FreeAddressProps(IMimeAllocator *iface, LPADDRESSPROPS pAddress)
static HRESULT WINAPI MimeMessage_GetAddressTable(IMimeMessage *iface, IMimeAddressTable **ppTable)
static HRESULT get_stream_size(IStream *stream, ULARGE_INTEGER *size)
static HRESULT WINAPI MimeMessage_GetProp(IMimeMessage *iface, LPCSTR pszName, DWORD dwFlags, LPPROPVARIANT pValue)
static ULONG WINAPI sub_stream_AddRef(IStream *iface)
HRESULT WINAPI MimeOleObjectFromMoniker(BINDF bindf, IMoniker *moniker, IBindCtx *binding, REFIID riid, void **out, IMoniker **moniker_new)
static HRESULT WINAPI MimeMessage_QueryBodyProp(IMimeMessage *iface, HBODY hBody, LPCSTR pszName, LPCSTR pszCriteria, boolean fSubString, boolean fCaseSensitive)
static const property_t * find_default_prop(const char *name)
static HRESULT WINAPI MimeMessage_GetSizeMax(IMimeMessage *iface, ULARGE_INTEGER *pcbSize)
static void empty_new_prop_list(struct list *list)
static ULONG WINAPI MimeSecurity_AddRef(IMimeSecurity *iface)
static HRESULT WINAPI MimeMessage_SetOption(IMimeMessage *iface, const TYPEDID oid, LPCPROPVARIANT pValue)
static HRESULT WINAPI MimeBody_GetPropInfo(IMimeBody *iface, LPCSTR pszName, LPMIMEPROPINFO pInfo)
static const signed char base64_decode_table[]
static HRESULT WINAPI MimeBody_IsContentType(IMimeBody *iface, LPCSTR pszPriType, LPCSTR pszSubType)
static HRESULT WINAPI MimeSecurity_GetCertData(IMimeSecurity *iface, const PCX509CERT pX509Cert, const CERTDATAID dataid, LPPROPVARIANT pValue)
HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator **alloc)
static void release_data(REFIID riid, void *data)
static HRESULT WINAPI sub_stream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static HRESULT WINAPI MimeBody_EmptyData(IMimeBody *iface)
static HRESULT WINAPI MimeAlloc_FreeParamInfoArray(IMimeAllocator *iface, ULONG cParams, LPMIMEPARAMINFO prgParam, boolean fFreeArray)
static ULONG WINAPI MimeAlloc_Release(IMimeAllocator *iface)
static HRESULT WINAPI MimeMessage_QueryInterface(IMimeMessage *iface, REFIID riid, void **ppv)
static HRESULT WINAPI MimeMessage_IsContentType(IMimeMessage *iface, HBODY hBody, LPCSTR pszPriType, LPCSTR pszSubType)
static struct IStreamVtbl sub_stream_vtbl
static HRESULT WINAPI MimeBody_CopyProps(IMimeBody *iface, ULONG cNames, LPCSTR *prgszName, IMimePropertySet *pPropertySet)
static HRESULT WINAPI MimeMessage_SetBodyProp(IMimeMessage *iface, HBODY hBody, LPCSTR pszName, DWORD dwFlags, LPCPROPVARIANT pValue)
static HRESULT WINAPI MimeMessage_GetBodyOffsets(IMimeMessage *iface, HBODY hBody, LPBODYOFFSETS pOffsets)
#define FIRST_CUSTOM_PROP_ID
static HRESULT WINAPI MimeMessage_DeleteBody(IMimeMessage *iface, HBODY hBody, DWORD dwFlags)
static HRESULT find_body(struct list *list, HBODY hbody, body_t **body)
static HRESULT WINAPI MimeMessage_GetAddressFormat(IMimeMessage *iface, DWORD dwAdrTypes, ADDRESSFORMAT format, LPSTR *ppszFormat)
static HRESULT WINAPI MimeBody_GetCharset(IMimeBody *iface, LPHCHARSET phCharset)
static HRESULT WINAPI MimeMessage_DeleteBodyProp(IMimeMessage *iface, HBODY hBody, LPCSTR pszName)
static HRESULT WINAPI MimeAlloc_PropVariantClear(IMimeAllocator *iface, LPPROPVARIANT pProp)
static HRESULT WINAPI MimeBody_AppendProp(IMimeBody *iface, LPCSTR pszName, DWORD dwFlags, LPPROPVARIANT pValue)
static IMimePropertySchemaVtbl prop_schema_vtbl
static HRESULT WINAPI MimeAlloc_ReleaseObjects(IMimeAllocator *iface, ULONG cObjects, IUnknown **prgpUnknown, boolean fFreeArray)
static HRESULT WINAPI MimeMessage_FindNext(IMimeMessage *iface, FINDBODY *pFindBody, HBODY *phBody)
static ULONG WINAPI mime_obj_Release(IUnknown *iface)
static ULONG WINAPI propschema_Release(IMimePropertySchema *iface)
static HRESULT WINAPI MimeBody_GetProp(IMimeBody *iface, LPCSTR pszName, DWORD dwFlags, LPPROPVARIANT pValue)
HRESULT WINAPI MimeOleCreateVirtualStream(IStream **ppStream)
static HRESULT WINAPI MimeSecurity_CheckInit(IMimeSecurity *iface)
static body_t * new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent)
static HRESULT WINAPI MimeBody_SaveToFile(IMimeBody *iface, ENCODINGTYPE ietEncoding, LPCSTR pszFilePath)
static HRESULT WINAPI sub_stream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
static HRESULT WINAPI MimeMessage_SplitMessage(IMimeMessage *iface, ULONG cbMaxPart, IMimeMessageParts **ppParts)
HRESULT MimeAllocator_create(IUnknown *outer, void **obj)
static HRESULT WINAPI propschema_RegisterProperty(IMimePropertySchema *iface, const char *name, DWORD flags, DWORD rownumber, VARTYPE vtdefault, DWORD *propid)
HRESULT WINAPI MimeOleSetCompatMode(DWORD dwMode)
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
static void empty_header_list(struct list *list)
static HRESULT WINAPI MimeSecurity_GetMessageType(IMimeSecurity *iface, const HWND hwndParent, IMimeBody *pBody, DWORD *pdwSecType)
static HRESULT WINAPI MimeBody_GetSizeMax(IMimeBody *iface, ULARGE_INTEGER *pcbSize)
static ULONG WINAPI mime_obj_AddRef(IUnknown *iface)
static HRESULT WINAPI MimeMessage_CreateWebPage(IMimeMessage *iface, IStream *pRootStm, LPWEBPAGEOPTIONS pOptions, IMimeMessageCallback *pCallback, IMoniker **ppMoniker)
static HRESULT copy_headers_to_buf(IStream *stm, char **ptr)
static HRESULT WINAPI MimeBody_DeleteExcept(IMimeBody *iface, ULONG cNames, LPCSTR *prgszName)
static HRESULT WINAPI MimeBody_GetDataHere(IMimeBody *iface, ENCODINGTYPE ietEncoding, IStream *pStream)
static HRESULT WINAPI MimeMessage_IsBodyType(IMimeMessage *iface, HBODY hBody, IMSGBODYTYPE bodytype)
static HRESULT WINAPI MimeMessage_GetBody(IMimeMessage *iface, BODYLOCATION location, HBODY hPivot, HBODY *phBody)
static HRESULT WINAPI MimeMessage_SetTextBody(IMimeMessage *iface, DWORD dwTxtType, ENCODINGTYPE ietEncoding, HBODY hAlternative, IStream *pStream, LPHBODY phBody)
HRESULT MimeMessage_create(IUnknown *outer, void **obj)
static HRESULT WINAPI sub_stream_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
static SIZE_T WINAPI MimeAlloc_GetSize(IMimeAllocator *iface, LPVOID pv)
static HRESULT WINAPI MimeBody_SetPropInfo(IMimeBody *iface, LPCSTR pszName, LPCMIMEPROPINFO pInfo)
static HRESULT WINAPI MimeMessage_Save(IMimeMessage *iface, IStream *pStm, BOOL fClearDirty)