push caf8822204667872e3963bc36483c261826f5ad2
[wine/hacks.git] / dlls / inetcomm / mimeole.c
blob56ee5d95748e4d7d3a4888d115b4bc030d75efb3
1 /*
2 * MIME OLE Interfaces
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
21 #define COBJMACROS
23 #include <stdarg.h>
24 #include <stdio.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "objbase.h"
30 #include "ole2.h"
31 #include "mimeole.h"
33 #include "wine/debug.h"
35 #include "inetcomm_private.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
39 typedef struct MimeBody
41 const IMimeBodyVtbl *lpVtbl;
42 LONG refs;
44 HBODY handle;
45 } MimeBody;
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,
53 REFIID riid,
54 void** ppvObject)
56 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObject);
58 *ppvObject = NULL;
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))
66 *ppvObject = iface;
69 if(*ppvObject)
71 IUnknown_AddRef((IUnknown*)*ppvObject);
72 return S_OK;
75 FIXME("no interface for %s\n", debugstr_guid(riid));
76 return E_NOINTERFACE;
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);
89 ULONG refs;
91 TRACE("(%p)->()\n", iface);
93 refs = InterlockedDecrement(&This->refs);
94 if (!refs)
96 HeapFree(GetProcessHeap(), 0, This);
99 return refs;
102 static HRESULT WINAPI MimeBody_GetClassID(
103 IMimeBody* iface,
104 CLSID* pClassID)
106 FIXME("stub\n");
107 return E_NOTIMPL;
111 static HRESULT WINAPI MimeBody_IsDirty(
112 IMimeBody* iface)
114 FIXME("stub\n");
115 return E_NOTIMPL;
118 static HRESULT WINAPI MimeBody_Load(
119 IMimeBody* iface,
120 LPSTREAM pStm)
122 FIXME("(%p)->(%p): stub\n", iface, pStm);
123 return E_NOTIMPL;
126 static HRESULT WINAPI MimeBody_Save(
127 IMimeBody* iface,
128 LPSTREAM pStm,
129 BOOL fClearDirty)
131 FIXME("stub\n");
132 return E_NOTIMPL;
135 static HRESULT WINAPI MimeBody_GetSizeMax(
136 IMimeBody* iface,
137 ULARGE_INTEGER* pcbSize)
139 FIXME("stub\n");
140 return E_NOTIMPL;
143 static HRESULT WINAPI MimeBody_InitNew(
144 IMimeBody* iface)
146 FIXME("stub\n");
147 return E_NOTIMPL;
150 static HRESULT WINAPI MimeBody_GetPropInfo(
151 IMimeBody* iface,
152 LPCSTR pszName,
153 LPMIMEPROPINFO pInfo)
155 FIXME("stub\n");
156 return E_NOTIMPL;
159 static HRESULT WINAPI MimeBody_SetPropInfo(
160 IMimeBody* iface,
161 LPCSTR pszName,
162 LPCMIMEPROPINFO pInfo)
164 FIXME("stub\n");
165 return E_NOTIMPL;
168 static HRESULT WINAPI MimeBody_GetProp(
169 IMimeBody* iface,
170 LPCSTR pszName,
171 DWORD dwFlags,
172 LPPROPVARIANT pValue)
174 FIXME("stub\n");
175 return E_NOTIMPL;
178 static HRESULT WINAPI MimeBody_SetProp(
179 IMimeBody* iface,
180 LPCSTR pszName,
181 DWORD dwFlags,
182 LPCPROPVARIANT pValue)
184 FIXME("stub\n");
185 return E_NOTIMPL;
188 static HRESULT WINAPI MimeBody_AppendProp(
189 IMimeBody* iface,
190 LPCSTR pszName,
191 DWORD dwFlags,
192 LPPROPVARIANT pValue)
194 FIXME("stub\n");
195 return E_NOTIMPL;
198 static HRESULT WINAPI MimeBody_DeleteProp(
199 IMimeBody* iface,
200 LPCSTR pszName)
202 FIXME("stub\n");
203 return E_NOTIMPL;
206 static HRESULT WINAPI MimeBody_CopyProps(
207 IMimeBody* iface,
208 ULONG cNames,
209 LPCSTR* prgszName,
210 IMimePropertySet* pPropertySet)
212 FIXME("stub\n");
213 return E_NOTIMPL;
216 static HRESULT WINAPI MimeBody_MoveProps(
217 IMimeBody* iface,
218 ULONG cNames,
219 LPCSTR* prgszName,
220 IMimePropertySet* pPropertySet)
222 FIXME("stub\n");
223 return E_NOTIMPL;
226 static HRESULT WINAPI MimeBody_DeleteExcept(
227 IMimeBody* iface,
228 ULONG cNames,
229 LPCSTR* prgszName)
231 FIXME("stub\n");
232 return E_NOTIMPL;
235 static HRESULT WINAPI MimeBody_QueryProp(
236 IMimeBody* iface,
237 LPCSTR pszName,
238 LPCSTR pszCriteria,
239 boolean fSubString,
240 boolean fCaseSensitive)
242 FIXME("stub\n");
243 return E_NOTIMPL;
246 static HRESULT WINAPI MimeBody_GetCharset(
247 IMimeBody* iface,
248 LPHCHARSET phCharset)
250 FIXME("stub\n");
251 return E_NOTIMPL;
254 static HRESULT WINAPI MimeBody_SetCharset(
255 IMimeBody* iface,
256 HCHARSET hCharset,
257 CSETAPPLYTYPE applytype)
259 FIXME("stub\n");
260 return E_NOTIMPL;
263 static HRESULT WINAPI MimeBody_GetParameters(
264 IMimeBody* iface,
265 LPCSTR pszName,
266 ULONG* pcParams,
267 LPMIMEPARAMINFO* pprgParam)
269 FIXME("stub\n");
270 return E_NOTIMPL;
273 static HRESULT WINAPI MimeBody_IsContentType(
274 IMimeBody* iface,
275 LPCSTR pszPriType,
276 LPCSTR pszSubType)
278 FIXME("stub\n");
279 return E_NOTIMPL;
282 static HRESULT WINAPI MimeBody_BindToObject(
283 IMimeBody* iface,
284 REFIID riid,
285 void** ppvObject)
287 FIXME("stub\n");
288 return E_NOTIMPL;
291 static HRESULT WINAPI MimeBody_Clone(
292 IMimeBody* iface,
293 IMimePropertySet** ppPropertySet)
295 FIXME("stub\n");
296 return E_NOTIMPL;
299 static HRESULT WINAPI MimeBody_SetOption(
300 IMimeBody* iface,
301 const TYPEDID oid,
302 LPCPROPVARIANT pValue)
304 FIXME("stub\n");
305 return E_NOTIMPL;
308 static HRESULT WINAPI MimeBody_GetOption(
309 IMimeBody* iface,
310 const TYPEDID oid,
311 LPPROPVARIANT pValue)
313 FIXME("stub\n");
314 return E_NOTIMPL;
317 static HRESULT WINAPI MimeBody_EnumProps(
318 IMimeBody* iface,
319 DWORD dwFlags,
320 IMimeEnumProperties** ppEnum)
322 FIXME("stub\n");
323 return E_NOTIMPL;
326 static HRESULT WINAPI MimeBody_IsType(
327 IMimeBody* iface,
328 IMSGBODYTYPE bodytype)
330 FIXME("stub\n");
331 return E_NOTIMPL;
334 static HRESULT WINAPI MimeBody_SetDisplayName(
335 IMimeBody* iface,
336 LPCSTR pszDisplay)
338 FIXME("stub\n");
339 return E_NOTIMPL;
342 static HRESULT WINAPI MimeBody_GetDisplayName(
343 IMimeBody* iface,
344 LPSTR* ppszDisplay)
346 FIXME("stub\n");
347 return E_NOTIMPL;
350 static HRESULT WINAPI MimeBody_GetOffsets(
351 IMimeBody* iface,
352 LPBODYOFFSETS pOffsets)
354 FIXME("stub\n");
355 return E_NOTIMPL;
358 static HRESULT WINAPI MimeBody_GetCurrentEncoding(
359 IMimeBody* iface,
360 ENCODINGTYPE* pietEncoding)
362 FIXME("stub\n");
363 return E_NOTIMPL;
366 static HRESULT WINAPI MimeBody_SetCurrentEncoding(
367 IMimeBody* iface,
368 ENCODINGTYPE ietEncoding)
370 FIXME("stub\n");
371 return E_NOTIMPL;
374 static HRESULT WINAPI MimeBody_GetEstimatedSize(
375 IMimeBody* iface,
376 ENCODINGTYPE ietEncoding,
377 ULONG* pcbSize)
379 FIXME("stub\n");
380 return E_NOTIMPL;
383 static HRESULT WINAPI MimeBody_GetDataHere(
384 IMimeBody* iface,
385 ENCODINGTYPE ietEncoding,
386 IStream* pStream)
388 FIXME("stub\n");
389 return E_NOTIMPL;
392 static HRESULT WINAPI MimeBody_GetData(
393 IMimeBody* iface,
394 ENCODINGTYPE ietEncoding,
395 IStream** ppStream)
397 FIXME("stub\n");
398 return E_NOTIMPL;
401 static HRESULT WINAPI MimeBody_SetData(
402 IMimeBody* iface,
403 ENCODINGTYPE ietEncoding,
404 LPCSTR pszPriType,
405 LPCSTR pszSubType,
406 REFIID riid,
407 LPVOID pvObject)
409 FIXME("stub\n");
410 return E_NOTIMPL;
413 static HRESULT WINAPI MimeBody_EmptyData(
414 IMimeBody* iface)
416 FIXME("stub\n");
417 return E_NOTIMPL;
420 static HRESULT WINAPI MimeBody_CopyTo(
421 IMimeBody* iface,
422 IMimeBody* pBody)
424 FIXME("stub\n");
425 return E_NOTIMPL;
428 static HRESULT WINAPI MimeBody_GetTransmitInfo(
429 IMimeBody* iface,
430 LPTRANSMITINFO pTransmitInfo)
432 FIXME("stub\n");
433 return E_NOTIMPL;
436 static HRESULT WINAPI MimeBody_SaveToFile(
437 IMimeBody* iface,
438 ENCODINGTYPE ietEncoding,
439 LPCSTR pszFilePath)
441 FIXME("stub\n");
442 return E_NOTIMPL;
445 static HRESULT WINAPI MimeBody_GetHandle(
446 IMimeBody* iface,
447 LPHBODY phBody)
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,
459 MimeBody_AddRef,
460 MimeBody_Release,
461 MimeBody_GetClassID,
462 MimeBody_IsDirty,
463 MimeBody_Load,
464 MimeBody_Save,
465 MimeBody_GetSizeMax,
466 MimeBody_InitNew,
467 MimeBody_GetPropInfo,
468 MimeBody_SetPropInfo,
469 MimeBody_GetProp,
470 MimeBody_SetProp,
471 MimeBody_AppendProp,
472 MimeBody_DeleteProp,
473 MimeBody_CopyProps,
474 MimeBody_MoveProps,
475 MimeBody_DeleteExcept,
476 MimeBody_QueryProp,
477 MimeBody_GetCharset,
478 MimeBody_SetCharset,
479 MimeBody_GetParameters,
480 MimeBody_IsContentType,
481 MimeBody_BindToObject,
482 MimeBody_Clone,
483 MimeBody_SetOption,
484 MimeBody_GetOption,
485 MimeBody_EnumProps,
486 MimeBody_IsType,
487 MimeBody_SetDisplayName,
488 MimeBody_GetDisplayName,
489 MimeBody_GetOffsets,
490 MimeBody_GetCurrentEncoding,
491 MimeBody_SetCurrentEncoding,
492 MimeBody_GetEstimatedSize,
493 MimeBody_GetDataHere,
494 MimeBody_GetData,
495 MimeBody_SetData,
496 MimeBody_EmptyData,
497 MimeBody_CopyTo,
498 MimeBody_GetTransmitInfo,
499 MimeBody_SaveToFile,
500 MimeBody_GetHandle
503 HRESULT MimeBody_create(IUnknown *outer, void **obj)
505 MimeBody *This;
507 *obj = NULL;
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;
515 This->refs = 1;
516 This->handle = NULL;
518 *obj = (IMimeBody *)&This->lpVtbl;
519 return S_OK;
522 typedef struct MimeMessage
524 const IMimeMessageVtbl *lpVtbl;
526 LONG refs;
527 } MimeMessage;
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))
539 *ppv = iface;
540 IUnknown_AddRef(iface);
541 return S_OK;
544 FIXME("no interface for %s\n", debugstr_guid(riid));
545 *ppv = NULL;
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;
559 ULONG refs;
561 TRACE("(%p)->()\n", iface);
563 refs = InterlockedDecrement(&This->refs);
564 if (!refs)
566 HeapFree(GetProcessHeap(), 0, This);
569 return refs;
572 /*** IPersist methods ***/
573 static HRESULT WINAPI MimeMessage_GetClassID(
574 IMimeMessage *iface,
575 CLSID *pClassID)
577 FIXME("(%p)->(%p)\n", iface, pClassID);
578 return E_NOTIMPL;
581 /*** IPersistStreamInit methods ***/
582 static HRESULT WINAPI MimeMessage_IsDirty(
583 IMimeMessage *iface)
585 FIXME("(%p)->()\n", iface);
586 return E_NOTIMPL;
589 static HRESULT WINAPI MimeMessage_Load(
590 IMimeMessage *iface,
591 LPSTREAM pStm){
592 FIXME("(%p)->(%p)\n", iface, pStm);
593 return E_NOTIMPL;
596 static HRESULT WINAPI MimeMessage_Save(
597 IMimeMessage *iface,
598 LPSTREAM pStm,
599 BOOL fClearDirty)
601 FIXME("(%p)->(%p, %s)\n", iface, pStm, fClearDirty ? "TRUE" : "FALSE");
602 return E_NOTIMPL;
605 static HRESULT WINAPI MimeMessage_GetSizeMax(
606 IMimeMessage *iface,
607 ULARGE_INTEGER *pcbSize)
609 FIXME("(%p)->(%p)\n", iface, pcbSize);
610 return E_NOTIMPL;
613 static HRESULT WINAPI MimeMessage_InitNew(
614 IMimeMessage *iface)
616 FIXME("(%p)->()\n", iface);
617 return E_NOTIMPL;
620 /*** IMimeMessageTree methods ***/
621 static HRESULT WINAPI MimeMessage_GetMessageSource(
622 IMimeMessage *iface,
623 IStream **ppStream,
624 DWORD dwFlags)
626 FIXME("(%p)->(%p, 0x%x)\n", iface, ppStream, dwFlags);
627 return E_NOTIMPL;
630 static HRESULT WINAPI MimeMessage_GetMessageSize(
631 IMimeMessage *iface,
632 ULONG *pcbSize,
633 DWORD dwFlags)
635 FIXME("(%p)->(%p, 0x%x)\n", iface, pcbSize, dwFlags);
636 return E_NOTIMPL;
639 static HRESULT WINAPI MimeMessage_LoadOffsetTable(
640 IMimeMessage *iface,
641 IStream *pStream)
643 FIXME("(%p)->(%p)\n", iface, pStream);
644 return E_NOTIMPL;
647 static HRESULT WINAPI MimeMessage_SaveOffsetTable(
648 IMimeMessage *iface,
649 IStream *pStream,
650 DWORD dwFlags)
652 FIXME("(%p)->(%p, 0x%x)\n", iface, pStream, dwFlags);
653 return E_NOTIMPL;
657 static HRESULT WINAPI MimeMessage_GetFlags(
658 IMimeMessage *iface,
659 DWORD *pdwFlags)
661 FIXME("(%p)->(%p)\n", iface, pdwFlags);
662 return E_NOTIMPL;
665 static HRESULT WINAPI MimeMessage_Commit(
666 IMimeMessage *iface,
667 DWORD dwFlags)
669 FIXME("(%p)->(0x%x)\n", iface, dwFlags);
670 return E_NOTIMPL;
674 static HRESULT WINAPI MimeMessage_HandsOffStorage(
675 IMimeMessage *iface)
677 FIXME("(%p)->()\n", iface);
678 return E_NOTIMPL;
681 static HRESULT WINAPI MimeMessage_BindToObject(
682 IMimeMessage *iface,
683 const HBODY hBody,
684 REFIID riid,
685 void **ppvObject)
687 FIXME("(%p)->(%p, %s, %p)\n", iface, hBody, debugstr_guid(riid), ppvObject);
688 return E_NOTIMPL;
691 static HRESULT WINAPI MimeMessage_SaveBody(
692 IMimeMessage *iface,
693 HBODY hBody,
694 DWORD dwFlags,
695 IStream *pStream)
697 FIXME("(%p)->(%p, 0x%x, %p)\n", iface, hBody, dwFlags, pStream);
698 return E_NOTIMPL;
701 static HRESULT WINAPI MimeMessage_InsertBody(
702 IMimeMessage *iface,
703 BODYLOCATION location,
704 HBODY hPivot,
705 LPHBODY phBody)
707 FIXME("(%p)->(%d, %p, %p)\n", iface, location, hPivot, phBody);
708 return E_NOTIMPL;
711 static HRESULT WINAPI MimeMessage_GetBody(
712 IMimeMessage *iface,
713 BODYLOCATION location,
714 HBODY hPivot,
715 LPHBODY phBody)
717 FIXME("(%p)->(%d, %p, %p)\n", iface, location, hPivot, phBody);
718 return E_NOTIMPL;
721 static HRESULT WINAPI MimeMessage_DeleteBody(
722 IMimeMessage *iface,
723 HBODY hBody,
724 DWORD dwFlags)
726 FIXME("(%p)->(%p, %08x)\n", iface, hBody, dwFlags);
727 return E_NOTIMPL;
730 static HRESULT WINAPI MimeMessage_MoveBody(
731 IMimeMessage *iface,
732 HBODY hBody,
733 BODYLOCATION location)
735 FIXME("(%p)->(%d)\n", iface, location);
736 return E_NOTIMPL;
739 static HRESULT WINAPI MimeMessage_CountBodies(
740 IMimeMessage *iface,
741 HBODY hParent,
742 boolean fRecurse,
743 ULONG *pcBodies)
745 FIXME("(%p)->(%p, %s, %p)\n", iface, hParent, fRecurse ? "TRUE" : "FALSE", pcBodies);
746 return E_NOTIMPL;
749 static HRESULT WINAPI MimeMessage_FindFirst(
750 IMimeMessage *iface,
751 LPFINDBODY pFindBody,
752 LPHBODY phBody)
754 FIXME("(%p)->(%p, %p)\n", iface, pFindBody, phBody);
755 return E_NOTIMPL;
758 static HRESULT WINAPI MimeMessage_FindNext(
759 IMimeMessage *iface,
760 LPFINDBODY pFindBody,
761 LPHBODY phBody)
763 FIXME("(%p)->(%p, %p)\n", iface, pFindBody, phBody);
764 return E_NOTIMPL;
767 static HRESULT WINAPI MimeMessage_ResolveURL(
768 IMimeMessage *iface,
769 HBODY hRelated,
770 LPCSTR pszBase,
771 LPCSTR pszURL,
772 DWORD dwFlags,
773 LPHBODY phBody)
775 FIXME("(%p)->(%p, %s, %s, 0x%x, %p)\n", iface, hRelated, pszBase, pszURL, dwFlags, phBody);
776 return E_NOTIMPL;
779 static HRESULT WINAPI MimeMessage_ToMultipart(
780 IMimeMessage *iface,
781 HBODY hBody,
782 LPCSTR pszSubType,
783 LPHBODY phMultipart)
785 FIXME("(%p)->(%p, %s, %p)\n", iface, hBody, pszSubType, phMultipart);
786 return E_NOTIMPL;
789 static HRESULT WINAPI MimeMessage_GetBodyOffsets(
790 IMimeMessage *iface,
791 HBODY hBody,
792 LPBODYOFFSETS pOffsets)
794 FIXME("(%p)->(%p, %p)\n", iface, hBody, pOffsets);
795 return E_NOTIMPL;
798 static HRESULT WINAPI MimeMessage_GetCharset(
799 IMimeMessage *iface,
800 LPHCHARSET phCharset)
802 FIXME("(%p)->(%p)\n", iface, phCharset);
803 return E_NOTIMPL;
806 static HRESULT WINAPI MimeMessage_SetCharset(
807 IMimeMessage *iface,
808 HCHARSET hCharset,
809 CSETAPPLYTYPE applytype)
811 FIXME("(%p)->(%p, %d)\n", iface, hCharset, applytype);
812 return E_NOTIMPL;
815 static HRESULT WINAPI MimeMessage_IsBodyType(
816 IMimeMessage *iface,
817 HBODY hBody,
818 IMSGBODYTYPE bodytype)
820 FIXME("(%p)->(%p, %d)\n", iface, hBody, bodytype);
821 return E_NOTIMPL;
824 static HRESULT WINAPI MimeMessage_IsContentType(
825 IMimeMessage *iface,
826 HBODY hBody,
827 LPCSTR pszPriType,
828 LPCSTR pszSubType)
830 FIXME("(%p)->(%p, %s, %s)\n", iface, hBody, pszPriType, pszSubType);
831 return E_NOTIMPL;
834 static HRESULT WINAPI MimeMessage_QueryBodyProp(
835 IMimeMessage *iface,
836 HBODY hBody,
837 LPCSTR pszName,
838 LPCSTR pszCriteria,
839 boolean fSubString,
840 boolean fCaseSensitive)
842 FIXME("(%p)->(%p, %s, %s, %s, %s)\n", iface, hBody, pszName, pszCriteria, fSubString ? "TRUE" : "FALSE", fCaseSensitive ? "TRUE" : "FALSE");
843 return E_NOTIMPL;
846 static HRESULT WINAPI MimeMessage_GetBodyProp(
847 IMimeMessage *iface,
848 HBODY hBody,
849 LPCSTR pszName,
850 DWORD dwFlags,
851 LPPROPVARIANT pValue)
853 FIXME("(%p)->(%p, %s, 0x%x, %p)\n", iface, hBody, pszName, dwFlags, pValue);
854 return E_NOTIMPL;
857 static HRESULT WINAPI MimeMessage_SetBodyProp(
858 IMimeMessage *iface,
859 HBODY hBody,
860 LPCSTR pszName,
861 DWORD dwFlags,
862 LPCPROPVARIANT pValue)
864 FIXME("(%p)->(%p, %s, 0x%x, %p)\n", iface, hBody, pszName, dwFlags, pValue);
865 return E_NOTIMPL;
868 static HRESULT WINAPI MimeMessage_DeleteBodyProp(
869 IMimeMessage *iface,
870 HBODY hBody,
871 LPCSTR pszName)
873 FIXME("(%p)->(%p, %s)\n", iface, hBody, pszName);
874 return E_NOTIMPL;
877 static HRESULT WINAPI MimeMessage_SetOption(
878 IMimeMessage *iface,
879 const TYPEDID oid,
880 LPCPROPVARIANT pValue)
882 FIXME("(%p)->(%d, %p)\n", iface, oid, pValue);
883 return E_NOTIMPL;
886 static HRESULT WINAPI MimeMessage_GetOption(
887 IMimeMessage *iface,
888 const TYPEDID oid,
889 LPPROPVARIANT pValue)
891 FIXME("(%p)->(%d, %p)\n", iface, oid, pValue);
892 return E_NOTIMPL;
895 /*** IMimeMessage methods ***/
896 static HRESULT WINAPI MimeMessage_CreateWebPage(
897 IMimeMessage *iface,
898 IStream *pRootStm,
899 LPWEBPAGEOPTIONS pOptions,
900 IMimeMessageCallback *pCallback,
901 IMoniker **ppMoniker)
903 FIXME("(%p)->(%p, %p, %p, %p)\n", iface, pRootStm, pOptions, pCallback, ppMoniker);
904 *ppMoniker = NULL;
905 return E_NOTIMPL;
908 static HRESULT WINAPI MimeMessage_GetProp(
909 IMimeMessage *iface,
910 LPCSTR pszName,
911 DWORD dwFlags,
912 LPPROPVARIANT pValue)
914 FIXME("(%p)->(%s, 0x%x, %p)\n", iface, pszName, dwFlags, pValue);
915 return E_NOTIMPL;
918 static HRESULT WINAPI MimeMessage_SetProp(
919 IMimeMessage *iface,
920 LPCSTR pszName,
921 DWORD dwFlags,
922 LPCPROPVARIANT pValue)
924 FIXME("(%p)->(%s, 0x%x, %p)\n", iface, pszName, dwFlags, pValue);
925 return E_NOTIMPL;
928 static HRESULT WINAPI MimeMessage_DeleteProp(
929 IMimeMessage *iface,
930 LPCSTR pszName)
932 FIXME("(%p)->(%s)\n", iface, pszName);
933 return E_NOTIMPL;
936 static HRESULT WINAPI MimeMessage_QueryProp(
937 IMimeMessage *iface,
938 LPCSTR pszName,
939 LPCSTR pszCriteria,
940 boolean fSubString,
941 boolean fCaseSensitive)
943 FIXME("(%p)->(%s, %s, %s, %s)\n", iface, pszName, pszCriteria, fSubString ? "TRUE" : "FALSE", fCaseSensitive ? "TRUE" : "FALSE");
944 return E_NOTIMPL;
947 static HRESULT WINAPI MimeMessage_GetTextBody(
948 IMimeMessage *iface,
949 DWORD dwTxtType,
950 ENCODINGTYPE ietEncoding,
951 IStream **pStream,
952 LPHBODY phBody)
954 FIXME("(%p)->(%d, %d, %p, %p)\n", iface, dwTxtType, ietEncoding, pStream, phBody);
955 return E_NOTIMPL;
958 static HRESULT WINAPI MimeMessage_SetTextBody(
959 IMimeMessage *iface,
960 DWORD dwTxtType,
961 ENCODINGTYPE ietEncoding,
962 HBODY hAlternative,
963 IStream *pStream,
964 LPHBODY phBody)
966 FIXME("(%p)->(%d, %d, %p, %p, %p)\n", iface, dwTxtType, ietEncoding, hAlternative, pStream, phBody);
967 return E_NOTIMPL;
970 static HRESULT WINAPI MimeMessage_AttachObject(
971 IMimeMessage *iface,
972 REFIID riid,
973 void *pvObject,
974 LPHBODY phBody)
976 FIXME("(%p)->(%s, %p, %p)\n", iface, debugstr_guid(riid), pvObject, phBody);
977 return E_NOTIMPL;
980 static HRESULT WINAPI MimeMessage_AttachFile(
981 IMimeMessage *iface,
982 LPCSTR pszFilePath,
983 IStream *pstmFile,
984 LPHBODY phBody)
986 FIXME("(%p)->(%s, %p, %p)\n", iface, pszFilePath, pstmFile, phBody);
987 return E_NOTIMPL;
990 static HRESULT WINAPI MimeMessage_AttachURL(
991 IMimeMessage *iface,
992 LPCSTR pszBase,
993 LPCSTR pszURL,
994 DWORD dwFlags,
995 IStream *pstmURL,
996 LPSTR *ppszCIDURL,
997 LPHBODY phBody)
999 FIXME("(%p)->(%s, %s, 0x%x, %p, %p, %p)\n", iface, pszBase, pszURL, dwFlags, pstmURL, ppszCIDURL, phBody);
1000 return E_NOTIMPL;
1003 static HRESULT WINAPI MimeMessage_GetAttachments(
1004 IMimeMessage *iface,
1005 ULONG *pcAttach,
1006 LPHBODY *pprghAttach)
1008 FIXME("(%p)->(%p, %p)\n", iface, pcAttach, pprghAttach);
1009 return E_NOTIMPL;
1012 static HRESULT WINAPI MimeMessage_GetAddressTable(
1013 IMimeMessage *iface,
1014 IMimeAddressTable **ppTable)
1016 FIXME("(%p)->(%p)\n", iface, ppTable);
1017 return E_NOTIMPL;
1020 static HRESULT WINAPI MimeMessage_GetSender(
1021 IMimeMessage *iface,
1022 LPADDRESSPROPS pAddress)
1024 FIXME("(%p)->(%p)\n", iface, pAddress);
1025 return E_NOTIMPL;
1028 static HRESULT WINAPI MimeMessage_GetAddressTypes(
1029 IMimeMessage *iface,
1030 DWORD dwAdrTypes,
1031 DWORD dwProps,
1032 LPADDRESSLIST pList)
1034 FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, dwProps, pList);
1035 return E_NOTIMPL;
1038 static HRESULT WINAPI MimeMessage_GetAddressFormat(
1039 IMimeMessage *iface,
1040 DWORD dwAdrTypes,
1041 ADDRESSFORMAT format,
1042 LPSTR *ppszFormat)
1044 FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, format, ppszFormat);
1045 return E_NOTIMPL;
1048 static HRESULT WINAPI MimeMessage_EnumAddressTypes(
1049 IMimeMessage *iface,
1050 DWORD dwAdrTypes,
1051 DWORD dwProps,
1052 IMimeEnumAddressTypes **ppEnum)
1054 FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, dwProps, ppEnum);
1055 return E_NOTIMPL;
1058 static HRESULT WINAPI MimeMessage_SplitMessage(
1059 IMimeMessage *iface,
1060 ULONG cbMaxPart,
1061 IMimeMessageParts **ppParts)
1063 FIXME("(%p)->(%d, %p)\n", iface, cbMaxPart, ppParts);
1064 return E_NOTIMPL;
1067 static HRESULT WINAPI MimeMessage_GetRootMoniker(
1068 IMimeMessage *iface,
1069 IMoniker **ppMoniker)
1071 FIXME("(%p)->(%p)\n", iface, ppMoniker);
1072 return E_NOTIMPL;
1075 static const IMimeMessageVtbl MimeMessageVtbl =
1077 MimeMessage_QueryInterface,
1078 MimeMessage_AddRef,
1079 MimeMessage_Release,
1080 MimeMessage_GetClassID,
1081 MimeMessage_IsDirty,
1082 MimeMessage_Load,
1083 MimeMessage_Save,
1084 MimeMessage_GetSizeMax,
1085 MimeMessage_InitNew,
1086 MimeMessage_GetMessageSource,
1087 MimeMessage_GetMessageSize,
1088 MimeMessage_LoadOffsetTable,
1089 MimeMessage_SaveOffsetTable,
1090 MimeMessage_GetFlags,
1091 MimeMessage_Commit,
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)
1140 MimeMessage *This;
1142 TRACE("(%p, %p)\n", pUnkOuter, ppMessage);
1144 if (pUnkOuter)
1146 FIXME("outer unknown not supported yet\n");
1147 return E_NOTIMPL;
1150 *ppMessage = NULL;
1152 This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
1153 if (!This) return E_OUTOFMEMORY;
1155 This->lpVtbl = &MimeMessageVtbl;
1156 This->refs = 1;
1158 *ppMessage = (IMimeMessage *)&This->lpVtbl;
1159 return S_OK;
1162 /***********************************************************************
1163 * MimeOleSetCompatMode (INETCOMM.@)
1165 HRESULT WINAPI MimeOleSetCompatMode(DWORD dwMode)
1167 FIXME("(0x%x)\n", dwMode);
1168 return S_OK;
1171 /***********************************************************************
1172 * MimeOleCreateVirtualStream (INETCOMM.@)
1174 HRESULT WINAPI MimeOleCreateVirtualStream(IStream **ppStream)
1176 HRESULT hr;
1177 FIXME("(%p)\n", ppStream);
1179 hr = CreateStreamOnHGlobal(NULL, TRUE, ppStream);
1180 return hr;
1183 typedef struct MimeSecurity
1185 const IMimeSecurityVtbl *lpVtbl;
1187 LONG refs;
1188 } MimeSecurity;
1190 static HRESULT WINAPI MimeSecurity_QueryInterface(
1191 IMimeSecurity* iface,
1192 REFIID riid,
1193 void** obj)
1195 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), obj);
1197 if (IsEqualIID(riid, &IID_IUnknown) ||
1198 IsEqualIID(riid, &IID_IMimeSecurity))
1200 *obj = iface;
1201 IUnknown_AddRef(iface);
1202 return S_OK;
1205 FIXME("no interface for %s\n", debugstr_guid(riid));
1206 *obj = NULL;
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;
1222 ULONG refs;
1224 TRACE("(%p)->()\n", iface);
1226 refs = InterlockedDecrement(&This->refs);
1227 if (!refs)
1229 HeapFree(GetProcessHeap(), 0, This);
1232 return refs;
1235 static HRESULT WINAPI MimeSecurity_InitNew(
1236 IMimeSecurity* iface)
1238 FIXME("(%p)->(): stub\n", iface);
1239 return S_OK;
1242 static HRESULT WINAPI MimeSecurity_CheckInit(
1243 IMimeSecurity* iface)
1245 FIXME("(%p)->(): stub\n", iface);
1246 return E_NOTIMPL;
1249 static HRESULT WINAPI MimeSecurity_EncodeMessage(
1250 IMimeSecurity* iface,
1251 IMimeMessageTree* pTree,
1252 DWORD dwFlags)
1254 FIXME("(%p)->(%p, %08x): stub\n", iface, pTree, dwFlags);
1255 return E_NOTIMPL;
1258 static HRESULT WINAPI MimeSecurity_EncodeBody(
1259 IMimeSecurity* iface,
1260 IMimeMessageTree* pTree,
1261 HBODY hEncodeRoot,
1262 DWORD dwFlags)
1264 FIXME("(%p)->(%p, %p, %08x): stub\n", iface, pTree, hEncodeRoot, dwFlags);
1265 return E_NOTIMPL;
1268 static HRESULT WINAPI MimeSecurity_DecodeMessage(
1269 IMimeSecurity* iface,
1270 IMimeMessageTree* pTree,
1271 DWORD dwFlags)
1273 FIXME("(%p)->(%p, %08x): stub\n", iface, pTree, dwFlags);
1274 return E_NOTIMPL;
1277 static HRESULT WINAPI MimeSecurity_DecodeBody(
1278 IMimeSecurity* iface,
1279 IMimeMessageTree* pTree,
1280 HBODY hDecodeRoot,
1281 DWORD dwFlags)
1283 FIXME("(%p)->(%p, %p, %08x): stub\n", iface, pTree, hDecodeRoot, dwFlags);
1284 return E_NOTIMPL;
1287 static HRESULT WINAPI MimeSecurity_EnumCertificates(
1288 IMimeSecurity* iface,
1289 HCAPICERTSTORE hc,
1290 DWORD dwUsage,
1291 PCX509CERT pPrev,
1292 PCX509CERT* ppCert)
1294 FIXME("(%p)->(%p, %08x, %p, %p): stub\n", iface, hc, dwUsage, pPrev, ppCert);
1295 return E_NOTIMPL;
1298 static HRESULT WINAPI MimeSecurity_GetCertificateName(
1299 IMimeSecurity* iface,
1300 const PCX509CERT pX509Cert,
1301 const CERTNAMETYPE cn,
1302 LPSTR* ppszName)
1304 FIXME("(%p)->(%p, %08x, %p): stub\n", iface, pX509Cert, cn, ppszName);
1305 return E_NOTIMPL;
1308 static HRESULT WINAPI MimeSecurity_GetMessageType(
1309 IMimeSecurity* iface,
1310 const HWND hwndParent,
1311 IMimeBody* pBody,
1312 DWORD* pdwSecType)
1314 FIXME("(%p)->(%p, %p, %p): stub\n", iface, hwndParent, pBody, pdwSecType);
1315 return E_NOTIMPL;
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);
1325 return E_NOTIMPL;
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)
1351 MimeSecurity *This;
1353 TRACE("(%p)\n", ppSecurity);
1355 *ppSecurity = NULL;
1357 This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
1358 if (!This) return E_OUTOFMEMORY;
1360 This->lpVtbl = &MimeSecurityVtbl;
1361 This->refs = 1;
1363 *ppSecurity = (IMimeSecurity *)&This->lpVtbl;
1364 return S_OK;