4 * Copyright 2006 Robert Shearman for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
33 #include "wine/debug.h"
35 #include "inetcomm_private.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(inetcomm
);
39 typedef struct MimeBody
41 const IMimeBodyVtbl
*lpVtbl
;
47 static inline MimeBody
*impl_from_IMimeBody( IMimeBody
*iface
)
49 return (MimeBody
*)((char*)iface
- FIELD_OFFSET(MimeBody
, lpVtbl
));
52 static HRESULT WINAPI
MimeBody_QueryInterface(IMimeBody
* iface
,
56 TRACE("(%p)->(%s, %p)\n", iface
, debugstr_guid(riid
), ppvObject
);
60 if (IsEqualIID(riid
, &IID_IUnknown
) ||
61 IsEqualIID(riid
, &IID_IPersist
) ||
62 IsEqualIID(riid
, &IID_IPersistStreamInit
) ||
63 IsEqualIID(riid
, &IID_IMimePropertySet
) ||
64 IsEqualIID(riid
, &IID_IMimeBody
))
71 IUnknown_AddRef((IUnknown
*)*ppvObject
);
75 FIXME("no interface for %s\n", debugstr_guid(riid
));
79 static ULONG WINAPI
MimeBody_AddRef(IMimeBody
* iface
)
81 MimeBody
*This
= impl_from_IMimeBody(iface
);
82 TRACE("(%p)->()\n", iface
);
83 return InterlockedIncrement(&This
->refs
);
86 static ULONG WINAPI
MimeBody_Release(IMimeBody
* iface
)
88 MimeBody
*This
= impl_from_IMimeBody(iface
);
91 TRACE("(%p)->()\n", iface
);
93 refs
= InterlockedDecrement(&This
->refs
);
96 HeapFree(GetProcessHeap(), 0, This
);
102 static HRESULT WINAPI
MimeBody_GetClassID(
111 static HRESULT WINAPI
MimeBody_IsDirty(
118 static HRESULT WINAPI
MimeBody_Load(
122 FIXME("(%p)->(%p): stub\n", iface
, pStm
);
126 static HRESULT WINAPI
MimeBody_Save(
135 static HRESULT WINAPI
MimeBody_GetSizeMax(
137 ULARGE_INTEGER
* pcbSize
)
143 static HRESULT WINAPI
MimeBody_InitNew(
150 static HRESULT WINAPI
MimeBody_GetPropInfo(
153 LPMIMEPROPINFO pInfo
)
159 static HRESULT WINAPI
MimeBody_SetPropInfo(
162 LPCMIMEPROPINFO pInfo
)
168 static HRESULT WINAPI
MimeBody_GetProp(
172 LPPROPVARIANT pValue
)
178 static HRESULT WINAPI
MimeBody_SetProp(
182 LPCPROPVARIANT pValue
)
188 static HRESULT WINAPI
MimeBody_AppendProp(
192 LPPROPVARIANT pValue
)
198 static HRESULT WINAPI
MimeBody_DeleteProp(
206 static HRESULT WINAPI
MimeBody_CopyProps(
210 IMimePropertySet
* pPropertySet
)
216 static HRESULT WINAPI
MimeBody_MoveProps(
220 IMimePropertySet
* pPropertySet
)
226 static HRESULT WINAPI
MimeBody_DeleteExcept(
235 static HRESULT WINAPI
MimeBody_QueryProp(
240 boolean fCaseSensitive
)
246 static HRESULT WINAPI
MimeBody_GetCharset(
248 LPHCHARSET phCharset
)
254 static HRESULT WINAPI
MimeBody_SetCharset(
257 CSETAPPLYTYPE applytype
)
263 static HRESULT WINAPI
MimeBody_GetParameters(
267 LPMIMEPARAMINFO
* pprgParam
)
273 static HRESULT WINAPI
MimeBody_IsContentType(
282 static HRESULT WINAPI
MimeBody_BindToObject(
291 static HRESULT WINAPI
MimeBody_Clone(
293 IMimePropertySet
** ppPropertySet
)
299 static HRESULT WINAPI
MimeBody_SetOption(
302 LPCPROPVARIANT pValue
)
308 static HRESULT WINAPI
MimeBody_GetOption(
311 LPPROPVARIANT pValue
)
317 static HRESULT WINAPI
MimeBody_EnumProps(
320 IMimeEnumProperties
** ppEnum
)
326 static HRESULT WINAPI
MimeBody_IsType(
328 IMSGBODYTYPE bodytype
)
334 static HRESULT WINAPI
MimeBody_SetDisplayName(
342 static HRESULT WINAPI
MimeBody_GetDisplayName(
350 static HRESULT WINAPI
MimeBody_GetOffsets(
352 LPBODYOFFSETS pOffsets
)
358 static HRESULT WINAPI
MimeBody_GetCurrentEncoding(
360 ENCODINGTYPE
* pietEncoding
)
366 static HRESULT WINAPI
MimeBody_SetCurrentEncoding(
368 ENCODINGTYPE ietEncoding
)
374 static HRESULT WINAPI
MimeBody_GetEstimatedSize(
376 ENCODINGTYPE ietEncoding
,
383 static HRESULT WINAPI
MimeBody_GetDataHere(
385 ENCODINGTYPE ietEncoding
,
392 static HRESULT WINAPI
MimeBody_GetData(
394 ENCODINGTYPE ietEncoding
,
401 static HRESULT WINAPI
MimeBody_SetData(
403 ENCODINGTYPE ietEncoding
,
413 static HRESULT WINAPI
MimeBody_EmptyData(
420 static HRESULT WINAPI
MimeBody_CopyTo(
428 static HRESULT WINAPI
MimeBody_GetTransmitInfo(
430 LPTRANSMITINFO pTransmitInfo
)
436 static HRESULT WINAPI
MimeBody_SaveToFile(
438 ENCODINGTYPE ietEncoding
,
445 static HRESULT WINAPI
MimeBody_GetHandle(
449 MimeBody
*This
= impl_from_IMimeBody(iface
);
450 TRACE("(%p)->(%p)\n", iface
, phBody
);
452 *phBody
= This
->handle
;
453 return This
->handle
? S_OK
: MIME_E_NO_DATA
;
456 static IMimeBodyVtbl body_vtbl
=
458 MimeBody_QueryInterface
,
467 MimeBody_GetPropInfo
,
468 MimeBody_SetPropInfo
,
475 MimeBody_DeleteExcept
,
479 MimeBody_GetParameters
,
480 MimeBody_IsContentType
,
481 MimeBody_BindToObject
,
487 MimeBody_SetDisplayName
,
488 MimeBody_GetDisplayName
,
490 MimeBody_GetCurrentEncoding
,
491 MimeBody_SetCurrentEncoding
,
492 MimeBody_GetEstimatedSize
,
493 MimeBody_GetDataHere
,
498 MimeBody_GetTransmitInfo
,
503 HRESULT
MimeBody_create(IUnknown
*outer
, void **obj
)
509 if(outer
) return CLASS_E_NOAGGREGATION
;
511 This
= HeapAlloc(GetProcessHeap(), 0, sizeof(*This
));
512 if (!This
) return E_OUTOFMEMORY
;
514 This
->lpVtbl
= &body_vtbl
;
518 *obj
= (IMimeBody
*)&This
->lpVtbl
;
522 typedef struct MimeMessage
524 const IMimeMessageVtbl
*lpVtbl
;
529 static HRESULT WINAPI
MimeMessage_QueryInterface(IMimeMessage
*iface
, REFIID riid
, void **ppv
)
531 TRACE("(%p)->(%s, %p)\n", iface
, debugstr_guid(riid
), ppv
);
533 if (IsEqualIID(riid
, &IID_IUnknown
) ||
534 IsEqualIID(riid
, &IID_IPersist
) ||
535 IsEqualIID(riid
, &IID_IPersistStreamInit
) ||
536 IsEqualIID(riid
, &IID_IMimeMessageTree
) ||
537 IsEqualIID(riid
, &IID_IMimeMessage
))
540 IUnknown_AddRef(iface
);
544 FIXME("no interface for %s\n", debugstr_guid(riid
));
546 return E_NOINTERFACE
;
549 static ULONG WINAPI
MimeMessage_AddRef(IMimeMessage
*iface
)
551 MimeMessage
*This
= (MimeMessage
*)iface
;
552 TRACE("(%p)->()\n", iface
);
553 return InterlockedIncrement(&This
->refs
);
556 static ULONG WINAPI
MimeMessage_Release(IMimeMessage
*iface
)
558 MimeMessage
*This
= (MimeMessage
*)iface
;
561 TRACE("(%p)->()\n", iface
);
563 refs
= InterlockedDecrement(&This
->refs
);
566 HeapFree(GetProcessHeap(), 0, This
);
572 /*** IPersist methods ***/
573 static HRESULT WINAPI
MimeMessage_GetClassID(
577 FIXME("(%p)->(%p)\n", iface
, pClassID
);
581 /*** IPersistStreamInit methods ***/
582 static HRESULT WINAPI
MimeMessage_IsDirty(
585 FIXME("(%p)->()\n", iface
);
589 static HRESULT WINAPI
MimeMessage_Load(
592 FIXME("(%p)->(%p)\n", iface
, pStm
);
596 static HRESULT WINAPI
MimeMessage_Save(
601 FIXME("(%p)->(%p, %s)\n", iface
, pStm
, fClearDirty
? "TRUE" : "FALSE");
605 static HRESULT WINAPI
MimeMessage_GetSizeMax(
607 ULARGE_INTEGER
*pcbSize
)
609 FIXME("(%p)->(%p)\n", iface
, pcbSize
);
613 static HRESULT WINAPI
MimeMessage_InitNew(
616 FIXME("(%p)->()\n", iface
);
620 /*** IMimeMessageTree methods ***/
621 static HRESULT WINAPI
MimeMessage_GetMessageSource(
626 FIXME("(%p)->(%p, 0x%x)\n", iface
, ppStream
, dwFlags
);
630 static HRESULT WINAPI
MimeMessage_GetMessageSize(
635 FIXME("(%p)->(%p, 0x%x)\n", iface
, pcbSize
, dwFlags
);
639 static HRESULT WINAPI
MimeMessage_LoadOffsetTable(
643 FIXME("(%p)->(%p)\n", iface
, pStream
);
647 static HRESULT WINAPI
MimeMessage_SaveOffsetTable(
652 FIXME("(%p)->(%p, 0x%x)\n", iface
, pStream
, dwFlags
);
657 static HRESULT WINAPI
MimeMessage_GetFlags(
661 FIXME("(%p)->(%p)\n", iface
, pdwFlags
);
665 static HRESULT WINAPI
MimeMessage_Commit(
669 FIXME("(%p)->(0x%x)\n", iface
, dwFlags
);
674 static HRESULT WINAPI
MimeMessage_HandsOffStorage(
677 FIXME("(%p)->()\n", iface
);
681 static HRESULT WINAPI
MimeMessage_BindToObject(
687 FIXME("(%p)->(%p, %s, %p)\n", iface
, hBody
, debugstr_guid(riid
), ppvObject
);
691 static HRESULT WINAPI
MimeMessage_SaveBody(
697 FIXME("(%p)->(%p, 0x%x, %p)\n", iface
, hBody
, dwFlags
, pStream
);
701 static HRESULT WINAPI
MimeMessage_InsertBody(
703 BODYLOCATION location
,
707 FIXME("(%p)->(%d, %p, %p)\n", iface
, location
, hPivot
, phBody
);
711 static HRESULT WINAPI
MimeMessage_GetBody(
713 BODYLOCATION location
,
717 FIXME("(%p)->(%d, %p, %p)\n", iface
, location
, hPivot
, phBody
);
721 static HRESULT WINAPI
MimeMessage_DeleteBody(
726 FIXME("(%p)->(%p, %08x)\n", iface
, hBody
, dwFlags
);
730 static HRESULT WINAPI
MimeMessage_MoveBody(
733 BODYLOCATION location
)
735 FIXME("(%p)->(%d)\n", iface
, location
);
739 static HRESULT WINAPI
MimeMessage_CountBodies(
745 FIXME("(%p)->(%p, %s, %p)\n", iface
, hParent
, fRecurse
? "TRUE" : "FALSE", pcBodies
);
749 static HRESULT WINAPI
MimeMessage_FindFirst(
751 LPFINDBODY pFindBody
,
754 FIXME("(%p)->(%p, %p)\n", iface
, pFindBody
, phBody
);
758 static HRESULT WINAPI
MimeMessage_FindNext(
760 LPFINDBODY pFindBody
,
763 FIXME("(%p)->(%p, %p)\n", iface
, pFindBody
, phBody
);
767 static HRESULT WINAPI
MimeMessage_ResolveURL(
775 FIXME("(%p)->(%p, %s, %s, 0x%x, %p)\n", iface
, hRelated
, pszBase
, pszURL
, dwFlags
, phBody
);
779 static HRESULT WINAPI
MimeMessage_ToMultipart(
785 FIXME("(%p)->(%p, %s, %p)\n", iface
, hBody
, pszSubType
, phMultipart
);
789 static HRESULT WINAPI
MimeMessage_GetBodyOffsets(
792 LPBODYOFFSETS pOffsets
)
794 FIXME("(%p)->(%p, %p)\n", iface
, hBody
, pOffsets
);
798 static HRESULT WINAPI
MimeMessage_GetCharset(
800 LPHCHARSET phCharset
)
802 FIXME("(%p)->(%p)\n", iface
, phCharset
);
806 static HRESULT WINAPI
MimeMessage_SetCharset(
809 CSETAPPLYTYPE applytype
)
811 FIXME("(%p)->(%p, %d)\n", iface
, hCharset
, applytype
);
815 static HRESULT WINAPI
MimeMessage_IsBodyType(
818 IMSGBODYTYPE bodytype
)
820 FIXME("(%p)->(%p, %d)\n", iface
, hBody
, bodytype
);
824 static HRESULT WINAPI
MimeMessage_IsContentType(
830 FIXME("(%p)->(%p, %s, %s)\n", iface
, hBody
, pszPriType
, pszSubType
);
834 static HRESULT WINAPI
MimeMessage_QueryBodyProp(
840 boolean fCaseSensitive
)
842 FIXME("(%p)->(%p, %s, %s, %s, %s)\n", iface
, hBody
, pszName
, pszCriteria
, fSubString
? "TRUE" : "FALSE", fCaseSensitive
? "TRUE" : "FALSE");
846 static HRESULT WINAPI
MimeMessage_GetBodyProp(
851 LPPROPVARIANT pValue
)
853 FIXME("(%p)->(%p, %s, 0x%x, %p)\n", iface
, hBody
, pszName
, dwFlags
, pValue
);
857 static HRESULT WINAPI
MimeMessage_SetBodyProp(
862 LPCPROPVARIANT pValue
)
864 FIXME("(%p)->(%p, %s, 0x%x, %p)\n", iface
, hBody
, pszName
, dwFlags
, pValue
);
868 static HRESULT WINAPI
MimeMessage_DeleteBodyProp(
873 FIXME("(%p)->(%p, %s)\n", iface
, hBody
, pszName
);
877 static HRESULT WINAPI
MimeMessage_SetOption(
880 LPCPROPVARIANT pValue
)
882 FIXME("(%p)->(%d, %p)\n", iface
, oid
, pValue
);
886 static HRESULT WINAPI
MimeMessage_GetOption(
889 LPPROPVARIANT pValue
)
891 FIXME("(%p)->(%d, %p)\n", iface
, oid
, pValue
);
895 /*** IMimeMessage methods ***/
896 static HRESULT WINAPI
MimeMessage_CreateWebPage(
899 LPWEBPAGEOPTIONS pOptions
,
900 IMimeMessageCallback
*pCallback
,
901 IMoniker
**ppMoniker
)
903 FIXME("(%p)->(%p, %p, %p, %p)\n", iface
, pRootStm
, pOptions
, pCallback
, ppMoniker
);
908 static HRESULT WINAPI
MimeMessage_GetProp(
912 LPPROPVARIANT pValue
)
914 FIXME("(%p)->(%s, 0x%x, %p)\n", iface
, pszName
, dwFlags
, pValue
);
918 static HRESULT WINAPI
MimeMessage_SetProp(
922 LPCPROPVARIANT pValue
)
924 FIXME("(%p)->(%s, 0x%x, %p)\n", iface
, pszName
, dwFlags
, pValue
);
928 static HRESULT WINAPI
MimeMessage_DeleteProp(
932 FIXME("(%p)->(%s)\n", iface
, pszName
);
936 static HRESULT WINAPI
MimeMessage_QueryProp(
941 boolean fCaseSensitive
)
943 FIXME("(%p)->(%s, %s, %s, %s)\n", iface
, pszName
, pszCriteria
, fSubString
? "TRUE" : "FALSE", fCaseSensitive
? "TRUE" : "FALSE");
947 static HRESULT WINAPI
MimeMessage_GetTextBody(
950 ENCODINGTYPE ietEncoding
,
954 FIXME("(%p)->(%d, %d, %p, %p)\n", iface
, dwTxtType
, ietEncoding
, pStream
, phBody
);
958 static HRESULT WINAPI
MimeMessage_SetTextBody(
961 ENCODINGTYPE ietEncoding
,
966 FIXME("(%p)->(%d, %d, %p, %p, %p)\n", iface
, dwTxtType
, ietEncoding
, hAlternative
, pStream
, phBody
);
970 static HRESULT WINAPI
MimeMessage_AttachObject(
976 FIXME("(%p)->(%s, %p, %p)\n", iface
, debugstr_guid(riid
), pvObject
, phBody
);
980 static HRESULT WINAPI
MimeMessage_AttachFile(
986 FIXME("(%p)->(%s, %p, %p)\n", iface
, pszFilePath
, pstmFile
, phBody
);
990 static HRESULT WINAPI
MimeMessage_AttachURL(
999 FIXME("(%p)->(%s, %s, 0x%x, %p, %p, %p)\n", iface
, pszBase
, pszURL
, dwFlags
, pstmURL
, ppszCIDURL
, phBody
);
1003 static HRESULT WINAPI
MimeMessage_GetAttachments(
1004 IMimeMessage
*iface
,
1006 LPHBODY
*pprghAttach
)
1008 FIXME("(%p)->(%p, %p)\n", iface
, pcAttach
, pprghAttach
);
1012 static HRESULT WINAPI
MimeMessage_GetAddressTable(
1013 IMimeMessage
*iface
,
1014 IMimeAddressTable
**ppTable
)
1016 FIXME("(%p)->(%p)\n", iface
, ppTable
);
1020 static HRESULT WINAPI
MimeMessage_GetSender(
1021 IMimeMessage
*iface
,
1022 LPADDRESSPROPS pAddress
)
1024 FIXME("(%p)->(%p)\n", iface
, pAddress
);
1028 static HRESULT WINAPI
MimeMessage_GetAddressTypes(
1029 IMimeMessage
*iface
,
1032 LPADDRESSLIST pList
)
1034 FIXME("(%p)->(%d, %d, %p)\n", iface
, dwAdrTypes
, dwProps
, pList
);
1038 static HRESULT WINAPI
MimeMessage_GetAddressFormat(
1039 IMimeMessage
*iface
,
1041 ADDRESSFORMAT format
,
1044 FIXME("(%p)->(%d, %d, %p)\n", iface
, dwAdrTypes
, format
, ppszFormat
);
1048 static HRESULT WINAPI
MimeMessage_EnumAddressTypes(
1049 IMimeMessage
*iface
,
1052 IMimeEnumAddressTypes
**ppEnum
)
1054 FIXME("(%p)->(%d, %d, %p)\n", iface
, dwAdrTypes
, dwProps
, ppEnum
);
1058 static HRESULT WINAPI
MimeMessage_SplitMessage(
1059 IMimeMessage
*iface
,
1061 IMimeMessageParts
**ppParts
)
1063 FIXME("(%p)->(%d, %p)\n", iface
, cbMaxPart
, ppParts
);
1067 static HRESULT WINAPI
MimeMessage_GetRootMoniker(
1068 IMimeMessage
*iface
,
1069 IMoniker
**ppMoniker
)
1071 FIXME("(%p)->(%p)\n", iface
, ppMoniker
);
1075 static const IMimeMessageVtbl MimeMessageVtbl
=
1077 MimeMessage_QueryInterface
,
1079 MimeMessage_Release
,
1080 MimeMessage_GetClassID
,
1081 MimeMessage_IsDirty
,
1084 MimeMessage_GetSizeMax
,
1085 MimeMessage_InitNew
,
1086 MimeMessage_GetMessageSource
,
1087 MimeMessage_GetMessageSize
,
1088 MimeMessage_LoadOffsetTable
,
1089 MimeMessage_SaveOffsetTable
,
1090 MimeMessage_GetFlags
,
1092 MimeMessage_HandsOffStorage
,
1093 MimeMessage_BindToObject
,
1094 MimeMessage_SaveBody
,
1095 MimeMessage_InsertBody
,
1096 MimeMessage_GetBody
,
1097 MimeMessage_DeleteBody
,
1098 MimeMessage_MoveBody
,
1099 MimeMessage_CountBodies
,
1100 MimeMessage_FindFirst
,
1101 MimeMessage_FindNext
,
1102 MimeMessage_ResolveURL
,
1103 MimeMessage_ToMultipart
,
1104 MimeMessage_GetBodyOffsets
,
1105 MimeMessage_GetCharset
,
1106 MimeMessage_SetCharset
,
1107 MimeMessage_IsBodyType
,
1108 MimeMessage_IsContentType
,
1109 MimeMessage_QueryBodyProp
,
1110 MimeMessage_GetBodyProp
,
1111 MimeMessage_SetBodyProp
,
1112 MimeMessage_DeleteBodyProp
,
1113 MimeMessage_SetOption
,
1114 MimeMessage_GetOption
,
1115 MimeMessage_CreateWebPage
,
1116 MimeMessage_GetProp
,
1117 MimeMessage_SetProp
,
1118 MimeMessage_DeleteProp
,
1119 MimeMessage_QueryProp
,
1120 MimeMessage_GetTextBody
,
1121 MimeMessage_SetTextBody
,
1122 MimeMessage_AttachObject
,
1123 MimeMessage_AttachFile
,
1124 MimeMessage_AttachURL
,
1125 MimeMessage_GetAttachments
,
1126 MimeMessage_GetAddressTable
,
1127 MimeMessage_GetSender
,
1128 MimeMessage_GetAddressTypes
,
1129 MimeMessage_GetAddressFormat
,
1130 MimeMessage_EnumAddressTypes
,
1131 MimeMessage_SplitMessage
,
1132 MimeMessage_GetRootMoniker
,
1135 /***********************************************************************
1136 * MimeOleCreateMessage (INETCOMM.@)
1138 HRESULT WINAPI
MimeOleCreateMessage(IUnknown
*pUnkOuter
, IMimeMessage
**ppMessage
)
1142 TRACE("(%p, %p)\n", pUnkOuter
, ppMessage
);
1146 FIXME("outer unknown not supported yet\n");
1152 This
= HeapAlloc(GetProcessHeap(), 0, sizeof(*This
));
1153 if (!This
) return E_OUTOFMEMORY
;
1155 This
->lpVtbl
= &MimeMessageVtbl
;
1158 *ppMessage
= (IMimeMessage
*)&This
->lpVtbl
;
1162 /***********************************************************************
1163 * MimeOleSetCompatMode (INETCOMM.@)
1165 HRESULT WINAPI
MimeOleSetCompatMode(DWORD dwMode
)
1167 FIXME("(0x%x)\n", dwMode
);
1171 /***********************************************************************
1172 * MimeOleCreateVirtualStream (INETCOMM.@)
1174 HRESULT WINAPI
MimeOleCreateVirtualStream(IStream
**ppStream
)
1177 FIXME("(%p)\n", ppStream
);
1179 hr
= CreateStreamOnHGlobal(NULL
, TRUE
, ppStream
);
1183 typedef struct MimeSecurity
1185 const IMimeSecurityVtbl
*lpVtbl
;
1190 static HRESULT WINAPI
MimeSecurity_QueryInterface(
1191 IMimeSecurity
* iface
,
1195 TRACE("(%p)->(%s, %p)\n", iface
, debugstr_guid(riid
), obj
);
1197 if (IsEqualIID(riid
, &IID_IUnknown
) ||
1198 IsEqualIID(riid
, &IID_IMimeSecurity
))
1201 IUnknown_AddRef(iface
);
1205 FIXME("no interface for %s\n", debugstr_guid(riid
));
1207 return E_NOINTERFACE
;
1210 static ULONG WINAPI
MimeSecurity_AddRef(
1211 IMimeSecurity
* iface
)
1213 MimeSecurity
*This
= (MimeSecurity
*)iface
;
1214 TRACE("(%p)->()\n", iface
);
1215 return InterlockedIncrement(&This
->refs
);
1218 static ULONG WINAPI
MimeSecurity_Release(
1219 IMimeSecurity
* iface
)
1221 MimeSecurity
*This
= (MimeSecurity
*)iface
;
1224 TRACE("(%p)->()\n", iface
);
1226 refs
= InterlockedDecrement(&This
->refs
);
1229 HeapFree(GetProcessHeap(), 0, This
);
1235 static HRESULT WINAPI
MimeSecurity_InitNew(
1236 IMimeSecurity
* iface
)
1238 FIXME("(%p)->(): stub\n", iface
);
1242 static HRESULT WINAPI
MimeSecurity_CheckInit(
1243 IMimeSecurity
* iface
)
1245 FIXME("(%p)->(): stub\n", iface
);
1249 static HRESULT WINAPI
MimeSecurity_EncodeMessage(
1250 IMimeSecurity
* iface
,
1251 IMimeMessageTree
* pTree
,
1254 FIXME("(%p)->(%p, %08x): stub\n", iface
, pTree
, dwFlags
);
1258 static HRESULT WINAPI
MimeSecurity_EncodeBody(
1259 IMimeSecurity
* iface
,
1260 IMimeMessageTree
* pTree
,
1264 FIXME("(%p)->(%p, %p, %08x): stub\n", iface
, pTree
, hEncodeRoot
, dwFlags
);
1268 static HRESULT WINAPI
MimeSecurity_DecodeMessage(
1269 IMimeSecurity
* iface
,
1270 IMimeMessageTree
* pTree
,
1273 FIXME("(%p)->(%p, %08x): stub\n", iface
, pTree
, dwFlags
);
1277 static HRESULT WINAPI
MimeSecurity_DecodeBody(
1278 IMimeSecurity
* iface
,
1279 IMimeMessageTree
* pTree
,
1283 FIXME("(%p)->(%p, %p, %08x): stub\n", iface
, pTree
, hDecodeRoot
, dwFlags
);
1287 static HRESULT WINAPI
MimeSecurity_EnumCertificates(
1288 IMimeSecurity
* iface
,
1294 FIXME("(%p)->(%p, %08x, %p, %p): stub\n", iface
, hc
, dwUsage
, pPrev
, ppCert
);
1298 static HRESULT WINAPI
MimeSecurity_GetCertificateName(
1299 IMimeSecurity
* iface
,
1300 const PCX509CERT pX509Cert
,
1301 const CERTNAMETYPE cn
,
1304 FIXME("(%p)->(%p, %08x, %p): stub\n", iface
, pX509Cert
, cn
, ppszName
);
1308 static HRESULT WINAPI
MimeSecurity_GetMessageType(
1309 IMimeSecurity
* iface
,
1310 const HWND hwndParent
,
1314 FIXME("(%p)->(%p, %p, %p): stub\n", iface
, hwndParent
, pBody
, pdwSecType
);
1318 static HRESULT WINAPI
MimeSecurity_GetCertData(
1319 IMimeSecurity
* iface
,
1320 const PCX509CERT pX509Cert
,
1321 const CERTDATAID dataid
,
1322 LPPROPVARIANT pValue
)
1324 FIXME("(%p)->(%p, %x, %p): stub\n", iface
, pX509Cert
, dataid
, pValue
);
1329 static const IMimeSecurityVtbl MimeSecurityVtbl
=
1331 MimeSecurity_QueryInterface
,
1332 MimeSecurity_AddRef
,
1333 MimeSecurity_Release
,
1334 MimeSecurity_InitNew
,
1335 MimeSecurity_CheckInit
,
1336 MimeSecurity_EncodeMessage
,
1337 MimeSecurity_EncodeBody
,
1338 MimeSecurity_DecodeMessage
,
1339 MimeSecurity_DecodeBody
,
1340 MimeSecurity_EnumCertificates
,
1341 MimeSecurity_GetCertificateName
,
1342 MimeSecurity_GetMessageType
,
1343 MimeSecurity_GetCertData
1346 /***********************************************************************
1347 * MimeOleCreateSecurity (INETCOMM.@)
1349 HRESULT WINAPI
MimeOleCreateSecurity(IMimeSecurity
**ppSecurity
)
1353 TRACE("(%p)\n", ppSecurity
);
1357 This
= HeapAlloc(GetProcessHeap(), 0, sizeof(*This
));
1358 if (!This
) return E_OUTOFMEMORY
;
1360 This
->lpVtbl
= &MimeSecurityVtbl
;
1363 *ppSecurity
= (IMimeSecurity
*)&This
->lpVtbl
;