ReactOS 0.4.17-dev-309-gee60345
mimeole.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winuser.h"
#include "objbase.h"
#include "ole2.h"
#include "mimeole.h"
#include "propvarutil.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "inetcomm_private.h"
Include dependency graph for mimeole.c:

Go to the source code of this file.

Classes

struct  property_t
 
struct  property_list_entry_t
 
struct  param_t
 
struct  header_t
 
struct  MimeBody
 
struct  sub_stream_t
 
struct  propschema
 
struct  body_t
 
struct  MimeMessage
 
struct  offset_entry_t
 
struct  MimeSecurity
 

Macros

#define COBJMACROS
 
#define PARSER_BUF_SIZE   1024
 
#define FIRST_CUSTOM_PROP_ID   0x100
 

Typedefs

typedef struct MimeBody MimeBody
 
typedef struct propschema propschema
 
typedef struct body_t body_t
 
typedef struct MimeMessage MimeMessage
 
typedef struct MimeSecurity MimeSecurity
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (inetcomm)
 
static sub_stream_timpl_from_IStream (IStream *iface)
 
static HRESULT WINAPI sub_stream_QueryInterface (IStream *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI sub_stream_AddRef (IStream *iface)
 
static ULONG WINAPI sub_stream_Release (IStream *iface)
 
static HRESULT WINAPI sub_stream_Read (IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
 
static HRESULT WINAPI sub_stream_Write (IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
 
static HRESULT WINAPI sub_stream_Seek (IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
static HRESULT WINAPI sub_stream_SetSize (IStream *iface, ULARGE_INTEGER libNewSize)
 
static HRESULT WINAPI sub_stream_CopyTo (IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
 
static HRESULT WINAPI sub_stream_Commit (IStream *iface, DWORD grfCommitFlags)
 
static HRESULT WINAPI sub_stream_Revert (IStream *iface)
 
static HRESULT WINAPI sub_stream_LockRegion (IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI sub_stream_UnlockRegion (IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI sub_stream_Stat (IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
 
static HRESULT WINAPI sub_stream_Clone (IStream *iface, IStream **ppstm)
 
static HRESULT create_sub_stream (IStream *stream, ULARGE_INTEGER start, ULARGE_INTEGER length, IStream **out)
 
static HRESULT get_stream_size (IStream *stream, ULARGE_INTEGER *size)
 
static MimeBodyimpl_from_IMimeBody (IMimeBody *iface)
 
static propschemaimpl_from_IMimePropertySchema (IMimePropertySchema *iface)
 
static HRESULT copy_headers_to_buf (IStream *stm, char **ptr)
 
static header_tread_prop (MimeBody *body, char **ptr)
 
static void unfold_header (char *header, int len)
 
static charunquote_string (const char *str)
 
static void add_param (header_t *header, const char *p)
 
static void split_params (header_t *header, char *value)
 
static void read_value (header_t *header, char **cur)
 
static void init_content_type (MimeBody *body, header_t *header)
 
static void init_content_encoding (MimeBody *body, header_t *header)
 
static HRESULT parse_headers (MimeBody *body, IStream *stm)
 
static void empty_param_list (struct list *list)
 
static void free_header (header_t *header)
 
static void empty_header_list (struct list *list)
 
static void empty_new_prop_list (struct list *list)
 
static void release_data (REFIID riid, void *data)
 
static HRESULT find_prop (MimeBody *body, const char *name, header_t **prop)
 
static const property_tfind_default_prop (const char *name)
 
static HRESULT WINAPI MimeBody_QueryInterface (IMimeBody *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI MimeBody_AddRef (IMimeBody *iface)
 
static ULONG WINAPI MimeBody_Release (IMimeBody *iface)
 
static HRESULT WINAPI MimeBody_GetClassID (IMimeBody *iface, CLSID *pClassID)
 
static HRESULT WINAPI MimeBody_IsDirty (IMimeBody *iface)
 
static HRESULT WINAPI MimeBody_Load (IMimeBody *iface, IStream *pStm)
 
static HRESULT WINAPI MimeBody_Save (IMimeBody *iface, IStream *pStm, BOOL fClearDirty)
 
static HRESULT WINAPI MimeBody_GetSizeMax (IMimeBody *iface, ULARGE_INTEGER *pcbSize)
 
static HRESULT WINAPI MimeBody_InitNew (IMimeBody *iface)
 
static HRESULT WINAPI MimeBody_GetPropInfo (IMimeBody *iface, LPCSTR pszName, LPMIMEPROPINFO pInfo)
 
static HRESULT WINAPI MimeBody_SetPropInfo (IMimeBody *iface, LPCSTR pszName, LPCMIMEPROPINFO pInfo)
 
static HRESULT WINAPI MimeBody_GetProp (IMimeBody *iface, LPCSTR pszName, DWORD dwFlags, LPPROPVARIANT pValue)
 
static HRESULT WINAPI MimeBody_SetProp (IMimeBody *iface, LPCSTR pszName, DWORD dwFlags, LPCPROPVARIANT pValue)
 
static HRESULT WINAPI MimeBody_AppendProp (IMimeBody *iface, LPCSTR pszName, DWORD dwFlags, LPPROPVARIANT pValue)
 
static HRESULT WINAPI MimeBody_DeleteProp (IMimeBody *iface, LPCSTR pszName)
 
static HRESULT WINAPI MimeBody_CopyProps (IMimeBody *iface, ULONG cNames, LPCSTR *prgszName, IMimePropertySet *pPropertySet)
 
static HRESULT WINAPI MimeBody_MoveProps (IMimeBody *iface, ULONG cNames, LPCSTR *prgszName, IMimePropertySet *pPropertySet)
 
static HRESULT WINAPI MimeBody_DeleteExcept (IMimeBody *iface, ULONG cNames, LPCSTR *prgszName)
 
static HRESULT WINAPI MimeBody_QueryProp (IMimeBody *iface, LPCSTR pszName, LPCSTR pszCriteria, boolean fSubString, boolean fCaseSensitive)
 
static HRESULT WINAPI MimeBody_GetCharset (IMimeBody *iface, LPHCHARSET phCharset)
 
static HRESULT WINAPI MimeBody_SetCharset (IMimeBody *iface, HCHARSET hCharset, CSETAPPLYTYPE applytype)
 
static HRESULT WINAPI MimeBody_GetParameters (IMimeBody *iface, LPCSTR pszName, ULONG *pcParams, LPMIMEPARAMINFO *pprgParam)
 
static HRESULT WINAPI MimeBody_IsContentType (IMimeBody *iface, LPCSTR pszPriType, LPCSTR pszSubType)
 
static HRESULT WINAPI MimeBody_BindToObject (IMimeBody *iface, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI MimeBody_Clone (IMimeBody *iface, IMimePropertySet **ppPropertySet)
 
static HRESULT WINAPI MimeBody_SetOption (IMimeBody *iface, const TYPEDID oid, LPCPROPVARIANT pValue)
 
static HRESULT WINAPI MimeBody_GetOption (IMimeBody *iface, const TYPEDID oid, LPPROPVARIANT pValue)
 
static HRESULT WINAPI MimeBody_EnumProps (IMimeBody *iface, DWORD dwFlags, IMimeEnumProperties **ppEnum)
 
static HRESULT WINAPI MimeBody_IsType (IMimeBody *iface, IMSGBODYTYPE bodytype)
 
static HRESULT WINAPI MimeBody_SetDisplayName (IMimeBody *iface, LPCSTR pszDisplay)
 
static HRESULT WINAPI MimeBody_GetDisplayName (IMimeBody *iface, LPSTR *ppszDisplay)
 
static HRESULT WINAPI MimeBody_GetOffsets (IMimeBody *iface, LPBODYOFFSETS pOffsets)
 
static HRESULT WINAPI MimeBody_GetCurrentEncoding (IMimeBody *iface, ENCODINGTYPE *pietEncoding)
 
static HRESULT WINAPI MimeBody_SetCurrentEncoding (IMimeBody *iface, ENCODINGTYPE ietEncoding)
 
static HRESULT WINAPI MimeBody_GetEstimatedSize (IMimeBody *iface, ENCODINGTYPE ietEncoding, ULONG *pcbSize)
 
static HRESULT WINAPI MimeBody_GetDataHere (IMimeBody *iface, ENCODINGTYPE ietEncoding, IStream *pStream)
 
static HRESULT decode_base64 (IStream *input, IStream **ret_stream)
 
static int hex_digit (char c)
 
static HRESULT decode_qp (IStream *input, IStream **ret_stream)
 
static HRESULT WINAPI MimeBody_GetData (IMimeBody *iface, ENCODINGTYPE ietEncoding, IStream **ppStream)
 
static HRESULT WINAPI MimeBody_SetData (IMimeBody *iface, ENCODINGTYPE ietEncoding, LPCSTR pszPriType, LPCSTR pszSubType, REFIID riid, LPVOID pvObject)
 
static HRESULT WINAPI MimeBody_EmptyData (IMimeBody *iface)
 
static HRESULT WINAPI MimeBody_CopyTo (IMimeBody *iface, IMimeBody *pBody)
 
static HRESULT WINAPI MimeBody_GetTransmitInfo (IMimeBody *iface, LPTRANSMITINFO pTransmitInfo)
 
static HRESULT WINAPI MimeBody_SaveToFile (IMimeBody *iface, ENCODINGTYPE ietEncoding, LPCSTR pszFilePath)
 
static HRESULT WINAPI MimeBody_GetHandle (IMimeBody *iface, LPHBODY phBody)
 
static HRESULT MimeBody_set_offsets (MimeBody *body, const BODYOFFSETS *offsets)
 
static MimeBodymimebody_create (void)
 
HRESULT MimeBody_create (IUnknown *outer, void **ppv)
 
static MimeMessageimpl_from_IMimeMessage (IMimeMessage *iface)
 
static HRESULT WINAPI MimeMessage_QueryInterface (IMimeMessage *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI MimeMessage_AddRef (IMimeMessage *iface)
 
static void empty_body_list (struct list *list)
 
static ULONG WINAPI MimeMessage_Release (IMimeMessage *iface)
 
static HRESULT WINAPI MimeMessage_GetClassID (IMimeMessage *iface, CLSID *pClassID)
 
static HRESULT WINAPI MimeMessage_IsDirty (IMimeMessage *iface)
 
static body_tnew_body_entry (MimeBody *mime_body, DWORD index, body_t *parent)
 
static HRESULT create_body_offset_list (IStream *stm, const char *boundary, struct list *body_offsets)
 
static body_tcreate_sub_body (MimeMessage *msg, IStream *pStm, BODYOFFSETS *offset, body_t *parent)
 
static HRESULT WINAPI MimeMessage_Load (IMimeMessage *iface, IStream *pStm)
 
static HRESULT WINAPI MimeMessage_Save (IMimeMessage *iface, IStream *pStm, BOOL fClearDirty)
 
static HRESULT WINAPI MimeMessage_GetSizeMax (IMimeMessage *iface, ULARGE_INTEGER *pcbSize)
 
static HRESULT WINAPI MimeMessage_InitNew (IMimeMessage *iface)
 
static HRESULT WINAPI MimeMessage_GetMessageSource (IMimeMessage *iface, IStream **ppStream, DWORD dwFlags)
 
static HRESULT WINAPI MimeMessage_GetMessageSize (IMimeMessage *iface, ULONG *pcbSize, DWORD dwFlags)
 
static HRESULT WINAPI MimeMessage_LoadOffsetTable (IMimeMessage *iface, IStream *pStream)
 
static HRESULT WINAPI MimeMessage_SaveOffsetTable (IMimeMessage *iface, IStream *pStream, DWORD dwFlags)
 
static HRESULT WINAPI MimeMessage_GetFlags (IMimeMessage *iface, DWORD *pdwFlags)
 
static HRESULT WINAPI MimeMessage_Commit (IMimeMessage *iface, DWORD dwFlags)
 
static HRESULT WINAPI MimeMessage_HandsOffStorage (IMimeMessage *iface)
 
static HRESULT find_body (struct list *list, HBODY hbody, body_t **body)
 
static HRESULT WINAPI MimeMessage_BindToObject (IMimeMessage *iface, const HBODY hBody, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI MimeMessage_SaveBody (IMimeMessage *iface, HBODY hBody, DWORD dwFlags, IStream *pStream)
 
static HRESULT get_body (MimeMessage *msg, BODYLOCATION location, HBODY pivot, body_t **out)
 
static HRESULT WINAPI MimeMessage_InsertBody (IMimeMessage *iface, BODYLOCATION location, HBODY hPivot, LPHBODY phBody)
 
static HRESULT WINAPI MimeMessage_GetBody (IMimeMessage *iface, BODYLOCATION location, HBODY hPivot, HBODY *phBody)
 
static HRESULT WINAPI MimeMessage_DeleteBody (IMimeMessage *iface, HBODY hBody, DWORD dwFlags)
 
static HRESULT WINAPI MimeMessage_MoveBody (IMimeMessage *iface, HBODY hBody, BODYLOCATION location)
 
static void count_children (body_t *body, boolean recurse, ULONG *count)
 
static HRESULT WINAPI MimeMessage_CountBodies (IMimeMessage *iface, HBODY hParent, boolean fRecurse, ULONG *pcBodies)
 
static HRESULT find_next (MimeMessage *This, body_t *body, FINDBODY *find, HBODY *out)
 
static HRESULT WINAPI MimeMessage_FindFirst (IMimeMessage *iface, FINDBODY *pFindBody, HBODY *phBody)
 
static HRESULT WINAPI MimeMessage_FindNext (IMimeMessage *iface, FINDBODY *pFindBody, HBODY *phBody)
 
static HRESULT WINAPI MimeMessage_ResolveURL (IMimeMessage *iface, HBODY hRelated, LPCSTR pszBase, LPCSTR pszURL, DWORD dwFlags, LPHBODY phBody)
 
static HRESULT WINAPI MimeMessage_ToMultipart (IMimeMessage *iface, HBODY hBody, LPCSTR pszSubType, LPHBODY phMultipart)
 
static HRESULT WINAPI MimeMessage_GetBodyOffsets (IMimeMessage *iface, HBODY hBody, LPBODYOFFSETS pOffsets)
 
static HRESULT WINAPI MimeMessage_GetCharset (IMimeMessage *iface, LPHCHARSET phCharset)
 
static HRESULT WINAPI MimeMessage_SetCharset (IMimeMessage *iface, HCHARSET hCharset, CSETAPPLYTYPE applytype)
 
static HRESULT WINAPI MimeMessage_IsBodyType (IMimeMessage *iface, HBODY hBody, IMSGBODYTYPE bodytype)
 
static HRESULT WINAPI MimeMessage_IsContentType (IMimeMessage *iface, HBODY hBody, LPCSTR pszPriType, LPCSTR pszSubType)
 
static HRESULT WINAPI MimeMessage_QueryBodyProp (IMimeMessage *iface, HBODY hBody, LPCSTR pszName, LPCSTR pszCriteria, boolean fSubString, boolean fCaseSensitive)
 
static HRESULT WINAPI MimeMessage_GetBodyProp (IMimeMessage *iface, HBODY hBody, LPCSTR pszName, DWORD dwFlags, LPPROPVARIANT pValue)
 
static HRESULT WINAPI MimeMessage_SetBodyProp (IMimeMessage *iface, HBODY hBody, LPCSTR pszName, DWORD dwFlags, LPCPROPVARIANT pValue)
 
static HRESULT WINAPI MimeMessage_DeleteBodyProp (IMimeMessage *iface, HBODY hBody, LPCSTR pszName)
 
static HRESULT WINAPI MimeMessage_SetOption (IMimeMessage *iface, const TYPEDID oid, LPCPROPVARIANT pValue)
 
static HRESULT WINAPI MimeMessage_GetOption (IMimeMessage *iface, const TYPEDID oid, LPPROPVARIANT pValue)
 
static HRESULT WINAPI MimeMessage_CreateWebPage (IMimeMessage *iface, IStream *pRootStm, LPWEBPAGEOPTIONS pOptions, IMimeMessageCallback *pCallback, IMoniker **ppMoniker)
 
static HRESULT WINAPI MimeMessage_GetProp (IMimeMessage *iface, LPCSTR pszName, DWORD dwFlags, LPPROPVARIANT pValue)
 
static HRESULT WINAPI MimeMessage_SetProp (IMimeMessage *iface, LPCSTR pszName, DWORD dwFlags, LPCPROPVARIANT pValue)
 
static HRESULT WINAPI MimeMessage_DeleteProp (IMimeMessage *iface, LPCSTR pszName)
 
static HRESULT WINAPI MimeMessage_QueryProp (IMimeMessage *iface, LPCSTR pszName, LPCSTR pszCriteria, boolean fSubString, boolean fCaseSensitive)
 
static HRESULT WINAPI MimeMessage_GetTextBody (IMimeMessage *iface, DWORD dwTxtType, ENCODINGTYPE ietEncoding, IStream **pStream, LPHBODY phBody)
 
static HRESULT WINAPI MimeMessage_SetTextBody (IMimeMessage *iface, DWORD dwTxtType, ENCODINGTYPE ietEncoding, HBODY hAlternative, IStream *pStream, LPHBODY phBody)
 
static HRESULT WINAPI MimeMessage_AttachObject (IMimeMessage *iface, REFIID riid, void *pvObject, LPHBODY phBody)
 
static HRESULT WINAPI MimeMessage_AttachFile (IMimeMessage *iface, LPCSTR pszFilePath, IStream *pstmFile, LPHBODY phBody)
 
static HRESULT WINAPI MimeMessage_AttachURL (IMimeMessage *iface, LPCSTR pszBase, LPCSTR pszURL, DWORD dwFlags, IStream *pstmURL, LPSTR *ppszCIDURL, LPHBODY phBody)
 
static HRESULT WINAPI MimeMessage_GetAttachments (IMimeMessage *iface, ULONG *pcAttach, LPHBODY *pprghAttach)
 
static HRESULT WINAPI MimeMessage_GetAddressTable (IMimeMessage *iface, IMimeAddressTable **ppTable)
 
static HRESULT WINAPI MimeMessage_GetSender (IMimeMessage *iface, LPADDRESSPROPS pAddress)
 
static HRESULT WINAPI MimeMessage_GetAddressTypes (IMimeMessage *iface, DWORD dwAdrTypes, DWORD dwProps, LPADDRESSLIST pList)
 
static HRESULT WINAPI MimeMessage_GetAddressFormat (IMimeMessage *iface, DWORD dwAdrTypes, ADDRESSFORMAT format, LPSTR *ppszFormat)
 
static HRESULT WINAPI MimeMessage_EnumAddressTypes (IMimeMessage *iface, DWORD dwAdrTypes, DWORD dwProps, IMimeEnumAddressTypes **ppEnum)
 
static HRESULT WINAPI MimeMessage_SplitMessage (IMimeMessage *iface, ULONG cbMaxPart, IMimeMessageParts **ppParts)
 
static HRESULT WINAPI MimeMessage_GetRootMoniker (IMimeMessage *iface, IMoniker **ppMoniker)
 
HRESULT MimeMessage_create (IUnknown *outer, void **obj)
 
HRESULT WINAPI MimeOleCreateMessage (IUnknown *pUnkOuter, IMimeMessage **ppMessage)
 
HRESULT WINAPI MimeOleSetCompatMode (DWORD dwMode)
 
HRESULT WINAPI MimeOleCreateVirtualStream (IStream **ppStream)
 
static MimeSecurityimpl_from_IMimeSecurity (IMimeSecurity *iface)
 
static HRESULT WINAPI MimeSecurity_QueryInterface (IMimeSecurity *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI MimeSecurity_AddRef (IMimeSecurity *iface)
 
static ULONG WINAPI MimeSecurity_Release (IMimeSecurity *iface)
 
static HRESULT WINAPI MimeSecurity_InitNew (IMimeSecurity *iface)
 
static HRESULT WINAPI MimeSecurity_CheckInit (IMimeSecurity *iface)
 
static HRESULT WINAPI MimeSecurity_EncodeMessage (IMimeSecurity *iface, IMimeMessageTree *pTree, DWORD dwFlags)
 
static HRESULT WINAPI MimeSecurity_EncodeBody (IMimeSecurity *iface, IMimeMessageTree *pTree, HBODY hEncodeRoot, DWORD dwFlags)
 
static HRESULT WINAPI MimeSecurity_DecodeMessage (IMimeSecurity *iface, IMimeMessageTree *pTree, DWORD dwFlags)
 
static HRESULT WINAPI MimeSecurity_DecodeBody (IMimeSecurity *iface, IMimeMessageTree *pTree, HBODY hDecodeRoot, DWORD dwFlags)
 
static HRESULT WINAPI MimeSecurity_EnumCertificates (IMimeSecurity *iface, HCAPICERTSTORE hc, DWORD dwUsage, PCX509CERT pPrev, PCX509CERT *ppCert)
 
static HRESULT WINAPI MimeSecurity_GetCertificateName (IMimeSecurity *iface, const PCX509CERT pX509Cert, const CERTNAMETYPE cn, LPSTR *ppszName)
 
static HRESULT WINAPI MimeSecurity_GetMessageType (IMimeSecurity *iface, const HWND hwndParent, IMimeBody *pBody, DWORD *pdwSecType)
 
static HRESULT WINAPI MimeSecurity_GetCertData (IMimeSecurity *iface, const PCX509CERT pX509Cert, const CERTDATAID dataid, LPPROPVARIANT pValue)
 
HRESULT MimeSecurity_create (IUnknown *outer, void **obj)
 
HRESULT WINAPI MimeOleCreateSecurity (IMimeSecurity **ppSecurity)
 
static HRESULT WINAPI MimeAlloc_QueryInterface (IMimeAllocator *iface, REFIID riid, void **obj)
 
static ULONG WINAPI MimeAlloc_AddRef (IMimeAllocator *iface)
 
static ULONG WINAPI MimeAlloc_Release (IMimeAllocator *iface)
 
static LPVOID WINAPI MimeAlloc_Alloc (IMimeAllocator *iface, SIZE_T cb)
 
static LPVOID WINAPI MimeAlloc_Realloc (IMimeAllocator *iface, LPVOID pv, SIZE_T cb)
 
static void WINAPI MimeAlloc_Free (IMimeAllocator *iface, LPVOID pv)
 
static SIZE_T WINAPI MimeAlloc_GetSize (IMimeAllocator *iface, LPVOID pv)
 
static int WINAPI MimeAlloc_DidAlloc (IMimeAllocator *iface, LPVOID pv)
 
static void WINAPI MimeAlloc_HeapMinimize (IMimeAllocator *iface)
 
static HRESULT WINAPI MimeAlloc_FreeParamInfoArray (IMimeAllocator *iface, ULONG cParams, LPMIMEPARAMINFO prgParam, boolean fFreeArray)
 
static HRESULT WINAPI MimeAlloc_FreeAddressList (IMimeAllocator *iface, LPADDRESSLIST pList)
 
static HRESULT WINAPI MimeAlloc_FreeAddressProps (IMimeAllocator *iface, LPADDRESSPROPS pAddress)
 
static HRESULT WINAPI MimeAlloc_ReleaseObjects (IMimeAllocator *iface, ULONG cObjects, IUnknown **prgpUnknown, boolean fFreeArray)
 
static HRESULT WINAPI MimeAlloc_FreeEnumHeaderRowArray (IMimeAllocator *iface, ULONG cRows, LPENUMHEADERROW prgRow, boolean fFreeArray)
 
static HRESULT WINAPI MimeAlloc_FreeEnumPropertyArray (IMimeAllocator *iface, ULONG cProps, LPENUMPROPERTY prgProp, boolean fFreeArray)
 
static HRESULT WINAPI MimeAlloc_FreeThumbprint (IMimeAllocator *iface, THUMBBLOB *pthumbprint)
 
static HRESULT WINAPI MimeAlloc_PropVariantClear (IMimeAllocator *iface, LPPROPVARIANT pProp)
 
HRESULT MimeAllocator_create (IUnknown *outer, void **obj)
 
HRESULT WINAPI MimeOleGetAllocator (IMimeAllocator **alloc)
 
HRESULT VirtualStream_create (IUnknown *outer, void **obj)
 
static HRESULT WINAPI propschema_QueryInterface (IMimePropertySchema *iface, REFIID riid, void **out)
 
static ULONG WINAPI propschema_AddRef (IMimePropertySchema *iface)
 
static ULONG WINAPI propschema_Release (IMimePropertySchema *iface)
 
static HRESULT WINAPI propschema_RegisterProperty (IMimePropertySchema *iface, const char *name, DWORD flags, DWORD rownumber, VARTYPE vtdefault, DWORD *propid)
 
static HRESULT WINAPI propschema_ModifyProperty (IMimePropertySchema *iface, const char *name, DWORD flags, DWORD rownumber, VARTYPE vtdefault)
 
static HRESULT WINAPI propschema_GetPropertyId (IMimePropertySchema *iface, const char *name, DWORD *propid)
 
static HRESULT WINAPI propschema_GetPropertyName (IMimePropertySchema *iface, DWORD propid, char **name)
 
static HRESULT WINAPI propschema_RegisterAddressType (IMimePropertySchema *iface, const char *name, DWORD *adrtype)
 
HRESULT WINAPI MimeOleGetPropertySchema (IMimePropertySchema **schema)
 
HRESULT WINAPI MimeGetAddressFormatW (REFIID riid, void *object, DWORD addr_type, ADDRESSFORMAT addr_format, WCHAR **address)
 
static HRESULT WINAPI mime_obj_QueryInterface (IUnknown *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI mime_obj_AddRef (IUnknown *iface)
 
static ULONG WINAPI mime_obj_Release (IUnknown *iface)
 
HRESULT WINAPI MimeOleObjectFromMoniker (BINDF bindf, IMoniker *moniker, IBindCtx *binding, REFIID riid, void **out, IMoniker **moniker_new)
 

Variables

static const property_t default_props []
 
static struct IStreamVtbl sub_stream_vtbl
 
static const signed char base64_decode_table []
 
static IMimeBodyVtbl body_vtbl
 
static const IMimeMessageVtbl MimeMessageVtbl
 
static const IMimeSecurityVtbl MimeSecurityVtbl
 
static IMimeAllocatorVtbl mime_alloc_vtbl
 
static IMimeAllocator mime_allocator
 
static IMimePropertySchemaVtbl prop_schema_vtbl
 
static const IUnknownVtbl mime_obj_vtbl
 
static IUnknown mime_obj = { &mime_obj_vtbl }
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file mimeole.c.

◆ FIRST_CUSTOM_PROP_ID

#define FIRST_CUSTOM_PROP_ID   0x100

Definition at line 1873 of file mimeole.c.

◆ PARSER_BUF_SIZE

#define PARSER_BUF_SIZE   1024

Definition at line 477 of file mimeole.c.

Typedef Documentation

◆ body_t

typedef struct body_t body_t

◆ MimeBody

◆ MimeMessage

◆ MimeSecurity

◆ propschema

Function Documentation

◆ add_param()

static void add_param ( header_t header,
const char p 
)
static

Definition at line 651 of file mimeole.c.

652{
653 const char *key = p, *value, *cp = p;
654 param_t *param;
655 char *name;
656
657 TRACE("got param %s\n", p);
658
659 while (*key == ' ' || *key == '\t' ) key++;
660
661 cp = strchr(key, '=');
662 if(!cp)
663 {
664 WARN("malformed parameter - skipping\n");
665 return;
666 }
667
668 name = malloc(cp - key + 1);
669 memcpy(name, key, cp - key);
670 name[cp - key] = '\0';
671
672 value = cp + 1;
673
674 param = malloc(sizeof(*param));
675 param->name = name;
676 param->value = unquote_string(value);
677 list_add_tail(&header->params, &param->entry);
678}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
#define WARN(fmt,...)
Definition: precomp.h:61
#define malloc
Definition: debug_ros.c:4
static char * unquote_string(const char *str)
Definition: mimeole.c:618
_ACRTIMP char *__cdecl strchr(const char *, int)
Definition: string.c:3291
GLfloat GLfloat p
Definition: glext.h:8902
GLfloat param
Definition: glext.h:5796
POINT cp
Definition: magnifier.c:59
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define TRACE(s)
Definition: solgame.cpp:4
Definition: copy.c:22
Definition: name.c:39
Definition: pdh_main.c:96

Referenced by split_params().

◆ copy_headers_to_buf()

static HRESULT copy_headers_to_buf ( IStream stm,
char **  ptr 
)
static

Definition at line 485 of file mimeole.c.

486{
487 char *buf = NULL, *new_buf;
488 DWORD size = PARSER_BUF_SIZE, offset = 0, last_end = 0;
489 HRESULT hr;
490 BOOL done = FALSE;
491
492 *ptr = NULL;
493
494 do
495 {
496 char *end;
497 DWORD read;
498
499 if(buf) size *= 2;
500 new_buf = realloc(buf, size + 1);
501 if(!new_buf)
502 {
504 goto fail;
505 }
506 buf = new_buf;
507
508 hr = IStream_Read(stm, buf + offset, size - offset, &read);
509 if(FAILED(hr)) goto fail;
510
511 offset += read;
512 buf[offset] = '\0';
513
514 if(read == 0) done = TRUE;
515
516 while(!done && (end = strstr(buf + last_end, "\r\n")))
517 {
518 DWORD new_end = end - buf + 2;
519 if(new_end - last_end == 2)
520 {
521 LARGE_INTEGER off;
522 off.QuadPart = (LONGLONG)new_end - offset;
523 IStream_Seek(stm, off, STREAM_SEEK_CUR, NULL);
524 buf[new_end] = '\0';
525 done = TRUE;
526 }
527 else
528 last_end = new_end;
529 }
530 } while(!done);
531
532 *ptr = buf;
533 return S_OK;
534
535fail:
536 free(buf);
537 return hr;
538}
#define read
Definition: acwin.h:97
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define PARSER_BUF_SIZE
Definition: mimeole.c:477
_ACRTIMP char *__cdecl strstr(const char *, const char *)
Definition: string.c:3420
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint end
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
static PVOID ptr
Definition: dispmode.c:27
int64_t LONGLONG
Definition: typedefs.h:68
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by parse_headers().

◆ count_children()

static void count_children ( body_t body,
boolean  recurse,
ULONG count 
)
static

Definition at line 2487 of file mimeole.c.

2488{
2489 body_t *child;
2490
2492 {
2493 (*count)++;
2494 if(recurse) count_children(child, recurse, count);
2495 }
2496}
static void count_children(body_t *body, boolean recurse, ULONG *count)
Definition: mimeole.c:2487
GLuint GLuint GLsizei count
Definition: gl.h:1545
uint32_t entry
Definition: isohybrid.c:63
static HWND child
Definition: cursoricon.c:298
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100

Referenced by count_children(), and MimeMessage_CountBodies().

◆ create_body_offset_list()

static HRESULT create_body_offset_list ( IStream stm,
const char boundary,
struct list body_offsets 
)
static

Definition at line 2045 of file mimeole.c.

2046{
2047 HRESULT hr;
2048 DWORD read, boundary_start;
2049 int boundary_len = strlen(boundary);
2050 char *buf, *ptr, *overlap;
2051 DWORD start = 0, overlap_no;
2052 offset_entry_t *cur_body = NULL;
2053 BOOL is_first_line = TRUE;
2056
2057 list_init(body_offsets);
2058
2059 overlap_no = boundary_len + 5;
2060
2061 overlap = buf = malloc(overlap_no + PARSER_BUF_SIZE + 1);
2062
2063 zero.QuadPart = 0;
2064 hr = IStream_Seek(stm, zero, STREAM_SEEK_CUR, &cur);
2065 start = cur.LowPart;
2066
2067 do {
2068 hr = IStream_Read(stm, overlap, PARSER_BUF_SIZE, &read);
2069 if(FAILED(hr)) goto end;
2070 if(read == 0) break;
2071 overlap[read] = '\0';
2072
2073 ptr = buf;
2074 while(1) {
2075 if(is_first_line) {
2076 is_first_line = FALSE;
2077 }else {
2078 ptr = strstr(ptr, "\r\n");
2079 if(!ptr)
2080 break;
2081 ptr += 2;
2082 }
2083
2084 boundary_start = start + ptr - buf;
2085
2086 if(*ptr == '-' && *(ptr + 1) == '-' && !memcmp(ptr + 2, boundary, boundary_len)) {
2087 ptr += boundary_len + 2;
2088
2089 if(*ptr == '\r' && *(ptr + 1) == '\n')
2090 {
2091 ptr += 2;
2092 if(cur_body)
2093 {
2094 cur_body->offsets.cbBodyEnd = boundary_start - 2;
2095 list_add_tail(body_offsets, &cur_body->entry);
2096 }
2097 cur_body = malloc(sizeof(*cur_body));
2098 cur_body->offsets.cbBoundaryStart = boundary_start;
2099 cur_body->offsets.cbHeaderStart = start + ptr - buf;
2100 }
2101 else if(*ptr == '-' && *(ptr + 1) == '-')
2102 {
2103 if(cur_body)
2104 {
2105 cur_body->offsets.cbBodyEnd = boundary_start - 2;
2106 list_add_tail(body_offsets, &cur_body->entry);
2107 goto end;
2108 }
2109 }
2110 }
2111 }
2112
2113 if(overlap == buf) /* 1st iteration */
2114 {
2115 memmove(buf, buf + PARSER_BUF_SIZE - overlap_no, overlap_no);
2116 overlap = buf + overlap_no;
2117 start += read - overlap_no;
2118 }
2119 else
2120 {
2121 memmove(buf, buf + PARSER_BUF_SIZE, overlap_no);
2122 start += read;
2123 }
2124 } while(1);
2125
2126end:
2127 free(buf);
2128 return hr;
2129}
static void list_init(struct list_entry *head)
Definition: list.h:51
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1597
FxCollectionEntry * cur
GLuint start
Definition: gl.h:1545
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
int zero
Definition: sehframes.cpp:29
Definition: mimeole.c:2040
BODYOFFSETS offsets
Definition: mimeole.c:2042
struct list entry
Definition: mimeole.c:2041

Referenced by create_sub_body().

◆ create_sub_body()

static body_t * create_sub_body ( MimeMessage msg,
IStream pStm,
BODYOFFSETS *  offset,
body_t parent 
)
static

Definition at line 2131 of file mimeole.c.

2132{
2134 MimeBody *mime_body;
2135 HRESULT hr;
2136 body_t *body;
2138
2139 pos.QuadPart = offset->cbHeaderStart;
2140 IStream_Seek(pStm, pos, STREAM_SEEK_SET, NULL);
2141
2142 mime_body = mimebody_create();
2143 IMimeBody_Load(&mime_body->IMimeBody_iface, pStm);
2144
2145 pos.QuadPart = 0;
2146 hr = IStream_Seek(pStm, pos, STREAM_SEEK_CUR, &start);
2147 offset->cbBodyStart = start.QuadPart;
2148 if (parent) MimeBody_set_offsets(mime_body, offset);
2149
2150 length.QuadPart = offset->cbBodyEnd - offset->cbBodyStart;
2151 create_sub_stream(pStm, start, length, (IStream**)&mime_body->data);
2152 mime_body->data_iid = IID_IStream;
2153
2154 body = new_body_entry(mime_body, msg->next_index++, parent);
2155
2156 if(IMimeBody_IsContentType(&mime_body->IMimeBody_iface, "multipart", NULL) == S_OK)
2157 {
2158 MIMEPARAMINFO *param_info;
2159 ULONG count, i;
2160 IMimeAllocator *alloc;
2161
2162 hr = IMimeBody_GetParameters(&mime_body->IMimeBody_iface, "Content-Type", &count,
2163 &param_info);
2164 if(hr != S_OK || count == 0) return body;
2165
2167
2168 for(i = 0; i < count; i++)
2169 {
2170 if(!lstrcmpiA(param_info[i].pszName, "boundary"))
2171 {
2172 struct list offset_list;
2173 offset_entry_t *cur, *cursor2;
2174 hr = create_body_offset_list(pStm, param_info[i].pszData, &offset_list);
2175 LIST_FOR_EACH_ENTRY_SAFE(cur, cursor2, &offset_list, offset_entry_t, entry)
2176 {
2177 body_t *sub_body;
2178
2179 sub_body = create_sub_body(msg, pStm, &cur->offsets, body);
2180 list_add_tail(&body->children, &sub_body->entry);
2181 list_remove(&cur->entry);
2182 free(cur);
2183 }
2184 break;
2185 }
2186 }
2187 IMimeAllocator_FreeParamInfoArray(alloc, count, param_info, TRUE);
2188 IMimeAllocator_Release(alloc);
2189 }
2190 return body;
2191}
#define msg(x)
Definition: auth_time.c:54
static void list_remove(struct list_entry *entry)
Definition: list.h:90
Definition: list.h:37
static HRESULT create_body_offset_list(IStream *stm, const char *boundary, struct list *body_offsets)
Definition: mimeole.c:2045
static HRESULT MimeBody_set_offsets(MimeBody *body, const BODYOFFSETS *offsets)
Definition: mimeole.c:1864
static MimeBody * mimebody_create(void)
Definition: mimeole.c:1875
HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator **alloc)
Definition: mimeole.c:3513
static body_t * new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent)
Definition: mimeole.c:2024
static body_t * create_sub_body(MimeMessage *msg, IStream *pStm, BODYOFFSETS *offset, body_t *parent)
Definition: mimeole.c:2131
static HRESULT create_sub_stream(IStream *stream, ULARGE_INTEGER start, ULARGE_INTEGER length, IStream **out)
Definition: mimeole.c:425
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4133
r parent
Definition: btrfs.c:3010
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define alloc
Definition: rosglue.h:13
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
void * data
Definition: mimeole.c:164
IID data_iid
Definition: mimeole.c:165
IMimeBody IMimeBody_iface
Definition: mimeole.c:153
struct list entry
Definition: mimeole.c:1924
uint32_t ULONG
Definition: typedefs.h:59

Referenced by create_sub_body(), and MimeMessage_Load().

◆ create_sub_stream()

static HRESULT create_sub_stream ( IStream stream,
ULARGE_INTEGER  start,
ULARGE_INTEGER  length,
IStream **  out 
)
static

Definition at line 425 of file mimeole.c.

426{
428
429 *out = NULL;
430 This = malloc(sizeof(*This));
431 if(!This) return E_OUTOFMEMORY;
432
433 This->IStream_iface.lpVtbl = &sub_stream_vtbl;
434 This->ref = 1;
435 This->start = start;
436 This->length = length;
437 This->pos.QuadPart = 0;
438 IStream_AddRef(stream);
439 This->base = stream;
440
441 *out = &This->IStream_iface;
442 return S_OK;
443}
static struct IStreamVtbl sub_stream_vtbl
Definition: mimeole.c:407
Definition: parse.h:23
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

Referenced by create_sub_body(), and MimeBody_GetData().

◆ decode_base64()

static HRESULT decode_base64 ( IStream input,
IStream **  ret_stream 
)
static

Definition at line 1543 of file mimeole.c.

1544{
1545 const unsigned char *ptr, *end;
1546 unsigned char buf[1024];
1548 unsigned char *ret;
1549 unsigned char in[4];
1550 IStream *output;
1551 DWORD size;
1552 int n = 0;
1553 HRESULT hres;
1554
1555 pos.QuadPart = 0;
1556 hres = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL);
1557 if(FAILED(hres))
1558 return hres;
1559
1560 hres = CreateStreamOnHGlobal(NULL, TRUE, &output);
1561 if(FAILED(hres))
1562 return hres;
1563
1564 while(1) {
1565 hres = IStream_Read(input, buf, sizeof(buf), &size);
1566 if(FAILED(hres) || !size)
1567 break;
1568
1569 ptr = ret = buf;
1570 end = buf + size;
1571
1572 while(1) {
1573 /* skip invalid chars */
1574 while(ptr < end && (*ptr >= ARRAY_SIZE(base64_decode_table)
1575 || base64_decode_table[*ptr] == -1))
1576 ptr++;
1577 if(ptr == end)
1578 break;
1579
1580 in[n++] = base64_decode_table[*ptr++];
1581 switch(n) {
1582 case 2:
1583 *ret++ = in[0] << 2 | in[1] >> 4;
1584 continue;
1585 case 3:
1586 *ret++ = in[1] << 4 | in[2] >> 2;
1587 continue;
1588 case 4:
1589 *ret++ = ((in[2] << 6) & 0xc0) | in[3];
1590 n = 0;
1591 }
1592 }
1593
1594 if(ret > buf) {
1595 hres = IStream_Write(output, buf, ret - buf, NULL);
1596 if(FAILED(hres))
1597 break;
1598 }
1599 }
1600
1601 if(SUCCEEDED(hres))
1602 hres = IStream_Seek(output, pos, STREAM_SEEK_SET, NULL);
1603 if(FAILED(hres)) {
1604 IStream_Release(output);
1605 return hres;
1606 }
1607
1608 *ret_stream = output;
1609 return S_OK;
1610}
#define ARRAY_SIZE(A)
Definition: main.h:20
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
static const signed char base64_decode_table[]
Definition: mimeole.c:1531
return ret
Definition: mutex.c:146
GLdouble n
Definition: glext.h:7729
GLuint in
Definition: glext.h:9616
GLenum GLenum GLenum input
Definition: glext.h:9031
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hres
Definition: protocol.c:465

Referenced by MimeBody_GetData().

◆ decode_qp()

static HRESULT decode_qp ( IStream input,
IStream **  ret_stream 
)
static

Definition at line 1623 of file mimeole.c.

1624{
1625 const unsigned char *ptr, *end;
1626 unsigned char *ret, prev = 0;
1627 unsigned char buf[1024];
1629 IStream *output;
1630 DWORD size;
1631 int n = -1;
1632 HRESULT hres;
1633
1634 pos.QuadPart = 0;
1635 hres = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL);
1636 if(FAILED(hres))
1637 return hres;
1638
1639 hres = CreateStreamOnHGlobal(NULL, TRUE, &output);
1640 if(FAILED(hres))
1641 return hres;
1642
1643 while(1) {
1644 hres = IStream_Read(input, buf, sizeof(buf), &size);
1645 if(FAILED(hres) || !size)
1646 break;
1647
1648 ptr = ret = buf;
1649 end = buf + size;
1650
1651 while(ptr < end) {
1652 unsigned char byte = *ptr++;
1653
1654 switch(n) {
1655 case -1:
1656 if(byte == '=')
1657 n = 0;
1658 else
1659 *ret++ = byte;
1660 continue;
1661 case 0:
1662 prev = byte;
1663 n = 1;
1664 continue;
1665 case 1:
1666 if(prev != '\r' || byte != '\n') {
1667 int h1 = hex_digit(prev), h2 = hex_digit(byte);
1668 if(h1 != -1 && h2 != -1)
1669 *ret++ = (h1 << 4) | h2;
1670 else
1671 *ret++ = '=';
1672 }
1673 n = -1;
1674 continue;
1675 }
1676 }
1677
1678 if(ret > buf) {
1679 hres = IStream_Write(output, buf, ret - buf, NULL);
1680 if(FAILED(hres))
1681 break;
1682 }
1683 }
1684
1685 if(SUCCEEDED(hres))
1686 hres = IStream_Seek(output, pos, STREAM_SEEK_SET, NULL);
1687 if(FAILED(hres)) {
1688 IStream_Release(output);
1689 return hres;
1690 }
1691
1692 *ret_stream = output;
1693 return S_OK;
1694}
#define hex_digit(c)
Definition: btrfs_drv.h:1748
#define byte(x, n)
Definition: tomcrypt.h:118

Referenced by MimeBody_GetData().

◆ empty_body_list()

static void empty_body_list ( struct list list)
static

Definition at line 1977 of file mimeole.c.

1978{
1979 body_t *body, *cursor2;
1981 {
1982 empty_body_list(&body->children);
1983 list_remove(&body->entry);
1984 IMimeBody_Release(&body->mime_body->IMimeBody_iface);
1985 free(body);
1986 }
1987}
static void empty_body_list(struct list *list)
Definition: mimeole.c:1977

Referenced by empty_body_list(), MimeMessage_Load(), and MimeMessage_Release().

◆ empty_header_list()

static void empty_header_list ( struct list list)
static

Definition at line 815 of file mimeole.c.

816{
817 header_t *header, *cursor2;
818
820 {
822 }
823}
static void free_header(header_t *header)
Definition: mimeole.c:807

Referenced by MimeBody_Release().

◆ empty_new_prop_list()

static void empty_new_prop_list ( struct list list)
static

Definition at line 825 of file mimeole.c.

826{
827 property_list_entry_t *prop, *cursor2;
828
830 {
831 list_remove(&prop->entry);
832 free((char *)prop->prop.name);
833 free(prop);
834 }
835}
Definition: mimeole.c:52
struct list entry
Definition: mimeole.c:53
property_t prop
Definition: mimeole.c:54
LPCSTR name
Definition: mimeole.c:45

Referenced by MimeBody_Release().

◆ empty_param_list()

static void empty_param_list ( struct list list)
static

Definition at line 794 of file mimeole.c.

795{
796 param_t *param, *cursor2;
797
799 {
800 list_remove(&param->entry);
801 free(param->name);
802 free(param->value);
803 free(param);
804 }
805}

Referenced by free_header().

◆ find_body()

static HRESULT find_body ( struct list list,
HBODY  hbody,
body_t **  body 
)
static

Definition at line 2313 of file mimeole.c.

2314{
2315 body_t *cur;
2316 HRESULT hr;
2317
2318 if(hbody == HBODY_ROOT)
2319 {
2321 return S_OK;
2322 }
2323
2325 {
2326 if(cur->index == HandleToUlong(hbody))
2327 {
2328 *body = cur;
2329 return S_OK;
2330 }
2331 hr = find_body(&cur->children, hbody, body);
2332 if(hr == S_OK) return S_OK;
2333 }
2334 return S_FALSE;
2335}
#define HandleToUlong(h)
Definition: basetsd.h:73
static HRESULT find_body(struct list *list, HBODY hbody, body_t **body)
Definition: mimeole.c:2313
Definition: list.h:15
#define LIST_ENTRY(type)
Definition: queue.h:175
#define S_FALSE
Definition: winerror.h:3451

Referenced by find_body(), get_body(), MimeMessage_BindToObject(), MimeMessage_CountBodies(), and MimeMessage_FindNext().

◆ find_default_prop()

static const property_t * find_default_prop ( const char name)
static

Definition at line 873 of file mimeole.c.

874{
875 const property_t *prop_def = NULL;
876
877 for(prop_def = default_props; prop_def->name; prop_def++)
878 {
879 if(ISPIDSTR(name))
880 {
881 if(STRTOPID(name) == prop_def->id)
882 {
883 break;
884 }
885 }
886 else if(!lstrcmpiA(name, prop_def->name))
887 {
888 break;
889 }
890 }
891
892 if(prop_def->id)
893 TRACE("%s: found match with default property id %ld\n", prop_def->name, prop_def->id);
894 else
895 prop_def = NULL;
896
897 return prop_def;
898}
static const property_t default_props[]
Definition: mimeole.c:57
DWORD id
Definition: mimeole.c:46

Referenced by MimeBody_SetProp().

◆ find_next()

static HRESULT find_next ( MimeMessage This,
body_t body,
FINDBODY *  find,
HBODY *  out 
)
static

Definition at line 2516 of file mimeole.c.

2517{
2518 struct list *ptr;
2519 HBODY next;
2520
2521 for (;;)
2522 {
2523 if (!body) ptr = list_head( &This->body_tree );
2524 else
2525 {
2526 ptr = list_head( &body->children );
2527 while (!ptr)
2528 {
2529 if (!body->parent) return MIME_E_NOT_FOUND;
2530 if (!(ptr = list_next( &body->parent->children, &body->entry ))) body = body->parent;
2531 }
2532 }
2533
2535 next = UlongToHandle( body->index );
2536 find->dwReserved = body->index;
2537 if (IMimeBody_IsContentType(&body->mime_body->IMimeBody_iface, find->pszPriType,
2538 find->pszSubType) == S_OK)
2539 {
2540 *out = next;
2541 return S_OK;
2542 }
2543 }
2544 return MIME_E_NOT_FOUND;
2545}
#define UlongToHandle(ul)
Definition: basetsd.h:91
static TAGID TAGID find
Definition: db.cpp:156
static unsigned __int64 next
Definition: rand_nt.c:6
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115

Referenced by MimeMessage_FindFirst(), and MimeMessage_FindNext().

◆ find_prop()

static HRESULT find_prop ( MimeBody body,
const char name,
header_t **  prop 
)
static

Definition at line 847 of file mimeole.c.

848{
850
851 *prop = NULL;
852
854 {
855 if(ISPIDSTR(name))
856 {
857 if(STRTOPID(name) == header->prop->id)
858 {
859 *prop = header;
860 return S_OK;
861 }
862 }
863 else if(!lstrcmpiA(name, header->prop->name))
864 {
865 *prop = header;
866 return S_OK;
867 }
868 }
869
870 return MIME_E_NOT_FOUND;
871}

Referenced by MimeBody_GetParameters(), MimeBody_GetProp(), MimeBody_GetPropInfo(), and MimeBody_SetProp().

◆ free_header()

static void free_header ( header_t header)
static

Definition at line 807 of file mimeole.c.

808{
809 list_remove(&header->entry);
811 empty_param_list(&header->params);
812 free(header);
813}
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: combase.c:709
static void empty_param_list(struct list *list)
Definition: mimeole.c:794
WCHAR * value

Referenced by empty_header_list(), and MimeBody_DeleteProp().

◆ get_body()

static HRESULT get_body ( MimeMessage msg,
BODYLOCATION  location,
HBODY  pivot,
body_t **  out 
)
static

Definition at line 2370 of file mimeole.c.

2371{
2372 body_t *root = LIST_ENTRY(list_head(&msg->body_tree), body_t, entry);
2373 body_t *body;
2374 HRESULT hr;
2375 struct list *list;
2376
2377 if(location == IBL_ROOT)
2378 {
2379 *out = root;
2380 return S_OK;
2381 }
2382
2383 hr = find_body(&msg->body_tree, pivot, &body);
2384
2385 if(hr == S_OK)
2386 {
2387 switch(location)
2388 {
2389 case IBL_PARENT:
2390 if(body->parent)
2391 *out = body->parent;
2392 else
2393 hr = MIME_E_NOT_FOUND;
2394 break;
2395
2396 case IBL_FIRST:
2397 list = list_head(&body->children);
2398 if(list)
2400 else
2401 hr = MIME_E_NOT_FOUND;
2402 break;
2403
2404 case IBL_LAST:
2405 list = list_tail(&body->children);
2406 if(list)
2408 else
2409 hr = MIME_E_NOT_FOUND;
2410 break;
2411
2412 case IBL_NEXT:
2413 list = list_next(&body->parent->children, &body->entry);
2414 if(list)
2416 else
2417 hr = MIME_E_NOT_FOUND;
2418 break;
2419
2420 case IBL_PREVIOUS:
2421 list = list_prev(&body->parent->children, &body->entry);
2422 if(list)
2424 else
2425 hr = MIME_E_NOT_FOUND;
2426 break;
2427
2428 default:
2429 hr = E_FAIL;
2430 break;
2431 }
2432 }
2433
2434 return hr;
2435}
static INT pivot(list_t &list, INT i, INT j)
struct _root root
#define E_FAIL
Definition: ddrawi.h:102
#define list
Definition: rosglue.h:35
__WINE_SERVER_LIST_INLINE struct list * list_prev(const struct list *list, const struct list *elem)
Definition: list.h:123
__WINE_SERVER_LIST_INLINE struct list * list_tail(const struct list *list)
Definition: list.h:137

Referenced by MimeMessage_GetBody().

◆ get_stream_size()

static HRESULT get_stream_size ( IStream stream,
ULARGE_INTEGER size 
)
static

Definition at line 445 of file mimeole.c.

446{
447 STATSTG statstg = {NULL};
450
451 hres = IStream_Stat(stream, &statstg, STATFLAG_NONAME);
452 if(SUCCEEDED(hres)) {
453 *size = statstg.cbSize;
454 return S_OK;
455 }
456
457 zero.QuadPart = 0;
458 return IStream_Seek(stream, zero, STREAM_SEEK_END, size);
459}

Referenced by MimeBody_GetData().

◆ hex_digit()

static int hex_digit ( char  c)
static

Definition at line 1612 of file mimeole.c.

1613{
1614 if('0' <= c && c <= '9')
1615 return c - '0';
1616 if('A' <= c && c <= 'F')
1617 return c - 'A' + 10;
1618 if('a' <= c && c <= 'f')
1619 return c - 'a' + 10;
1620 return -1;
1621}
const GLubyte * c
Definition: glext.h:8905

◆ impl_from_IMimeBody()

◆ impl_from_IMimeMessage()

◆ impl_from_IMimePropertySchema()

static propschema * impl_from_IMimePropertySchema ( IMimePropertySchema *  iface)
inlinestatic

◆ impl_from_IMimeSecurity()

static MimeSecurity * impl_from_IMimeSecurity ( IMimeSecurity iface)
inlinestatic

Definition at line 3137 of file mimeole.c.

3138{
3139 return CONTAINING_RECORD(iface, MimeSecurity, IMimeSecurity_iface);
3140}

Referenced by MimeSecurity_AddRef(), and MimeSecurity_Release().

◆ impl_from_IStream()

static sub_stream_t * impl_from_IStream ( IStream iface)
inlinestatic

◆ init_content_encoding()

static void init_content_encoding ( MimeBody body,
header_t header 
)
static

Definition at line 749 of file mimeole.c.

750{
751 const char *encoding = header->value.pszVal;
752
753 if(!stricmp(encoding, "base64"))
754 body->encoding = IET_BASE64;
755 else if(!stricmp(encoding, "quoted-printable"))
756 body->encoding = IET_QP;
757 else if(!stricmp(encoding, "7bit"))
758 body->encoding = IET_7BIT;
759 else if(!stricmp(encoding, "8bit"))
760 body->encoding = IET_8BIT;
761 else
762 FIXME("unknown encoding %s\n", debugstr_a(encoding));
763}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define stricmp(_String1, _String2)
Definition: compat.h:24
#define debugstr_a
Definition: kernel32.h:31
@ IET_QP
Definition: mimeole.idl:235
@ IET_7BIT
Definition: mimeole.idl:236
@ IET_8BIT
Definition: mimeole.idl:237
@ IET_BASE64
Definition: mimeole.idl:233

Referenced by parse_headers().

◆ init_content_type()

static void init_content_type ( MimeBody body,
header_t header 
)
static

Definition at line 731 of file mimeole.c.

732{
733 char *slash;
734 DWORD len;
735
736 slash = strchr(header->value.pszVal, '/');
737 if(!slash)
738 {
739 WARN("malformed context type value\n");
740 return;
741 }
742 len = slash - header->value.pszVal;
743 body->content_pri_type = malloc(len + 1);
744 memcpy(body->content_pri_type, header->value.pszVal, len);
745 body->content_pri_type[len] = '\0';
746 body->content_sub_type = strdup(slash + 1);
747}
static char * strdup(const char *buf)
Definition: string.h:83
GLenum GLsizei len
Definition: glext.h:6722

Referenced by parse_headers().

◆ mime_obj_AddRef()

static ULONG WINAPI mime_obj_AddRef ( IUnknown iface)
static

Definition at line 3659 of file mimeole.c.

3660{
3661 TRACE("\n");
3662 return 2;
3663}

◆ mime_obj_QueryInterface()

static HRESULT WINAPI mime_obj_QueryInterface ( IUnknown iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 3652 of file mimeole.c.

3653{
3654 FIXME("(%s %p)\n", debugstr_guid(riid), ppv);
3655 *ppv = NULL;
3656 return E_NOINTERFACE;
3657}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ mime_obj_Release()

static ULONG WINAPI mime_obj_Release ( IUnknown iface)
static

Definition at line 3665 of file mimeole.c.

3666{
3667 TRACE("\n");
3668 return 1;
3669}

◆ MimeAlloc_AddRef()

static ULONG WINAPI MimeAlloc_AddRef ( IMimeAllocator *  iface)
static

Definition at line 3340 of file mimeole.c.

3342{
3343 return 2;
3344}

◆ MimeAlloc_Alloc()

static LPVOID WINAPI MimeAlloc_Alloc ( IMimeAllocator *  iface,
SIZE_T  cb 
)
static

Definition at line 3352 of file mimeole.c.

3355{
3356 return CoTaskMemAlloc(cb);
3357}
static MonoProfilerRuntimeShutdownBeginCallback cb
Definition: metahost.c:118
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381

◆ MimeAlloc_DidAlloc()

static int WINAPI MimeAlloc_DidAlloc ( IMimeAllocator *  iface,
LPVOID  pv 
)
static

Definition at line 3382 of file mimeole.c.

3385{
3386 FIXME("stub\n");
3387 return 0;
3388}

◆ MimeAlloc_Free()

static void WINAPI MimeAlloc_Free ( IMimeAllocator *  iface,
LPVOID  pv 
)
static

Definition at line 3367 of file mimeole.c.

3370{
3371 CoTaskMemFree(pv);
3372}
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389

◆ MimeAlloc_FreeAddressList()

static HRESULT WINAPI MimeAlloc_FreeAddressList ( IMimeAllocator *  iface,
LPADDRESSLIST  pList 
)
static

Definition at line 3415 of file mimeole.c.

3418{
3419 FIXME("stub\n");
3420 return E_NOTIMPL;
3421}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeAlloc_FreeAddressProps()

static HRESULT WINAPI MimeAlloc_FreeAddressProps ( IMimeAllocator *  iface,
LPADDRESSPROPS  pAddress 
)
static

Definition at line 3423 of file mimeole.c.

3426{
3427 FIXME("stub\n");
3428 return E_NOTIMPL;
3429}

◆ MimeAlloc_FreeEnumHeaderRowArray()

static HRESULT WINAPI MimeAlloc_FreeEnumHeaderRowArray ( IMimeAllocator *  iface,
ULONG  cRows,
LPENUMHEADERROW  prgRow,
boolean  fFreeArray 
)
static

Definition at line 3442 of file mimeole.c.

3447{
3448 FIXME("stub\n");
3449 return E_NOTIMPL;
3450}

◆ MimeAlloc_FreeEnumPropertyArray()

static HRESULT WINAPI MimeAlloc_FreeEnumPropertyArray ( IMimeAllocator *  iface,
ULONG  cProps,
LPENUMPROPERTY  prgProp,
boolean  fFreeArray 
)
static

Definition at line 3452 of file mimeole.c.

3457{
3458 FIXME("stub\n");
3459 return E_NOTIMPL;
3460}

◆ MimeAlloc_FreeParamInfoArray()

static HRESULT WINAPI MimeAlloc_FreeParamInfoArray ( IMimeAllocator *  iface,
ULONG  cParams,
LPMIMEPARAMINFO  prgParam,
boolean  fFreeArray 
)
static

Definition at line 3397 of file mimeole.c.

3402{
3403 ULONG i;
3404 TRACE("(%p)->(%ld, %p, %d)\n", iface, cParams, prgParam, fFreeArray);
3405
3406 for(i = 0; i < cParams; i++)
3407 {
3408 IMimeAllocator_Free(iface, prgParam[i].pszName);
3409 IMimeAllocator_Free(iface, prgParam[i].pszData);
3410 }
3411 if(fFreeArray) IMimeAllocator_Free(iface, prgParam);
3412 return S_OK;
3413}

◆ MimeAlloc_FreeThumbprint()

static HRESULT WINAPI MimeAlloc_FreeThumbprint ( IMimeAllocator *  iface,
THUMBBLOB *  pthumbprint 
)
static

Definition at line 3462 of file mimeole.c.

3465{
3466 FIXME("stub\n");
3467 return E_NOTIMPL;
3468}

◆ MimeAlloc_GetSize()

static SIZE_T WINAPI MimeAlloc_GetSize ( IMimeAllocator *  iface,
LPVOID  pv 
)
static

Definition at line 3374 of file mimeole.c.

3377{
3378 FIXME("stub\n");
3379 return 0;
3380}

◆ MimeAlloc_HeapMinimize()

static void WINAPI MimeAlloc_HeapMinimize ( IMimeAllocator *  iface)
static

Definition at line 3390 of file mimeole.c.

3392{
3393 FIXME("stub\n");
3394 return;
3395}

◆ MimeAlloc_PropVariantClear()

static HRESULT WINAPI MimeAlloc_PropVariantClear ( IMimeAllocator *  iface,
LPPROPVARIANT  pProp 
)
static

Definition at line 3471 of file mimeole.c.

3474{
3475 FIXME("stub\n");
3476 return E_NOTIMPL;
3477}

◆ MimeAlloc_QueryInterface()

static HRESULT WINAPI MimeAlloc_QueryInterface ( IMimeAllocator *  iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 3319 of file mimeole.c.

3323{
3324 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), obj);
3325
3326 if (IsEqualIID(riid, &IID_IUnknown) ||
3327 IsEqualIID(riid, &IID_IMalloc) ||
3328 IsEqualIID(riid, &IID_IMimeAllocator))
3329 {
3330 *obj = iface;
3331 IMimeAllocator_AddRef(iface);
3332 return S_OK;
3333 }
3334
3335 FIXME("no interface for %s\n", debugstr_guid(riid));
3336 *obj = NULL;
3337 return E_NOINTERFACE;
3338}
const GUID IID_IUnknown
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ MimeAlloc_Realloc()

static LPVOID WINAPI MimeAlloc_Realloc ( IMimeAllocator *  iface,
LPVOID  pv,
SIZE_T  cb 
)
static

Definition at line 3359 of file mimeole.c.

3363{
3364 return CoTaskMemRealloc(pv, cb);
3365}
void *WINAPI CoTaskMemRealloc(void *ptr, SIZE_T size)
Definition: malloc.c:397

◆ MimeAlloc_Release()

static ULONG WINAPI MimeAlloc_Release ( IMimeAllocator *  iface)
static

Definition at line 3346 of file mimeole.c.

3348{
3349 return 1;
3350}

◆ MimeAlloc_ReleaseObjects()

static HRESULT WINAPI MimeAlloc_ReleaseObjects ( IMimeAllocator *  iface,
ULONG  cObjects,
IUnknown **  prgpUnknown,
boolean  fFreeArray 
)
static

Definition at line 3431 of file mimeole.c.

3436{
3437 FIXME("stub\n");
3438 return E_NOTIMPL;
3439}

◆ MimeAllocator_create()

HRESULT MimeAllocator_create ( IUnknown outer,
void **  obj 
)

Definition at line 3505 of file mimeole.c.

3506{
3507 if(outer) return CLASS_E_NOAGGREGATION;
3508
3509 *obj = &mime_allocator;
3510 return S_OK;
3511}
static IMimeAllocator mime_allocator
Definition: mimeole.c:3500
static IUnknown * outer
Definition: compobj.c:82
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:3771

Referenced by MimeOleGetAllocator().

◆ MimeBody_AddRef()

static ULONG WINAPI MimeBody_AddRef ( IMimeBody iface)
static

Definition at line 927 of file mimeole.c.

928{
931
932 TRACE("(%p) ref=%ld\n", This, ref);
933
934 return ref;
935}
#define InterlockedIncrement
Definition: armddk.h:53
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:461
long LONG
Definition: pedump.c:60
Definition: send.c:48

◆ MimeBody_AppendProp()

static HRESULT WINAPI MimeBody_AppendProp ( IMimeBody iface,
LPCSTR  pszName,
DWORD  dwFlags,
LPPROPVARIANT  pValue 
)
static

Definition at line 1196 of file mimeole.c.

1201{
1203 FIXME("(%p)->(%s, 0x%lx, %p) stub\n", This, debugstr_a(pszName), dwFlags, pValue);
1204 return E_NOTIMPL;
1205}
PWCHAR pValue
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141

◆ MimeBody_BindToObject()

static HRESULT WINAPI MimeBody_BindToObject ( IMimeBody iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1368 of file mimeole.c.

1372{
1374 FIXME("(%p)->(%s, %p) stub\n", This, debugstr_guid(riid), ppvObject);
1375 return E_NOTIMPL;
1376}

◆ MimeBody_Clone()

static HRESULT WINAPI MimeBody_Clone ( IMimeBody iface,
IMimePropertySet **  ppPropertySet 
)
static

Definition at line 1378 of file mimeole.c.

1381{
1383 FIXME("(%p)->(%p) stub\n", This, ppPropertySet);
1384 return E_NOTIMPL;
1385}

◆ MimeBody_CopyProps()

static HRESULT WINAPI MimeBody_CopyProps ( IMimeBody iface,
ULONG  cNames,
LPCSTR prgszName,
IMimePropertySet *  pPropertySet 
)
static

Definition at line 1234 of file mimeole.c.

1239{
1241 FIXME("(%p)->(%ld, %p, %p) stub\n", This, cNames, prgszName, pPropertySet);
1242 return E_NOTIMPL;
1243}

◆ MimeBody_CopyTo()

static HRESULT WINAPI MimeBody_CopyTo ( IMimeBody iface,
IMimeBody pBody 
)
static

Definition at line 1775 of file mimeole.c.

1778{
1780 FIXME("(%p)->(%p) stub\n", This, pBody);
1781 return E_NOTIMPL;
1782}

◆ MimeBody_create()

HRESULT MimeBody_create ( IUnknown outer,
void **  ppv 
)

Definition at line 1903 of file mimeole.c.

1904{
1905 MimeBody *mb;
1906
1907 if(outer)
1908 return CLASS_E_NOAGGREGATION;
1909
1910 if ((mb = mimebody_create()))
1911 {
1912 *ppv = &mb->IMimeBody_iface;
1913 return S_OK;
1914 }
1915 else
1916 {
1917 *ppv = NULL;
1918 return E_OUTOFMEMORY;
1919 }
1920}

◆ mimebody_create()

static MimeBody * mimebody_create ( void  )
static

Definition at line 1875 of file mimeole.c.

1876{
1877 MimeBody *This;
1878 BODYOFFSETS body_offsets;
1879
1880 This = malloc(sizeof(*This));
1881 if (!This)
1882 return NULL;
1883
1884 This->IMimeBody_iface.lpVtbl = &body_vtbl;
1885 This->ref = 1;
1886 This->handle = NULL;
1887 list_init(&This->headers);
1888 list_init(&This->new_props);
1889 This->next_prop_id = FIRST_CUSTOM_PROP_ID;
1890 This->content_pri_type = NULL;
1891 This->content_sub_type = NULL;
1892 This->encoding = IET_7BIT;
1893 This->data = NULL;
1894 This->data_iid = IID_NULL;
1895
1896 body_offsets.cbBoundaryStart = body_offsets.cbHeaderStart = 0;
1897 body_offsets.cbBodyStart = body_offsets.cbBodyEnd = 0;
1898 MimeBody_set_offsets(This, &body_offsets);
1899
1900 return This;
1901}
#define FIRST_CUSTOM_PROP_ID
Definition: mimeole.c:1873
static IMimeBodyVtbl body_vtbl
Definition: mimeole.c:1817
#define IID_NULL
Definition: guiddef.h:98

Referenced by create_sub_body(), MimeBody_create(), and MimeMessage_create().

◆ MimeBody_DeleteExcept()

static HRESULT WINAPI MimeBody_DeleteExcept ( IMimeBody iface,
ULONG  cNames,
LPCSTR prgszName 
)
static

Definition at line 1256 of file mimeole.c.

1260{
1262 FIXME("(%p)->(%ld, %p) stub\n", This, cNames, prgszName);
1263 return E_NOTIMPL;
1264}

◆ MimeBody_DeleteProp()

static HRESULT WINAPI MimeBody_DeleteProp ( IMimeBody iface,
LPCSTR  pszName 
)
static

Definition at line 1207 of file mimeole.c.

1210{
1213 BOOL found;
1214
1215 TRACE("(%p)->(%s) stub\n", This, debugstr_a(pszName));
1216
1218 {
1219 if(ISPIDSTR(pszName))
1220 found = STRTOPID(pszName) == cursor->prop->id;
1221 else
1222 found = !lstrcmpiA(pszName, cursor->prop->name);
1223
1224 if(found)
1225 {
1227 return S_OK;
1228 }
1229 }
1230
1231 return MIME_E_NOT_FOUND;
1232}
const char cursor[]
Definition: icontest.c:13

◆ MimeBody_EmptyData()

static HRESULT WINAPI MimeBody_EmptyData ( IMimeBody iface)
static

Definition at line 1767 of file mimeole.c.

1769{
1771 FIXME("(%p)->() stub\n", This);
1772 return E_NOTIMPL;
1773}

◆ MimeBody_EnumProps()

static HRESULT WINAPI MimeBody_EnumProps ( IMimeBody iface,
DWORD  dwFlags,
IMimeEnumProperties **  ppEnum 
)
static

Definition at line 1429 of file mimeole.c.

1433{
1435 FIXME("(%p)->(0x%lx, %p) stub\n", This, dwFlags, ppEnum);
1436 return E_NOTIMPL;
1437}

◆ MimeBody_GetCharset()

static HRESULT WINAPI MimeBody_GetCharset ( IMimeBody iface,
LPHCHARSET  phCharset 
)
static

Definition at line 1278 of file mimeole.c.

1281{
1283 FIXME("(%p)->(%p) stub\n", This, phCharset);
1284 *phCharset = NULL;
1285 return S_OK;
1286}

◆ MimeBody_GetClassID()

static HRESULT WINAPI MimeBody_GetClassID ( IMimeBody iface,
CLSID pClassID 
)
static

Definition at line 960 of file mimeole.c.

963{
965
966 TRACE("(%p)->(%p)\n", This, pClassID);
967
968 if(!pClassID)
969 return E_INVALIDARG;
970
971 *pClassID = IID_IMimeBody;
972 return S_OK;
973}
#define E_INVALIDARG
Definition: ddrawi.h:101

◆ MimeBody_GetCurrentEncoding()

static HRESULT WINAPI MimeBody_GetCurrentEncoding ( IMimeBody iface,
ENCODINGTYPE *  pietEncoding 
)
static

Definition at line 1487 of file mimeole.c.

1490{
1492
1493 TRACE("(%p)->(%p)\n", This, pietEncoding);
1494
1495 *pietEncoding = This->encoding;
1496 return S_OK;
1497}

◆ MimeBody_GetData()

static HRESULT WINAPI MimeBody_GetData ( IMimeBody iface,
ENCODINGTYPE  ietEncoding,
IStream **  ppStream 
)
static

Definition at line 1696 of file mimeole.c.

1700{
1703 HRESULT hres;
1704
1705 TRACE("(%p)->(%d %p)\n", This, ietEncoding, ppStream);
1706
1707 if(This->encoding != ietEncoding) {
1708 switch(This->encoding) {
1709 case IET_BASE64:
1710 hres = decode_base64(This->data, ppStream);
1711 break;
1712 case IET_QP:
1713 hres = decode_qp(This->data, ppStream);
1714 break;
1715 default:
1716 FIXME("Decoding %d is not supported.\n", This->encoding);
1717 hres = S_FALSE;
1718 }
1719 if(ietEncoding != IET_BINARY)
1720 FIXME("Encoding %d is not supported.\n", ietEncoding);
1721 if(hres != S_FALSE)
1722 return hres;
1723 }
1724
1725 start.QuadPart = 0;
1726 hres = get_stream_size(This->data, &size);
1727 if(SUCCEEDED(hres))
1728 hres = create_sub_stream(This->data, start, size, ppStream);
1729 return hres;
1730}
static HRESULT decode_base64(IStream *input, IStream **ret_stream)
Definition: mimeole.c:1543
static HRESULT decode_qp(IStream *input, IStream **ret_stream)
Definition: mimeole.c:1623
static HRESULT get_stream_size(IStream *stream, ULARGE_INTEGER *size)
Definition: mimeole.c:445

◆ MimeBody_GetDataHere()

static HRESULT WINAPI MimeBody_GetDataHere ( IMimeBody iface,
ENCODINGTYPE  ietEncoding,
IStream pStream 
)
static

Definition at line 1521 of file mimeole.c.

1525{
1527 FIXME("(%p)->(%d, %p) stub\n", This, ietEncoding, pStream);
1528 return E_NOTIMPL;
1529}

◆ MimeBody_GetDisplayName()

static HRESULT WINAPI MimeBody_GetDisplayName ( IMimeBody iface,
LPSTR ppszDisplay 
)
static

Definition at line 1465 of file mimeole.c.

1468{
1470 FIXME("(%p)->(%p) stub\n", This, ppszDisplay);
1471 return E_NOTIMPL;
1472}

◆ MimeBody_GetEstimatedSize()

static HRESULT WINAPI MimeBody_GetEstimatedSize ( IMimeBody iface,
ENCODINGTYPE  ietEncoding,
ULONG pcbSize 
)
static

Definition at line 1511 of file mimeole.c.

1515{
1517 FIXME("(%p)->(%d, %p) stub\n", This, ietEncoding, pcbSize);
1518 return E_NOTIMPL;
1519}

◆ MimeBody_GetHandle()

static HRESULT WINAPI MimeBody_GetHandle ( IMimeBody iface,
LPHBODY  phBody 
)
static

Definition at line 1803 of file mimeole.c.

1806{
1808 TRACE("(%p)->(%p)\n", iface, phBody);
1809
1810 if(!phBody)
1811 return E_INVALIDARG;
1812
1813 *phBody = This->handle;
1814 return This->handle ? S_OK : MIME_E_NO_DATA;
1815}

◆ MimeBody_GetOffsets()

static HRESULT WINAPI MimeBody_GetOffsets ( IMimeBody iface,
LPBODYOFFSETS  pOffsets 
)
static

Definition at line 1474 of file mimeole.c.

1477{
1479 TRACE("(%p)->(%p)\n", This, pOffsets);
1480
1481 *pOffsets = This->body_offsets;
1482
1483 if(This->body_offsets.cbBodyEnd == 0) return MIME_E_NO_DATA;
1484 return S_OK;
1485}

◆ MimeBody_GetOption()

static HRESULT WINAPI MimeBody_GetOption ( IMimeBody iface,
const TYPEDID  oid,
LPPROPVARIANT  pValue 
)
static

Definition at line 1419 of file mimeole.c.

1423{
1425 FIXME("(%p)->(%08lx, %p): stub\n", This, oid, pValue);
1426 return E_NOTIMPL;
1427}

◆ MimeBody_GetParameters()

static HRESULT WINAPI MimeBody_GetParameters ( IMimeBody iface,
LPCSTR  pszName,
ULONG pcParams,
LPMIMEPARAMINFO *  pprgParam 
)
static

Definition at line 1298 of file mimeole.c.

1303{
1305 HRESULT hr;
1307
1308 TRACE("(%p)->(%s, %p, %p)\n", iface, debugstr_a(pszName), pcParams, pprgParam);
1309
1310 *pprgParam = NULL;
1311 *pcParams = 0;
1312
1313 hr = find_prop(This, pszName, &header);
1314 if(hr != S_OK) return hr;
1315
1316 *pcParams = list_count(&header->params);
1317 if(*pcParams)
1318 {
1319 IMimeAllocator *alloc;
1320 param_t *param;
1321 MIMEPARAMINFO *info;
1322
1324
1325 *pprgParam = info = IMimeAllocator_Alloc(alloc, *pcParams * sizeof(**pprgParam));
1327 {
1328 int len;
1329
1330 len = strlen(param->name) + 1;
1331 info->pszName = IMimeAllocator_Alloc(alloc, len);
1332 memcpy(info->pszName, param->name, len);
1333 len = strlen(param->value) + 1;
1334 info->pszData = IMimeAllocator_Alloc(alloc, len);
1335 memcpy(info->pszData, param->value, len);
1336 info++;
1337 }
1338 IMimeAllocator_Release(alloc);
1339 }
1340 return S_OK;
1341}
static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop)
Definition: mimeole.c:847
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155

◆ MimeBody_GetProp()

static HRESULT WINAPI MimeBody_GetProp ( IMimeBody iface,
LPCSTR  pszName,
DWORD  dwFlags,
LPPROPVARIANT  pValue 
)
static

Definition at line 1068 of file mimeole.c.

1073{
1076 HRESULT hr;
1077
1078 TRACE("(%p)->(%s, 0x%lx, %p)\n", This, debugstr_a(pszName), dwFlags, pValue);
1079
1080 if(!pszName || !pValue)
1081 return E_INVALIDARG;
1082
1083 if(!ISPIDSTR(pszName) && !lstrcmpiA(pszName, "att:pri-content-type"))
1084 {
1086 pValue->vt = VT_LPSTR;
1087 pValue->pszVal = CoTaskMemAlloc(strlen(This->content_pri_type) + 1);
1088 strcpy(pValue->pszVal, This->content_pri_type);
1089 return S_OK;
1090 }
1091
1092 hr = find_prop(This, pszName, &header);
1093 if(hr == S_OK)
1094 {
1095 TRACE("type %d->%d\n", header->value.vt, pValue->vt);
1096
1098 if(FAILED(hr))
1099 FIXME("Conversion not currently supported (%d->%d)\n", header->value.vt, pValue->vt);
1100 }
1101
1102 return hr;
1103}
@ VT_LPSTR
Definition: compat.h:2324
HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc, PROPVAR_CHANGE_FLAGS flags, VARTYPE vt)
Definition: propvar.c:537
strcpy
Definition: string.h:131

◆ MimeBody_GetPropInfo()

static HRESULT WINAPI MimeBody_GetPropInfo ( IMimeBody iface,
LPCSTR  pszName,
LPMIMEPROPINFO  pInfo 
)
static

Definition at line 1014 of file mimeole.c.

1018{
1021 HRESULT hr;
1022 DWORD supported = PIM_PROPID | PIM_VTDEFAULT;
1023
1024 TRACE("(%p)->(%s, %p) semi-stub\n", This, debugstr_a(pszName), pInfo);
1025
1026 if(!pszName || !pInfo)
1027 return E_INVALIDARG;
1028
1029 TRACE("mask 0x%04lx\n", pInfo->dwMask);
1030
1031 if(pInfo->dwMask & ~supported)
1032 FIXME("Unsupported mask flags 0x%04lx\n", pInfo->dwMask & ~supported);
1033
1034 hr = find_prop(This, pszName, &header);
1035 if(hr == S_OK)
1036 {
1037 if(pInfo->dwMask & PIM_CHARSET)
1038 pInfo->hCharset = 0;
1039 if(pInfo->dwMask & PIM_FLAGS)
1040 pInfo->dwFlags = 0x00000000;
1041 if(pInfo->dwMask & PIM_ROWNUMBER)
1042 pInfo->dwRowNumber = 0;
1043 if(pInfo->dwMask & PIM_ENCODINGTYPE)
1044 pInfo->ietEncoding = 0;
1045 if(pInfo->dwMask & PIM_VALUES)
1046 pInfo->cValues = 0;
1047 if(pInfo->dwMask & PIM_PROPID)
1048 pInfo->dwPropId = header->prop->id;
1049 if(pInfo->dwMask & PIM_VTDEFAULT)
1050 pInfo->vtDefault = header->prop->default_vt;
1051 if(pInfo->dwMask & PIM_VTCURRENT)
1052 pInfo->vtCurrent = 0;
1053 }
1054
1055 return hr;
1056}

◆ MimeBody_GetSizeMax()

static HRESULT WINAPI MimeBody_GetSizeMax ( IMimeBody iface,
ULARGE_INTEGER pcbSize 
)
static

Definition at line 997 of file mimeole.c.

1000{
1002 FIXME("(%p)->(%p) stub\n", This, pcbSize);
1003 return E_NOTIMPL;
1004}

◆ MimeBody_GetTransmitInfo()

static HRESULT WINAPI MimeBody_GetTransmitInfo ( IMimeBody iface,
LPTRANSMITINFO  pTransmitInfo 
)
static

Definition at line 1784 of file mimeole.c.

1787{
1789 FIXME("(%p)->(%p) stub\n", This, pTransmitInfo);
1790 return E_NOTIMPL;
1791}

◆ MimeBody_InitNew()

static HRESULT WINAPI MimeBody_InitNew ( IMimeBody iface)
static

Definition at line 1006 of file mimeole.c.

1008{
1010 TRACE("(%p)->()\n", This);
1011 return S_OK;
1012}

◆ MimeBody_IsContentType()

static HRESULT WINAPI MimeBody_IsContentType ( IMimeBody iface,
LPCSTR  pszPriType,
LPCSTR  pszSubType 
)
static

Definition at line 1343 of file mimeole.c.

1347{
1349
1350 TRACE("(%p)->(%s, %s)\n", This, debugstr_a(pszPriType), debugstr_a(pszSubType));
1351 if(pszPriType)
1352 {
1353 const char *pri = This->content_pri_type;
1354 if(!pri) pri = "text";
1355 if(lstrcmpiA(pri, pszPriType)) return S_FALSE;
1356 }
1357
1358 if(pszSubType)
1359 {
1360 const char *sub = This->content_sub_type;
1361 if(!sub) sub = "plain";
1362 if(lstrcmpiA(sub, pszSubType)) return S_FALSE;
1363 }
1364
1365 return S_OK;
1366}

◆ MimeBody_IsDirty()

static HRESULT WINAPI MimeBody_IsDirty ( IMimeBody iface)
static

Definition at line 975 of file mimeole.c.

977{
979 FIXME("(%p)->() stub\n", This);
980 return E_NOTIMPL;
981}

◆ MimeBody_IsType()

static HRESULT WINAPI MimeBody_IsType ( IMimeBody iface,
IMSGBODYTYPE  bodytype 
)
static

Definition at line 1439 of file mimeole.c.

1442{
1444
1445 TRACE("(%p)->(%d)\n", This, bodytype);
1446 switch(bodytype)
1447 {
1448 case IBT_EMPTY:
1449 return This->data ? S_FALSE : S_OK;
1450 default:
1451 FIXME("Unimplemented bodytype %d - returning S_OK\n", bodytype);
1452 }
1453 return S_OK;
1454}

◆ MimeBody_Load()

static HRESULT WINAPI MimeBody_Load ( IMimeBody iface,
IStream pStm 
)
static

Definition at line 983 of file mimeole.c.

984{
986 TRACE("(%p)->(%p)\n", This, pStm);
987 return parse_headers(This, pStm);
988}
static HRESULT parse_headers(MimeBody *body, IStream *stm)
Definition: mimeole.c:765

◆ MimeBody_MoveProps()

static HRESULT WINAPI MimeBody_MoveProps ( IMimeBody iface,
ULONG  cNames,
LPCSTR prgszName,
IMimePropertySet *  pPropertySet 
)
static

Definition at line 1245 of file mimeole.c.

1250{
1252 FIXME("(%p)->(%ld, %p, %p) stub\n", This, cNames, prgszName, pPropertySet);
1253 return E_NOTIMPL;
1254}

◆ MimeBody_QueryInterface()

static HRESULT WINAPI MimeBody_QueryInterface ( IMimeBody iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 900 of file mimeole.c.

903{
904 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObject);
905
906 *ppvObject = NULL;
907
911 IsEqualIID(riid, &IID_IMimePropertySet) ||
912 IsEqualIID(riid, &IID_IMimeBody))
913 {
914 *ppvObject = iface;
915 }
916
917 if(*ppvObject)
918 {
919 IUnknown_AddRef((IUnknown*)*ppvObject);
920 return S_OK;
921 }
922
923 FIXME("no interface for %s\n", debugstr_guid(riid));
924 return E_NOINTERFACE;
925}
const GUID IID_IPersistStreamInit
const GUID IID_IPersist
Definition: proxy.cpp:14

◆ MimeBody_QueryProp()

static HRESULT WINAPI MimeBody_QueryProp ( IMimeBody iface,
LPCSTR  pszName,
LPCSTR  pszCriteria,
boolean  fSubString,
boolean  fCaseSensitive 
)
static

Definition at line 1266 of file mimeole.c.

1272{
1274 FIXME("(%p)->(%s, %s, %d, %d) stub\n", This, debugstr_a(pszName), debugstr_a(pszCriteria), fSubString, fCaseSensitive);
1275 return E_NOTIMPL;
1276}

◆ MimeBody_Release()

static ULONG WINAPI MimeBody_Release ( IMimeBody iface)
static

Definition at line 937 of file mimeole.c.

938{
941
942 TRACE("(%p) ref=%ld\n", This, ref);
943
944 if (!ref)
945 {
946 empty_header_list(&This->headers);
947 empty_new_prop_list(&This->new_props);
948
949 free(This->content_pri_type);
950 free(This->content_sub_type);
951
952 release_data(&This->data_iid, This->data);
953
954 free(This);
955 }
956
957 return ref;
958}
#define InterlockedDecrement
Definition: armddk.h:52
static void empty_new_prop_list(struct list *list)
Definition: mimeole.c:825
static void release_data(REFIID riid, void *data)
Definition: mimeole.c:837
static void empty_header_list(struct list *list)
Definition: mimeole.c:815

Referenced by MimeMessage_IsBodyType().

◆ MimeBody_Save()

static HRESULT WINAPI MimeBody_Save ( IMimeBody iface,
IStream pStm,
BOOL  fClearDirty 
)
static

Definition at line 990 of file mimeole.c.

991{
993 FIXME("(%p)->(%p, %d)\n", This, pStm, fClearDirty);
994 return E_NOTIMPL;
995}

◆ MimeBody_SaveToFile()

static HRESULT WINAPI MimeBody_SaveToFile ( IMimeBody iface,
ENCODINGTYPE  ietEncoding,
LPCSTR  pszFilePath 
)
static

Definition at line 1793 of file mimeole.c.

1797{
1799 FIXME("(%p)->(%d, %s) stub\n", This, ietEncoding, debugstr_a(pszFilePath));
1800 return E_NOTIMPL;
1801}

◆ MimeBody_set_offsets()

static HRESULT MimeBody_set_offsets ( MimeBody body,
const BODYOFFSETS *  offsets 
)
static

Definition at line 1864 of file mimeole.c.

1865{
1866 TRACE("setting offsets to %ld, %ld, %ld, %ld\n", offsets->cbBoundaryStart,
1867 offsets->cbHeaderStart, offsets->cbBodyStart, offsets->cbBodyEnd);
1868
1869 body->body_offsets = *offsets;
1870 return S_OK;
1871}
static const FxOffsetAndName offsets[]

Referenced by create_sub_body(), mimebody_create(), and MimeMessage_Load().

◆ MimeBody_SetCharset()

static HRESULT WINAPI MimeBody_SetCharset ( IMimeBody iface,
HCHARSET  hCharset,
CSETAPPLYTYPE  applytype 
)
static

Definition at line 1288 of file mimeole.c.

1292{
1294 FIXME("(%p)->(%p, %d) stub\n", This, hCharset, applytype);
1295 return E_NOTIMPL;
1296}

◆ MimeBody_SetCurrentEncoding()

static HRESULT WINAPI MimeBody_SetCurrentEncoding ( IMimeBody iface,
ENCODINGTYPE  ietEncoding 
)
static

Definition at line 1499 of file mimeole.c.

1502{
1504
1505 TRACE("(%p)->(%d)\n", This, ietEncoding);
1506
1507 This->encoding = ietEncoding;
1508 return S_OK;
1509}

◆ MimeBody_SetData()

static HRESULT WINAPI MimeBody_SetData ( IMimeBody iface,
ENCODINGTYPE  ietEncoding,
LPCSTR  pszPriType,
LPCSTR  pszSubType,
REFIID  riid,
LPVOID  pvObject 
)
static

Definition at line 1732 of file mimeole.c.

1739{
1741 TRACE("(%p)->(%d, %s, %s, %s %p)\n", This, ietEncoding, debugstr_a(pszPriType), debugstr_a(pszSubType),
1742 debugstr_guid(riid), pvObject);
1743
1744 if(IsEqualIID(riid, &IID_IStream))
1745 IStream_AddRef((IStream *)pvObject);
1746 else
1747 {
1748 FIXME("Unhandled object type %s\n", debugstr_guid(riid));
1749 return E_INVALIDARG;
1750 }
1751
1752 if(This->data)
1753 release_data(&This->data_iid, This->data);
1754
1755 This->data_iid = *riid;
1756 This->data = pvObject;
1757
1758 IMimeBody_SetCurrentEncoding(iface, ietEncoding);
1759
1760 /* FIXME: Update the content type.
1761 If pszPriType == NULL use 'application'
1762 If pszSubType == NULL use 'octet-stream' */
1763
1764 return S_OK;
1765}

◆ MimeBody_SetDisplayName()

static HRESULT WINAPI MimeBody_SetDisplayName ( IMimeBody iface,
LPCSTR  pszDisplay 
)
static

Definition at line 1456 of file mimeole.c.

1459{
1461 FIXME("(%p)->(%s) stub\n", This, debugstr_a(pszDisplay));
1462 return E_NOTIMPL;
1463}

◆ MimeBody_SetOption()

static HRESULT WINAPI MimeBody_SetOption ( IMimeBody iface,
const TYPEDID  oid,
LPCPROPVARIANT  pValue 
)
static

Definition at line 1387 of file mimeole.c.

1391{
1394 TRACE("(%p)->(%08lx, %p)\n", This, oid, pValue);
1395
1396 if(pValue->vt != TYPEDID_TYPE(oid))
1397 {
1398 WARN("Called with vartype %04x and oid %08lx\n", pValue->vt, oid);
1399 return E_INVALIDARG;
1400 }
1401
1402 switch(oid)
1403 {
1404 case OID_SECURITY_HWND_OWNER:
1405 FIXME("OID_SECURITY_HWND_OWNER (value %08lx): ignoring\n", pValue->ulVal);
1406 hr = S_OK;
1407 break;
1408 case OID_TRANSMIT_BODY_ENCODING:
1409 FIXME("OID_TRANSMIT_BODY_ENCODING (value %08lx): ignoring\n", pValue->ulVal);
1410 hr = S_OK;
1411 break;
1412 default:
1413 FIXME("Unhandled oid %08lx\n", oid);
1414 }
1415
1416 return hr;
1417}

◆ MimeBody_SetProp()

static HRESULT WINAPI MimeBody_SetProp ( IMimeBody iface,
LPCSTR  pszName,
DWORD  dwFlags,
LPCPROPVARIANT  pValue 
)
static

Definition at line 1105 of file mimeole.c.

1110{
1113 HRESULT hr;
1114
1115 TRACE("(%p)->(%s, 0x%lx, %p)\n", This, debugstr_a(pszName), dwFlags, pValue);
1116
1117 if(!pszName || !pValue)
1118 return E_INVALIDARG;
1119
1120 hr = find_prop(This, pszName, &header);
1121 if(hr != S_OK)
1122 {
1123 property_list_entry_t *prop_entry;
1124 const property_t *prop = NULL;
1125
1126 LIST_FOR_EACH_ENTRY(prop_entry, &This->new_props, property_list_entry_t, entry)
1127 {
1128 if(ISPIDSTR(pszName))
1129 {
1130 if(STRTOPID(pszName) == prop_entry->prop.id)
1131 {
1132 TRACE("Found match with already added new property id %ld\n", prop_entry->prop.id);
1133 prop = &prop_entry->prop;
1134 break;
1135 }
1136 }
1137 else if(!lstrcmpiA(pszName, prop_entry->prop.name))
1138 {
1139 TRACE("Found match with already added new property id %ld\n", prop_entry->prop.id);
1140 prop = &prop_entry->prop;
1141 break;
1142 }
1143 }
1144
1145 header = malloc(sizeof(*header));
1146 if(!header)
1147 return E_OUTOFMEMORY;
1148
1149 if(!prop)
1150 {
1151 const property_t *prop_def = NULL;
1152 prop_entry = malloc(sizeof(*prop_entry));
1153 if(!prop_entry)
1154 {
1155 free(header);
1156 return E_OUTOFMEMORY;
1157 }
1158
1159 prop_def = find_default_prop(pszName);
1160 if(prop_def)
1161 {
1162 prop_entry->prop.name = strdup(prop_def->name);
1163 prop_entry->prop.id = prop_def->id;
1164 }
1165 else
1166 {
1167 if(ISPIDSTR(pszName))
1168 {
1169 free(prop_entry);
1170 free(header);
1171 return MIME_E_NOT_FOUND;
1172 }
1173
1174 prop_entry->prop.name = strdup(pszName);
1175 prop_entry->prop.id = This->next_prop_id++;
1176 }
1177
1178 prop_entry->prop.flags = 0;
1179 prop_entry->prop.default_vt = pValue->vt;
1180 list_add_tail(&This->new_props, &prop_entry->entry);
1181 prop = &prop_entry->prop;
1182 TRACE("Allocating new prop id %ld\n", prop_entry->prop.id);
1183 }
1184
1185 header->prop = prop;
1186 PropVariantInit(&header->value);
1187 list_init(&header->params);
1188 list_add_tail(&This->headers, &header->entry);
1189 }
1190
1192
1193 return S_OK;
1194}
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
Definition: combase.c:827
static const property_t * find_default_prop(const char *name)
Definition: mimeole.c:873
DWORD flags
Definition: mimeole.c:47
VARTYPE default_vt
Definition: mimeole.c:48

◆ MimeBody_SetPropInfo()

static HRESULT WINAPI MimeBody_SetPropInfo ( IMimeBody iface,
LPCSTR  pszName,
LPCMIMEPROPINFO  pInfo 
)
static

Definition at line 1058 of file mimeole.c.

1062{
1064 FIXME("(%p)->(%s, %p) stub\n", This, debugstr_a(pszName), pInfo);
1065 return E_NOTIMPL;
1066}

◆ MimeGetAddressFormatW()

HRESULT WINAPI MimeGetAddressFormatW ( REFIID  riid,
void object,
DWORD  addr_type,
ADDRESSFORMAT  addr_format,
WCHAR **  address 
)

Definition at line 3644 of file mimeole.c.

3646{
3647 FIXME("(%s, %p, %ld, %d, %p) stub\n", debugstr_guid(riid), object, addr_type, addr_format, address);
3648
3649 return E_NOTIMPL;
3650}
GLuint address
Definition: glext.h:9393

◆ MimeMessage_AddRef()

static ULONG WINAPI MimeMessage_AddRef ( IMimeMessage iface)
static

Definition at line 1967 of file mimeole.c.

1968{
1971
1972 TRACE("(%p) ref=%ld\n", This, ref);
1973
1974 return ref;
1975}
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1942

◆ MimeMessage_AttachFile()

static HRESULT WINAPI MimeMessage_AttachFile ( IMimeMessage iface,
LPCSTR  pszFilePath,
IStream pstmFile,
LPHBODY  phBody 
)
static

Definition at line 2883 of file mimeole.c.

2888{
2889 FIXME("(%p)->(%s, %p, %p)\n", iface, pszFilePath, pstmFile, phBody);
2890 return E_NOTIMPL;
2891}

◆ MimeMessage_AttachObject()

static HRESULT WINAPI MimeMessage_AttachObject ( IMimeMessage iface,
REFIID  riid,
void pvObject,
LPHBODY  phBody 
)
static

Definition at line 2873 of file mimeole.c.

2878{
2879 FIXME("(%p)->(%s, %p, %p)\n", iface, debugstr_guid(riid), pvObject, phBody);
2880 return E_NOTIMPL;
2881}

◆ MimeMessage_AttachURL()

static HRESULT WINAPI MimeMessage_AttachURL ( IMimeMessage iface,
LPCSTR  pszBase,
LPCSTR  pszURL,
DWORD  dwFlags,
IStream pstmURL,
LPSTR ppszCIDURL,
LPHBODY  phBody 
)
static

Definition at line 2893 of file mimeole.c.

2901{
2902 FIXME("(%p)->(%s, %s, 0x%lx, %p, %p, %p)\n", iface, pszBase, pszURL, dwFlags, pstmURL, ppszCIDURL, phBody);
2903 return E_NOTIMPL;
2904}

◆ MimeMessage_BindToObject()

static HRESULT WINAPI MimeMessage_BindToObject ( IMimeMessage iface,
const HBODY  hBody,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 2337 of file mimeole.c.

2339{
2341 HRESULT hr;
2342 body_t *body;
2343
2344 TRACE("(%p)->(%p, %s, %p)\n", iface, hBody, debugstr_guid(riid), ppvObject);
2345
2346 hr = find_body(&This->body_tree, hBody, &body);
2347
2348 if(hr != S_OK) return hr;
2349
2350 if(IsEqualIID(riid, &IID_IMimeBody))
2351 {
2352 IMimeBody_AddRef(&body->mime_body->IMimeBody_iface);
2353 *ppvObject = &body->mime_body->IMimeBody_iface;
2354 return S_OK;
2355 }
2356
2357 return E_NOINTERFACE;
2358}

◆ MimeMessage_Commit()

static HRESULT WINAPI MimeMessage_Commit ( IMimeMessage iface,
DWORD  dwFlags 
)
static

Definition at line 2297 of file mimeole.c.

2300{
2301 FIXME("(%p)->(0x%lx)\n", iface, dwFlags);
2302 return S_OK;
2303}

◆ MimeMessage_CountBodies()

static HRESULT WINAPI MimeMessage_CountBodies ( IMimeMessage iface,
HBODY  hParent,
boolean  fRecurse,
ULONG pcBodies 
)
static

Definition at line 2498 of file mimeole.c.

2500{
2501 HRESULT hr;
2503 body_t *body;
2504
2505 TRACE("(%p)->(%p, %s, %p)\n", iface, hParent, fRecurse ? "TRUE" : "FALSE", pcBodies);
2506
2507 hr = find_body(&This->body_tree, hParent, &body);
2508 if(hr != S_OK) return hr;
2509
2510 *pcBodies = 1;
2511 count_children(body, fRecurse, pcBodies);
2512
2513 return S_OK;
2514}

◆ MimeMessage_create()

HRESULT MimeMessage_create ( IUnknown outer,
void **  obj 
)

Definition at line 3068 of file mimeole.c.

3069{
3071 MimeBody *mime_body;
3072 body_t *root_body;
3073
3074 TRACE("(%p, %p)\n", outer, obj);
3075
3076 if (outer)
3077 {
3078 FIXME("outer unknown not supported yet\n");
3079 return E_NOTIMPL;
3080 }
3081
3082 *obj = NULL;
3083
3084 This = malloc(sizeof(*This));
3085 if (!This) return E_OUTOFMEMORY;
3086
3087 This->IMimeMessage_iface.lpVtbl = &MimeMessageVtbl;
3088 This->ref = 1;
3089 This->stream = NULL;
3090 list_init(&This->body_tree);
3091 This->next_index = 1;
3092
3093 mime_body = mimebody_create();
3094 root_body = new_body_entry(mime_body, This->next_index++, NULL);
3095 list_add_head(&This->body_tree, &root_body->entry);
3096
3097 *obj = &This->IMimeMessage_iface;
3098 return S_OK;
3099}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
static const IMimeMessageVtbl MimeMessageVtbl
Definition: mimeole.c:3008

Referenced by load_mime_message(), and MimeOleCreateMessage().

◆ MimeMessage_CreateWebPage()

static HRESULT WINAPI MimeMessage_CreateWebPage ( IMimeMessage iface,
IStream pRootStm,
LPWEBPAGEOPTIONS  pOptions,
IMimeMessageCallback *  pCallback,
IMoniker **  ppMoniker 
)
static

Definition at line 2763 of file mimeole.c.

2769{
2770 FIXME("(%p)->(%p, %p, %p, %p)\n", iface, pRootStm, pOptions, pCallback, ppMoniker);
2771 *ppMoniker = NULL;
2772 return E_NOTIMPL;
2773}
FxPnpStateCallbackInfo * pCallback

◆ MimeMessage_DeleteBody()

static HRESULT WINAPI MimeMessage_DeleteBody ( IMimeMessage iface,
HBODY  hBody,
DWORD  dwFlags 
)
static

Definition at line 2469 of file mimeole.c.

2473{
2474 FIXME("(%p)->(%p, %08lx)\n", iface, hBody, dwFlags);
2475 return E_NOTIMPL;
2476}

◆ MimeMessage_DeleteBodyProp()

static HRESULT WINAPI MimeMessage_DeleteBodyProp ( IMimeMessage iface,
HBODY  hBody,
LPCSTR  pszName 
)
static

Definition at line 2699 of file mimeole.c.

2703{
2704 FIXME("(%p)->(%p, %s)\n", iface, hBody, pszName);
2705 return E_NOTIMPL;
2706}

◆ MimeMessage_DeleteProp()

static HRESULT WINAPI MimeMessage_DeleteProp ( IMimeMessage iface,
LPCSTR  pszName 
)
static

Definition at line 2795 of file mimeole.c.

2798{
2799 FIXME("(%p)->(%s)\n", iface, pszName);
2800 return E_NOTIMPL;
2801}

◆ MimeMessage_EnumAddressTypes()

static HRESULT WINAPI MimeMessage_EnumAddressTypes ( IMimeMessage iface,
DWORD  dwAdrTypes,
DWORD  dwProps,
IMimeEnumAddressTypes **  ppEnum 
)
static

Definition at line 2981 of file mimeole.c.

2986{
2987 FIXME("(%p)->(%ld, %ld, %p)\n", iface, dwAdrTypes, dwProps, ppEnum);
2988 return E_NOTIMPL;
2989}

◆ MimeMessage_FindFirst()

static HRESULT WINAPI MimeMessage_FindFirst ( IMimeMessage iface,
FINDBODY *  pFindBody,
HBODY *  phBody 
)
static

Definition at line 2547 of file mimeole.c.

2548{
2550
2551 TRACE("(%p)->(%p, %p)\n", iface, pFindBody, phBody);
2552
2553 pFindBody->dwReserved = 0;
2554 return find_next(This, NULL, pFindBody, phBody);
2555}
static HRESULT find_next(MimeMessage *This, body_t *body, FINDBODY *find, HBODY *out)
Definition: mimeole.c:2516

◆ MimeMessage_FindNext()

static HRESULT WINAPI MimeMessage_FindNext ( IMimeMessage iface,
FINDBODY *  pFindBody,
HBODY *  phBody 
)
static

Definition at line 2557 of file mimeole.c.

2558{
2560 body_t *body;
2561 HRESULT hr;
2562
2563 TRACE("(%p)->(%p, %p)\n", iface, pFindBody, phBody);
2564
2565 hr = find_body( &This->body_tree, UlongToHandle( pFindBody->dwReserved ), &body );
2566 if (hr != S_OK) return MIME_E_NOT_FOUND;
2567 return find_next(This, body, pFindBody, phBody);
2568}

◆ MimeMessage_GetAddressFormat()

static HRESULT WINAPI MimeMessage_GetAddressFormat ( IMimeMessage iface,
DWORD  dwAdrTypes,
ADDRESSFORMAT  format,
LPSTR ppszFormat 
)
static

Definition at line 2971 of file mimeole.c.

2976{
2977 FIXME("(%p)->(%ld, %d, %p)\n", iface, dwAdrTypes, format, ppszFormat);
2978 return E_NOTIMPL;
2979}
Definition: format.c:58

◆ MimeMessage_GetAddressTable()

static HRESULT WINAPI MimeMessage_GetAddressTable ( IMimeMessage iface,
IMimeAddressTable **  ppTable 
)
static

Definition at line 2945 of file mimeole.c.

2948{
2949 FIXME("(%p)->(%p)\n", iface, ppTable);
2950 return E_NOTIMPL;
2951}

◆ MimeMessage_GetAddressTypes()

static HRESULT WINAPI MimeMessage_GetAddressTypes ( IMimeMessage iface,
DWORD  dwAdrTypes,
DWORD  dwProps,
LPADDRESSLIST  pList 
)
static

Definition at line 2961 of file mimeole.c.

2966{
2967 FIXME("(%p)->(%ld, %ld, %p)\n", iface, dwAdrTypes, dwProps, pList);
2968 return E_NOTIMPL;
2969}
FxChildList * pList

◆ MimeMessage_GetAttachments()

static HRESULT WINAPI MimeMessage_GetAttachments ( IMimeMessage iface,
ULONG pcAttach,
LPHBODY *  pprghAttach 
)
static

Definition at line 2906 of file mimeole.c.

2910{
2911 HRESULT hr;
2912 FINDBODY find_struct;
2913 HBODY hbody;
2914 LPHBODY array;
2915 ULONG size = 10;
2916
2917 TRACE("(%p)->(%p, %p)\n", iface, pcAttach, pprghAttach);
2918
2919 *pcAttach = 0;
2920 array = CoTaskMemAlloc(size * sizeof(HBODY));
2921
2922 find_struct.pszPriType = find_struct.pszSubType = NULL;
2923 hr = IMimeMessage_FindFirst(iface, &find_struct, &hbody);
2924 while(hr == S_OK)
2925 {
2926 hr = IMimeMessage_IsContentType(iface, hbody, "multipart", NULL);
2927 TRACE("IsCT rets %08lx %ld\n", hr, *pcAttach);
2928 if(hr != S_OK)
2929 {
2930 if(*pcAttach + 1 > size)
2931 {
2932 size *= 2;
2933 array = CoTaskMemRealloc(array, size * sizeof(HBODY));
2934 }
2935 array[*pcAttach] = hbody;
2936 (*pcAttach)++;
2937 }
2938 hr = IMimeMessage_FindNext(iface, &find_struct, &hbody);
2939 }
2940
2941 *pprghAttach = array;
2942 return S_OK;
2943}
HBODY * LPHBODY
Definition: mimeole.idl:203
Definition: undname.c:54

◆ MimeMessage_GetBody()

static HRESULT WINAPI MimeMessage_GetBody ( IMimeMessage iface,
BODYLOCATION  location,
HBODY  hPivot,
HBODY *  phBody 
)
static

Definition at line 2448 of file mimeole.c.

2450{
2452 body_t *body;
2453 HRESULT hr;
2454
2455 TRACE("(%p)->(%d, %p, %p)\n", iface, location, hPivot, phBody);
2456
2457 if(!phBody)
2458 return E_INVALIDARG;
2459
2460 *phBody = NULL;
2461
2462 hr = get_body(This, location, hPivot, &body);
2463
2464 if(hr == S_OK) *phBody = UlongToHandle(body->index);
2465
2466 return hr;
2467}
static HRESULT get_body(MimeMessage *msg, BODYLOCATION location, HBODY pivot, body_t **out)
Definition: mimeole.c:2370

◆ MimeMessage_GetBodyOffsets()

static HRESULT WINAPI MimeMessage_GetBodyOffsets ( IMimeMessage iface,
HBODY  hBody,
LPBODYOFFSETS  pOffsets 
)
static

Definition at line 2592 of file mimeole.c.

2596{
2597 FIXME("(%p)->(%p, %p)\n", iface, hBody, pOffsets);
2598 return E_NOTIMPL;
2599}

◆ MimeMessage_GetBodyProp()

static HRESULT WINAPI MimeMessage_GetBodyProp ( IMimeMessage iface,
HBODY  hBody,
LPCSTR  pszName,
DWORD  dwFlags,
LPPROPVARIANT  pValue 
)
static

Definition at line 2667 of file mimeole.c.

2673{
2674 HRESULT hr;
2675 IMimeBody *mime_body;
2676
2677 TRACE("(%p)->(%p, %s, 0x%lx, %p)\n", iface, hBody, pszName, dwFlags, pValue);
2678
2679 hr = IMimeMessage_BindToObject(iface, hBody, &IID_IMimeBody, (void**)&mime_body);
2680 if(hr != S_OK) return hr;
2681
2682 hr = IMimeBody_GetProp(mime_body, pszName, dwFlags, pValue);
2683 IMimeBody_Release(mime_body);
2684
2685 return hr;
2686}

◆ MimeMessage_GetCharset()

static HRESULT WINAPI MimeMessage_GetCharset ( IMimeMessage iface,
LPHCHARSET  phCharset 
)
static

Definition at line 2601 of file mimeole.c.

2604{
2605 FIXME("(%p)->(%p)\n", iface, phCharset);
2606 *phCharset = NULL;
2607 return S_OK;
2608}

◆ MimeMessage_GetClassID()

static HRESULT WINAPI MimeMessage_GetClassID ( IMimeMessage iface,
CLSID pClassID 
)
static

Definition at line 2008 of file mimeole.c.

2011{
2012 FIXME("(%p)->(%p)\n", iface, pClassID);
2013 return E_NOTIMPL;
2014}

◆ MimeMessage_GetFlags()

static HRESULT WINAPI MimeMessage_GetFlags ( IMimeMessage iface,
DWORD pdwFlags 
)
static

Definition at line 2289 of file mimeole.c.

2292{
2293 FIXME("(%p)->(%p)\n", iface, pdwFlags);
2294 return E_NOTIMPL;
2295}

◆ MimeMessage_GetMessageSize()

static HRESULT WINAPI MimeMessage_GetMessageSize ( IMimeMessage iface,
ULONG pcbSize,
DWORD  dwFlags 
)
static

Definition at line 2262 of file mimeole.c.

2266{
2267 FIXME("(%p)->(%p, 0x%lx)\n", iface, pcbSize, dwFlags);
2268 return E_NOTIMPL;
2269}

◆ MimeMessage_GetMessageSource()

static HRESULT WINAPI MimeMessage_GetMessageSource ( IMimeMessage iface,
IStream **  ppStream,
DWORD  dwFlags 
)
static

Definition at line 2250 of file mimeole.c.

2252{
2254
2255 FIXME("(%p)->(%p, 0x%lx)\n", iface, ppStream, dwFlags);
2256
2257 IStream_AddRef(This->stream);
2258 *ppStream = This->stream;
2259 return S_OK;
2260}

◆ MimeMessage_GetOption()

static HRESULT WINAPI MimeMessage_GetOption ( IMimeMessage iface,
const TYPEDID  oid,
LPPROPVARIANT  pValue 
)
static

Definition at line 2753 of file mimeole.c.

2757{
2758 FIXME("(%p)->(%08lx, %p)\n", iface, oid, pValue);
2759 return E_NOTIMPL;
2760}

◆ MimeMessage_GetProp()

static HRESULT WINAPI MimeMessage_GetProp ( IMimeMessage iface,
LPCSTR  pszName,
DWORD  dwFlags,
LPPROPVARIANT  pValue 
)
static

Definition at line 2775 of file mimeole.c.

2780{
2781 FIXME("(%p)->(%s, 0x%lx, %p)\n", iface, pszName, dwFlags, pValue);
2782 return E_NOTIMPL;
2783}

◆ MimeMessage_GetRootMoniker()

static HRESULT WINAPI MimeMessage_GetRootMoniker ( IMimeMessage iface,
IMoniker **  ppMoniker 
)
static

Definition at line 3000 of file mimeole.c.

3003{
3004 FIXME("(%p)->(%p)\n", iface, ppMoniker);
3005 return E_NOTIMPL;
3006}

◆ MimeMessage_GetSender()

static HRESULT WINAPI MimeMessage_GetSender ( IMimeMessage iface,
LPADDRESSPROPS  pAddress 
)
static

Definition at line 2953 of file mimeole.c.

2956{
2957 FIXME("(%p)->(%p)\n", iface, pAddress);
2958 return E_NOTIMPL;
2959}

◆ MimeMessage_GetSizeMax()

static HRESULT WINAPI MimeMessage_GetSizeMax ( IMimeMessage iface,
ULARGE_INTEGER pcbSize 
)
static

Definition at line 2234 of file mimeole.c.

2237{
2238 FIXME("(%p)->(%p)\n", iface, pcbSize);
2239 return E_NOTIMPL;
2240}

◆ MimeMessage_GetTextBody()

static HRESULT WINAPI MimeMessage_GetTextBody ( IMimeMessage iface,
DWORD  dwTxtType,
ENCODINGTYPE  ietEncoding,
IStream **  pStream,
LPHBODY  phBody 
)
static

Definition at line 2814 of file mimeole.c.

2820{
2821 HRESULT hr;
2822 HBODY hbody;
2823 FINDBODY find_struct;
2824 IMimeBody *mime_body;
2825 static char text[] = "text";
2826 static char plain[] = "plain";
2827 static char html[] = "html";
2828
2829 TRACE("(%p)->(%ld, %d, %p, %p)\n", iface, dwTxtType, ietEncoding, pStream, phBody);
2830
2831 find_struct.pszPriType = text;
2832
2833 switch(dwTxtType)
2834 {
2835 case TXT_PLAIN:
2836 find_struct.pszSubType = plain;
2837 break;
2838 case TXT_HTML:
2839 find_struct.pszSubType = html;
2840 break;
2841 default:
2842 return MIME_E_INVALID_TEXT_TYPE;
2843 }
2844
2845 hr = IMimeMessage_FindFirst(iface, &find_struct, &hbody);
2846 if(hr != S_OK)
2847 {
2848 TRACE("not found hr %08lx\n", hr);
2849 *phBody = NULL;
2850 return hr;
2851 }
2852
2853 IMimeMessage_BindToObject(iface, hbody, &IID_IMimeBody, (void**)&mime_body);
2854
2855 IMimeBody_GetData(mime_body, ietEncoding, pStream);
2856 *phBody = hbody;
2857 IMimeBody_Release(mime_body);
2858 return hr;
2859}
const WCHAR * text
Definition: package.c:1794

◆ MimeMessage_HandsOffStorage()

static HRESULT WINAPI MimeMessage_HandsOffStorage ( IMimeMessage iface)
static

Definition at line 2306 of file mimeole.c.

2308{
2309 FIXME("(%p)->()\n", iface);
2310 return E_NOTIMPL;
2311}

◆ MimeMessage_InitNew()

static HRESULT WINAPI MimeMessage_InitNew ( IMimeMessage iface)
static

Definition at line 2242 of file mimeole.c.

2244{
2245 FIXME("(%p)->()\n", iface);
2246 return E_NOTIMPL;
2247}

◆ MimeMessage_InsertBody()

static HRESULT WINAPI MimeMessage_InsertBody ( IMimeMessage iface,
BODYLOCATION  location,
HBODY  hPivot,
LPHBODY  phBody 
)
static

Definition at line 2438 of file mimeole.c.

2443{
2444 FIXME("(%p)->(%d, %p, %p)\n", iface, location, hPivot, phBody);
2445 return E_NOTIMPL;
2446}

◆ MimeMessage_IsBodyType()

static HRESULT WINAPI MimeMessage_IsBodyType ( IMimeMessage iface,
HBODY  hBody,
IMSGBODYTYPE  bodytype 
)
static

Definition at line 2619 of file mimeole.c.

2623{
2624 HRESULT hr;
2625 IMimeBody *mime_body;
2626 TRACE("(%p)->(%p, %d)\n", iface, hBody, bodytype);
2627
2628 hr = IMimeMessage_BindToObject(iface, hBody, &IID_IMimeBody, (void**)&mime_body);
2629 if(hr != S_OK) return hr;
2630
2631 hr = IMimeBody_IsType(mime_body, bodytype);
2632 MimeBody_Release(mime_body);
2633 return hr;
2634}
static ULONG WINAPI MimeBody_Release(IMimeBody *iface)
Definition: mimeole.c:937

◆ MimeMessage_IsContentType()

static HRESULT WINAPI MimeMessage_IsContentType ( IMimeMessage iface,
HBODY  hBody,
LPCSTR  pszPriType,
LPCSTR  pszSubType 
)
static

Definition at line 2636 of file mimeole.c.

2641{
2642 HRESULT hr;
2643 IMimeBody *mime_body;
2644 TRACE("(%p)->(%p, %s, %s)\n", iface, hBody, debugstr_a(pszPriType),
2645 debugstr_a(pszSubType));
2646
2647 hr = IMimeMessage_BindToObject(iface, hBody, &IID_IMimeBody, (void**)&mime_body);
2648 if(FAILED(hr)) return hr;
2649
2650 hr = IMimeBody_IsContentType(mime_body, pszPriType, pszSubType);
2651 IMimeBody_Release(mime_body);
2652 return hr;
2653}

◆ MimeMessage_IsDirty()

static HRESULT WINAPI MimeMessage_IsDirty ( IMimeMessage iface)
static

Definition at line 2017 of file mimeole.c.

2019{
2020 FIXME("(%p)->()\n", iface);
2021 return E_NOTIMPL;
2022}

◆ MimeMessage_Load()

static HRESULT WINAPI MimeMessage_Load ( IMimeMessage iface,
IStream pStm 
)
static

Definition at line 2193 of file mimeole.c.

2194{
2196 body_t *root_body;
2197 BODYOFFSETS offsets;
2200
2201 TRACE("(%p)->(%p)\n", iface, pStm);
2202
2203 if(This->stream)
2204 {
2205 FIXME("already loaded a message\n");
2206 return E_FAIL;
2207 }
2208
2209 empty_body_list(&This->body_tree);
2210
2211 IStream_AddRef(pStm);
2212 This->stream = pStm;
2213 offsets.cbBoundaryStart = offsets.cbHeaderStart = 0;
2214 offsets.cbBodyStart = offsets.cbBodyEnd = 0;
2215
2216 root_body = create_sub_body(This, pStm, &offsets, NULL);
2217
2218 zero.QuadPart = 0;
2219 IStream_Seek(pStm, zero, STREAM_SEEK_END, &cur);
2220 offsets.cbBodyEnd = cur.LowPart;
2222
2223 list_add_head(&This->body_tree, &root_body->entry);
2224
2225 return S_OK;
2226}
MimeBody * mime_body
Definition: mimeole.c:1926

◆ MimeMessage_LoadOffsetTable()

static HRESULT WINAPI MimeMessage_LoadOffsetTable ( IMimeMessage iface,
IStream pStream 
)
static

Definition at line 2271 of file mimeole.c.

2274{
2275 FIXME("(%p)->(%p)\n", iface, pStream);
2276 return E_NOTIMPL;
2277}

◆ MimeMessage_MoveBody()

static HRESULT WINAPI MimeMessage_MoveBody ( IMimeMessage iface,
HBODY  hBody,
BODYLOCATION  location 
)
static

Definition at line 2478 of file mimeole.c.

2482{
2483 FIXME("(%p)->(%d)\n", iface, location);
2484 return E_NOTIMPL;
2485}

◆ MimeMessage_QueryBodyProp()

static HRESULT WINAPI MimeMessage_QueryBodyProp ( IMimeMessage iface,
HBODY  hBody,
LPCSTR  pszName,
LPCSTR  pszCriteria,
boolean  fSubString,
boolean  fCaseSensitive 
)
static

Definition at line 2655 of file mimeole.c.

2662{
2663 FIXME("(%p)->(%p, %s, %s, %s, %s)\n", iface, hBody, pszName, pszCriteria, fSubString ? "TRUE" : "FALSE", fCaseSensitive ? "TRUE" : "FALSE");
2664 return E_NOTIMPL;
2665}

◆ MimeMessage_QueryInterface()

static HRESULT WINAPI MimeMessage_QueryInterface ( IMimeMessage iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1947 of file mimeole.c.

1948{
1949 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
1950
1951 if (IsEqualIID(riid, &IID_IUnknown) ||
1954 IsEqualIID(riid, &IID_IMimeMessageTree) ||
1955 IsEqualIID(riid, &IID_IMimeMessage))
1956 {
1957 *ppv = iface;
1958 IMimeMessage_AddRef(iface);
1959 return S_OK;
1960 }
1961
1962 FIXME("no interface for %s\n", debugstr_guid(riid));
1963 *ppv = NULL;
1964 return E_NOINTERFACE;
1965}

◆ MimeMessage_QueryProp()

static HRESULT WINAPI MimeMessage_QueryProp ( IMimeMessage iface,
LPCSTR  pszName,
LPCSTR  pszCriteria,
boolean  fSubString,
boolean  fCaseSensitive 
)
static

Definition at line 2803 of file mimeole.c.

2809{
2810 FIXME("(%p)->(%s, %s, %s, %s)\n", iface, pszName, pszCriteria, fSubString ? "TRUE" : "FALSE", fCaseSensitive ? "TRUE" : "FALSE");
2811 return E_NOTIMPL;
2812}

◆ MimeMessage_Release()

static ULONG WINAPI MimeMessage_Release ( IMimeMessage iface)
static

Definition at line 1989 of file mimeole.c.

1990{
1993
1994 TRACE("(%p) ref=%ld\n", This, ref);
1995
1996 if (!ref)
1997 {
1998 empty_body_list(&This->body_tree);
1999
2000 if(This->stream) IStream_Release(This->stream);
2001 free(This);
2002 }
2003
2004 return ref;
2005}

◆ MimeMessage_ResolveURL()

static HRESULT WINAPI MimeMessage_ResolveURL ( IMimeMessage iface,
HBODY  hRelated,
LPCSTR  pszBase,
LPCSTR  pszURL,
DWORD  dwFlags,
LPHBODY  phBody 
)
static

Definition at line 2570 of file mimeole.c.

2577{
2578 FIXME("(%p)->(%p, %s, %s, 0x%lx, %p)\n", iface, hRelated, pszBase, pszURL, dwFlags, phBody);
2579 return E_NOTIMPL;
2580}

◆ MimeMessage_Save()

static HRESULT WINAPI MimeMessage_Save ( IMimeMessage iface,
IStream pStm,
BOOL  fClearDirty 
)
static

Definition at line 2228 of file mimeole.c.

2229{
2230 FIXME("(%p)->(%p, %s)\n", iface, pStm, fClearDirty ? "TRUE" : "FALSE");
2231 return E_NOTIMPL;
2232}

◆ MimeMessage_SaveBody()

static HRESULT WINAPI MimeMessage_SaveBody ( IMimeMessage iface,
HBODY  hBody,
DWORD  dwFlags,
IStream pStream 
)
static

Definition at line 2360 of file mimeole.c.

2365{
2366 FIXME("(%p)->(%p, 0x%lx, %p)\n", iface, hBody, dwFlags, pStream);
2367 return E_NOTIMPL;
2368}

◆ MimeMessage_SaveOffsetTable()

static HRESULT WINAPI MimeMessage_SaveOffsetTable ( IMimeMessage iface,
IStream pStream,
DWORD  dwFlags 
)
static

Definition at line 2279 of file mimeole.c.

2283{
2284 FIXME("(%p)->(%p, 0x%lx)\n", iface, pStream, dwFlags);
2285 return E_NOTIMPL;
2286}

◆ MimeMessage_SetBodyProp()

static HRESULT WINAPI MimeMessage_SetBodyProp ( IMimeMessage iface,
HBODY  hBody,
LPCSTR  pszName,
DWORD  dwFlags,
LPCPROPVARIANT  pValue 
)
static

Definition at line 2688 of file mimeole.c.

2694{
2695 FIXME("(%p)->(%p, %s, 0x%lx, %p)\n", iface, hBody, pszName, dwFlags, pValue);
2696 return E_NOTIMPL;
2697}

◆ MimeMessage_SetCharset()

static HRESULT WINAPI MimeMessage_SetCharset ( IMimeMessage iface,
HCHARSET  hCharset,
CSETAPPLYTYPE  applytype 
)
static

Definition at line 2610 of file mimeole.c.

2614{
2615 FIXME("(%p)->(%p, %d)\n", iface, hCharset, applytype);
2616 return E_NOTIMPL;
2617}

◆ MimeMessage_SetOption()

static HRESULT WINAPI MimeMessage_SetOption ( IMimeMessage iface,
const TYPEDID  oid,
LPCPROPVARIANT  pValue 
)
static

Definition at line 2708 of file mimeole.c.

2712{
2713 HRESULT hr = S_OK;
2714 TRACE("(%p)->(%08lx, %p)\n", iface, oid, pValue);
2715
2716 /* Message ID is checked before type.
2717 * OID 0x4D -> 0x56 and 0x58 aren't defined but will filtered out later.
2718 */
2719 if(TYPEDID_ID(oid) < TYPEDID_ID(OID_ALLOW_8BIT_HEADER) || TYPEDID_ID(oid) > TYPEDID_ID(OID_SECURITY_2KEY_CERT_BAG_64))
2720 {
2721 WARN("oid (%08lx) out of range\n", oid);
2722 return MIME_E_INVALID_OPTION_ID;
2723 }
2724
2725 if(pValue->vt != TYPEDID_TYPE(oid))
2726 {
2727 WARN("Called with vartype %04x and oid %08lx\n", pValue->vt, oid);
2728 return S_OK;
2729 }
2730
2731 switch(oid)
2732 {
2733 case OID_HIDE_TNEF_ATTACHMENTS:
2734 FIXME("OID_HIDE_TNEF_ATTACHMENTS (value %d): ignoring\n", pValue->boolVal);
2735 break;
2736 case OID_SHOW_MACBINARY:
2737 FIXME("OID_SHOW_MACBINARY (value %d): ignoring\n", pValue->boolVal);
2738 break;
2739 case OID_SAVEBODY_KEEPBOUNDARY:
2740 FIXME("OID_SAVEBODY_KEEPBOUNDARY (value %d): ignoring\n", pValue->boolVal);
2741 break;
2742 case OID_CLEANUP_TREE_ON_SAVE:
2743 FIXME("OID_CLEANUP_TREE_ON_SAVE (value %d): ignoring\n", pValue->boolVal);
2744 break;
2745 default:
2746 FIXME("Unhandled oid %08lx\n", oid);
2747 hr = MIME_E_INVALID_OPTION_ID;
2748 }
2749
2750 return hr;
2751}

◆ MimeMessage_SetProp()

static HRESULT WINAPI MimeMessage_SetProp ( IMimeMessage iface,
LPCSTR  pszName,
DWORD  dwFlags,
LPCPROPVARIANT  pValue 
)
static

Definition at line 2785 of file mimeole.c.

2790{
2791 FIXME("(%p)->(%s, 0x%lx, %p)\n", iface, pszName, dwFlags, pValue);
2792 return E_NOTIMPL;
2793}

◆ MimeMessage_SetTextBody()

static HRESULT WINAPI MimeMessage_SetTextBody ( IMimeMessage iface,
DWORD  dwTxtType,
ENCODINGTYPE  ietEncoding,
HBODY  hAlternative,
IStream pStream,
LPHBODY  phBody 
)
static

Definition at line 2861 of file mimeole.c.

2868{
2869 FIXME("(%p)->(%ld, %d, %p, %p, %p)\n", iface, dwTxtType, ietEncoding, hAlternative, pStream, phBody);
2870 return E_NOTIMPL;
2871}

◆ MimeMessage_SplitMessage()

static HRESULT WINAPI MimeMessage_SplitMessage ( IMimeMessage iface,
ULONG  cbMaxPart,
IMimeMessageParts **  ppParts 
)
static

Definition at line 2991 of file mimeole.c.

2995{
2996 FIXME("(%p)->(%ld, %p)\n", iface, cbMaxPart, ppParts);
2997 return E_NOTIMPL;
2998}

◆ MimeMessage_ToMultipart()

static HRESULT WINAPI MimeMessage_ToMultipart ( IMimeMessage iface,
HBODY  hBody,
LPCSTR  pszSubType,
LPHBODY  phMultipart 
)
static

Definition at line 2582 of file mimeole.c.

2587{
2588 FIXME("(%p)->(%p, %s, %p)\n", iface, hBody, pszSubType, phMultipart);
2589 return E_NOTIMPL;
2590}

◆ MimeOleCreateMessage()

HRESULT WINAPI MimeOleCreateMessage ( IUnknown pUnkOuter,
IMimeMessage **  ppMessage 
)

Definition at line 3104 of file mimeole.c.

3105{
3106 TRACE("(%p, %p)\n", pUnkOuter, ppMessage);
3107 return MimeMessage_create(NULL, (void **)ppMessage);
3108}
HRESULT MimeMessage_create(IUnknown *outer, void **obj)
Definition: mimeole.c:3068

Referenced by test_BindToObject(), test_BodyDeleteProp(), test_CreateMessage(), test_MessageGetPropInfo(), test_MessageOptions(), test_MessageSetProp(), and test_mhtml_message().

◆ MimeOleCreateSecurity()

HRESULT WINAPI MimeOleCreateSecurity ( IMimeSecurity **  ppSecurity)

Definition at line 3314 of file mimeole.c.

3315{
3316 return MimeSecurity_create(NULL, (void **)ppSecurity);
3317}
HRESULT MimeSecurity_create(IUnknown *outer, void **obj)
Definition: mimeole.c:3293

Referenced by test_CreateSecurity().

◆ MimeOleCreateVirtualStream()

HRESULT WINAPI MimeOleCreateVirtualStream ( IStream **  ppStream)

Definition at line 3122 of file mimeole.c.

3123{
3124 HRESULT hr;
3125 FIXME("(%p)\n", ppStream);
3126
3127 hr = CreateStreamOnHGlobal(NULL, TRUE, ppStream);
3128 return hr;
3129}

Referenced by test_CreateVirtualStream(), and VirtualStream_create().

◆ MimeOleGetAllocator()

HRESULT WINAPI MimeOleGetAllocator ( IMimeAllocator **  alloc)

Definition at line 3513 of file mimeole.c.

3514{
3515 return MimeAllocator_create(NULL, (void**)alloc);
3516}
HRESULT MimeAllocator_create(IUnknown *outer, void **obj)
Definition: mimeole.c:3505

Referenced by create_sub_body(), MimeBody_GetParameters(), test_Allocator(), and test_CreateBody().

◆ MimeOleGetPropertySchema()

HRESULT WINAPI MimeOleGetPropertySchema ( IMimePropertySchema **  schema)

Definition at line 3626 of file mimeole.c.

3627{
3629
3630 TRACE("(%p) stub\n", schema);
3631
3632 This = malloc(sizeof(*This));
3633 if (!This)
3634 return E_OUTOFMEMORY;
3635
3636 This->IMimePropertySchema_iface.lpVtbl = &prop_schema_vtbl;
3637 This->ref = 1;
3638
3639 *schema = &This->IMimePropertySchema_iface;
3640
3641 return S_OK;
3642}
static IMimePropertySchemaVtbl prop_schema_vtbl
Definition: mimeole.c:3613
const WCHAR * schema

Referenced by test_MimeOleGetPropertySchema().

◆ MimeOleObjectFromMoniker()

HRESULT WINAPI MimeOleObjectFromMoniker ( BINDF  bindf,
IMoniker moniker,
IBindCtx binding,
REFIID  riid,
void **  out,
IMoniker **  moniker_new 
)

Definition at line 3679 of file mimeole.c.

3681{
3682 WCHAR *display_name, *mhtml_url;
3683 size_t len;
3684 HRESULT hres;
3685
3686 WARN("(0x%08x, %p, %p, %s, %p, %p) semi-stub\n", bindf, moniker, binding, debugstr_guid(riid), out, moniker_new);
3687
3688 if(!IsEqualGUID(&IID_IUnknown, riid)) {
3689 FIXME("Unsupported riid %s\n", debugstr_guid(riid));
3690 return E_NOINTERFACE;
3691 }
3692
3693 hres = IMoniker_GetDisplayName(moniker, NULL, NULL, &display_name);
3694 if(FAILED(hres))
3695 return hres;
3696
3697 TRACE("display name %s\n", debugstr_w(display_name));
3698
3699 len = lstrlenW(display_name);
3700 mhtml_url = malloc(len * sizeof(WCHAR) + sizeof(L"mhtml:"));
3701 if(!mhtml_url)
3702 return E_OUTOFMEMORY;
3703
3704 lstrcpyW(mhtml_url, L"mhtml:");
3705 lstrcatW(mhtml_url, display_name);
3706 CoTaskMemFree(display_name);
3707
3708 hres = CreateURLMoniker(NULL, mhtml_url, moniker_new);
3709 free(mhtml_url);
3710 if(FAILED(hres))
3711 return hres;
3712
3713 /* FIXME: We most likely should start binding here and return something more meaningful as mime object. */
3714 *out = &mime_obj;
3715 return S_OK;
3716}
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
static IUnknown mime_obj
Definition: mimeole.c:3677
#define L(x)
Definition: resources.c:13
#define debugstr_w
Definition: kernel32.h:32
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static DWORD bindf
Definition: protocol.c:70
static RPC_BINDING_HANDLE binding
Definition: server.c:166
short WCHAR
Definition: pedump.c:58
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
Definition: main.c:40
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
Definition: umon.c:732

Referenced by test_MimeOleObjectFromMoniker().

◆ MimeOleSetCompatMode()

HRESULT WINAPI MimeOleSetCompatMode ( DWORD  dwMode)

Definition at line 3113 of file mimeole.c.

3114{
3115 FIXME("(0x%lx)\n", dwMode);
3116 return S_OK;
3117}

◆ MimeSecurity_AddRef()

static ULONG WINAPI MimeSecurity_AddRef ( IMimeSecurity iface)
static

Definition at line 3159 of file mimeole.c.

3160{
3163
3164 TRACE("(%p) ref=%ld\n", This, ref);
3165
3166 return ref;
3167}
static MimeSecurity * impl_from_IMimeSecurity(IMimeSecurity *iface)
Definition: mimeole.c:3137

◆ MimeSecurity_CheckInit()

static HRESULT WINAPI MimeSecurity_CheckInit ( IMimeSecurity iface)
static

Definition at line 3189 of file mimeole.c.

3191{
3192 FIXME("(%p)->(): stub\n", iface);
3193 return E_NOTIMPL;
3194}

◆ MimeSecurity_create()

HRESULT MimeSecurity_create ( IUnknown outer,
void **  obj 
)

Definition at line 3293 of file mimeole.c.

3294{
3296
3297 *obj = NULL;
3298
3299 if (outer) return CLASS_E_NOAGGREGATION;
3300
3301 This = malloc(sizeof(*This));
3302 if (!This) return E_OUTOFMEMORY;
3303
3304 This->IMimeSecurity_iface.lpVtbl = &MimeSecurityVtbl;
3305 This->ref = 1;
3306
3307 *obj = &This->IMimeSecurity_iface;
3308 return S_OK;
3309}
static const IMimeSecurityVtbl MimeSecurityVtbl
Definition: mimeole.c:3276

Referenced by MimeOleCreateSecurity().

◆ MimeSecurity_DecodeBody()

static HRESULT WINAPI MimeSecurity_DecodeBody ( IMimeSecurity iface,
IMimeMessageTree *  pTree,
HBODY  hDecodeRoot,
DWORD  dwFlags 
)
static

Definition at line 3224 of file mimeole.c.

3229{
3230 FIXME("(%p)->(%p, %p, %08lx): stub\n", iface, pTree, hDecodeRoot, dwFlags);
3231 return E_NOTIMPL;
3232}

◆ MimeSecurity_DecodeMessage()

static HRESULT WINAPI MimeSecurity_DecodeMessage ( IMimeSecurity iface,
IMimeMessageTree *  pTree,
DWORD  dwFlags 
)
static

Definition at line 3215 of file mimeole.c.

3219{
3220 FIXME("(%p)->(%p, %08lx): stub\n", iface, pTree, dwFlags);
3221 return E_NOTIMPL;
3222}

◆ MimeSecurity_EncodeBody()

static HRESULT WINAPI MimeSecurity_EncodeBody ( IMimeSecurity iface,
IMimeMessageTree *  pTree,
HBODY  hEncodeRoot,
DWORD  dwFlags 
)
static

Definition at line 3205 of file mimeole.c.

3210{
3211 FIXME("(%p)->(%p, %p, %08lx): stub\n", iface, pTree, hEncodeRoot, dwFlags);
3212 return E_NOTIMPL;
3213}

◆ MimeSecurity_EncodeMessage()

static HRESULT WINAPI MimeSecurity_EncodeMessage ( IMimeSecurity iface,
IMimeMessageTree *  pTree,
DWORD  dwFlags 
)
static

Definition at line 3196 of file mimeole.c.

3200{
3201 FIXME("(%p)->(%p, %08lx): stub\n", iface, pTree, dwFlags);
3202 return E_NOTIMPL;
3203}

◆ MimeSecurity_EnumCertificates()

static HRESULT WINAPI MimeSecurity_EnumCertificates ( IMimeSecurity iface,
HCAPICERTSTORE  hc,
DWORD  dwUsage,
PCX509CERT  pPrev,
PCX509CERT *  ppCert 
)
static

Definition at line 3234 of file mimeole.c.

3240{
3241 FIXME("(%p)->(%p, %08lx, %p, %p): stub\n", iface, hc, dwUsage, pPrev, ppCert);
3242 return E_NOTIMPL;
3243}

◆ MimeSecurity_GetCertData()

static HRESULT WINAPI MimeSecurity_GetCertData ( IMimeSecurity iface,
const PCX509CERT  pX509Cert,
const CERTDATAID  dataid,
LPPROPVARIANT  pValue 
)
static

Definition at line 3265 of file mimeole.c.

3270{
3271 FIXME("(%p)->(%p, %x, %p): stub\n", iface, pX509Cert, dataid, pValue);
3272 return E_NOTIMPL;
3273}

◆ MimeSecurity_GetCertificateName()

static HRESULT WINAPI MimeSecurity_GetCertificateName ( IMimeSecurity iface,
const PCX509CERT  pX509Cert,
const CERTNAMETYPE  cn,
LPSTR ppszName 
)
static

Definition at line 3245 of file mimeole.c.

3250{
3251 FIXME("(%p)->(%p, %08x, %p): stub\n", iface, pX509Cert, cn, ppszName);
3252 return E_NOTIMPL;
3253}
static BYTE cn[]
Definition: cert.c:2987
SIGDN PWSTR * ppszName
Definition: shobjidl.idl:606

◆ MimeSecurity_GetMessageType()

static HRESULT WINAPI MimeSecurity_GetMessageType ( IMimeSecurity iface,
const HWND  hwndParent,
IMimeBody pBody,
DWORD pdwSecType 
)
static

Definition at line 3255 of file mimeole.c.

3260{
3261 FIXME("(%p)->(%p, %p, %p): stub\n", iface, hwndParent, pBody, pdwSecType);
3262 return E_NOTIMPL;
3263}
static HWND hwndParent
Definition: cryptui.c:299

◆ MimeSecurity_InitNew()

static HRESULT WINAPI MimeSecurity_InitNew ( IMimeSecurity iface)
static

Definition at line 3182 of file mimeole.c.

3184{
3185 FIXME("(%p)->(): stub\n", iface);
3186 return S_OK;
3187}

◆ MimeSecurity_QueryInterface()

static HRESULT WINAPI MimeSecurity_QueryInterface ( IMimeSecurity iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 3142 of file mimeole.c.

3143{
3144 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
3145
3146 if (IsEqualIID(riid, &IID_IUnknown) ||
3147 IsEqualIID(riid, &IID_IMimeSecurity))
3148 {
3149 *ppv = iface;
3150 IMimeSecurity_AddRef(iface);
3151 return S_OK;
3152 }
3153
3154 FIXME("no interface for %s\n", debugstr_guid(riid));
3155 *ppv = NULL;
3156 return E_NOINTERFACE;
3157}

◆ MimeSecurity_Release()

static ULONG WINAPI MimeSecurity_Release ( IMimeSecurity iface)
static

Definition at line 3169 of file mimeole.c.

3170{
3173
3174 TRACE("(%p) ref=%ld\n", This, ref);
3175
3176 if (!ref)
3177 free(This);
3178
3179 return ref;
3180}

◆ new_body_entry()

static body_t * new_body_entry ( MimeBody mime_body,
DWORD  index,
body_t parent 
)
static

Definition at line 2024 of file mimeole.c.

2025{
2026 body_t *body = malloc(sizeof(*body));
2027 if(body)
2028 {
2029 body->mime_body = mime_body;
2030 body->index = index;
2031 list_init(&body->children);
2032 body->parent = parent;
2033
2034 mime_body->handle = UlongToHandle(body->index);
2035 }
2036 return body;
2037}
#define index(s, c)
Definition: various.h:29
HBODY handle
Definition: mimeole.c:156

Referenced by create_sub_body(), and MimeMessage_create().

◆ parse_headers()

static HRESULT parse_headers ( MimeBody body,
IStream stm 
)
static

Definition at line 765 of file mimeole.c.

766{
767 char *header_buf, *cur_header_ptr;
768 HRESULT hr;
770
771 hr = copy_headers_to_buf(stm, &header_buf);
772 if(FAILED(hr)) return hr;
773
774 cur_header_ptr = header_buf;
775 while((header = read_prop(body, &cur_header_ptr)))
776 {
777 read_value(header, &cur_header_ptr);
778 list_add_tail(&body->headers, &header->entry);
779
780 switch(header->prop->id) {
781 case PID_HDR_CNTTYPE:
783 break;
784 case PID_HDR_CNTXFER:
786 break;
787 }
788 }
789
790 free(header_buf);
791 return hr;
792}
static void init_content_encoding(MimeBody *body, header_t *header)
Definition: mimeole.c:749
static void init_content_type(MimeBody *body, header_t *header)
Definition: mimeole.c:731
static void read_value(header_t *header, char **cur)
Definition: mimeole.c:701
static HRESULT copy_headers_to_buf(IStream *stm, char **ptr)
Definition: mimeole.c:485
static header_t * read_prop(MimeBody *body, char **ptr)
Definition: mimeole.c:540
@ PID_HDR_CNTXFER
Definition: mimeole.idl:95
@ PID_HDR_CNTTYPE
Definition: mimeole.idl:94

Referenced by MimeBody_Load().

◆ propschema_AddRef()

static ULONG WINAPI propschema_AddRef ( IMimePropertySchema *  iface)
static

Definition at line 3551 of file mimeole.c.

3552{
3555
3556 TRACE("(%p) ref=%ld\n", This, ref);
3557
3558 return ref;
3559}
static propschema * impl_from_IMimePropertySchema(IMimePropertySchema *iface)
Definition: mimeole.c:472

◆ propschema_GetPropertyId()

static HRESULT WINAPI propschema_GetPropertyId ( IMimePropertySchema *  iface,
const char name,
DWORD propid 
)
static

Definition at line 3592 of file mimeole.c.

3593{
3595 FIXME("(%p)->(%s, %p) stub\n", This, debugstr_a(name), propid);
3596 return E_NOTIMPL;
3597}

◆ propschema_GetPropertyName()

static HRESULT WINAPI propschema_GetPropertyName ( IMimePropertySchema *  iface,
DWORD  propid,
char **  name 
)
static

Definition at line 3599 of file mimeole.c.

3600{
3602 FIXME("(%p)->(%ld, %p) stub\n", This, propid, name);
3603 return E_NOTIMPL;
3604}

◆ propschema_ModifyProperty()

static HRESULT WINAPI propschema_ModifyProperty ( IMimePropertySchema *  iface,
const char name,
DWORD  flags,
DWORD  rownumber,
VARTYPE  vtdefault 
)
static

Definition at line 3584 of file mimeole.c.

3586{
3588 FIXME("(%p)->(%s, %lx, %ld, %d) stub\n", This, debugstr_a(name), flags, rownumber, vtdefault);
3589 return S_OK;
3590}
GLbitfield flags
Definition: glext.h:7161

◆ propschema_QueryInterface()

static HRESULT WINAPI propschema_QueryInterface ( IMimePropertySchema *  iface,
REFIID  riid,
void **  out 
)
static

Definition at line 3529 of file mimeole.c.

3530{
3532 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), out);
3533
3534 *out = NULL;
3535
3536 if (IsEqualIID(riid, &IID_IUnknown) ||
3537 IsEqualIID(riid, &IID_IMimePropertySchema))
3538 {
3539 *out = iface;
3540 }
3541 else
3542 {
3543 FIXME("no interface for %s\n", debugstr_guid(riid));
3544 return E_NOINTERFACE;
3545 }
3546
3547 IMimePropertySchema_AddRef(iface);
3548 return S_OK;
3549}

◆ propschema_RegisterAddressType()

static HRESULT WINAPI propschema_RegisterAddressType ( IMimePropertySchema *  iface,
const char name,
DWORD adrtype 
)
static

Definition at line 3606 of file mimeole.c.

3607{
3609 FIXME("(%p)->(%s, %p) stub\n", This, debugstr_a(name), adrtype);
3610 return E_NOTIMPL;
3611}

◆ propschema_RegisterProperty()

static HRESULT WINAPI propschema_RegisterProperty ( IMimePropertySchema *  iface,
const char name,
DWORD  flags,
DWORD  rownumber,
VARTYPE  vtdefault,
DWORD propid 
)
static

Definition at line 3576 of file mimeole.c.

3578{
3580 FIXME("(%p)->(%s, %lx, %ld, %d, %p) stub\n", This, debugstr_a(name), flags, rownumber, vtdefault, propid);
3581 return E_NOTIMPL;
3582}

◆ propschema_Release()

static ULONG WINAPI propschema_Release ( IMimePropertySchema *  iface)
static

Definition at line 3561 of file mimeole.c.

3562{
3565
3566 TRACE("(%p) ref=%ld\n", This, ref);
3567
3568 if (!ref)
3569 {
3570 free(This);
3571 }
3572
3573 return ref;
3574}

◆ read_prop()

static header_t * read_prop ( MimeBody body,
char **  ptr 
)
static

Definition at line 540 of file mimeole.c.

541{
542 char *colon = strchr(*ptr, ':');
543 const property_t *prop;
544 header_t *ret;
545
546 if(!colon) return NULL;
547
548 *colon = '\0';
549
550 for(prop = default_props; prop->name; prop++)
551 {
552 if(!lstrcmpiA(*ptr, prop->name))
553 {
554 TRACE("%s: found match with default property id %ld\n", *ptr, prop->id);
555 break;
556 }
557 }
558
559 if(!prop->name)
560 {
561 property_list_entry_t *prop_entry;
562 LIST_FOR_EACH_ENTRY(prop_entry, &body->new_props, property_list_entry_t, entry)
563 {
564 if(!lstrcmpiA(*ptr, prop_entry->prop.name))
565 {
566 TRACE("%s: found match with already added new property id %ld\n", *ptr, prop_entry->prop.id);
567 prop = &prop_entry->prop;
568 break;
569 }
570 }
571 if(!prop->name)
572 {
573 prop_entry = malloc(sizeof(*prop_entry));
574 prop_entry->prop.name = strdup(*ptr);
575 prop_entry->prop.id = body->next_prop_id++;
576 prop_entry->prop.flags = 0;
577 prop_entry->prop.default_vt = VT_LPSTR;
578 list_add_tail(&body->new_props, &prop_entry->entry);
579 prop = &prop_entry->prop;
580 TRACE("%s: allocating new prop id %ld\n", *ptr, prop_entry->prop.id);
581 }
582 }
583
584 ret = malloc(sizeof(*ret));
585 ret->prop = prop;
586 PropVariantInit(&ret->value);
587 list_init(&ret->params);
588 *ptr = colon + 1;
589
590 return ret;
591}

Referenced by parse_headers().

◆ read_value()

static void read_value ( header_t header,
char **  cur 
)
static

Definition at line 701 of file mimeole.c.

702{
703 char *end = *cur, *value;
704 DWORD len;
705
706 do {
707 end = strstr(end, "\r\n");
708 end += 2;
709 } while(*end == ' ' || *end == '\t');
710
711 len = end - *cur;
712 value = CoTaskMemAlloc(len + 1);
713 memcpy(value, *cur, len);
714 value[len] = '\0';
715
717 TRACE("value %s\n", debugstr_a(value));
718
719 if(header->prop->flags & MPF_HASPARAMS)
720 {
722 TRACE("value w/o params %s\n", debugstr_a(value));
723 }
724
725 header->value.vt = VT_LPSTR;
726 header->value.pszVal = value;
727
728 *cur = end;
729}
static void unfold_header(char *header, int len)
Definition: mimeole.c:593
static void split_params(header_t *header, char *value)
Definition: mimeole.c:680

Referenced by parse_headers().

◆ release_data()

static void release_data ( REFIID  riid,
void data 
)
static

Definition at line 837 of file mimeole.c.

838{
839 if(!data) return;
840
841 if(IsEqualIID(riid, &IID_IStream))
842 IStream_Release((IStream *)data);
843 else
844 FIXME("Unhandled data format %s\n", debugstr_guid(riid));
845}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

Referenced by MimeBody_Release(), and MimeBody_SetData().

◆ split_params()

static void split_params ( header_t header,
char value 
)
static

Definition at line 680 of file mimeole.c.

681{
682 char *cp = value, *start = value;
683 BOOL in_quotes = FALSE, done_value = FALSE;
684
685 while(*cp)
686 {
687 if(!in_quotes && *cp == ';')
688 {
689 *cp = '\0';
690 if(done_value) add_param(header, start);
691 done_value = TRUE;
692 start = cp + 1;
693 }
694 else if(*cp == '"')
695 in_quotes = !in_quotes;
696 cp++;
697 }
698 if(done_value) add_param(header, start);
699}
static void add_param(header_t *header, const char *p)
Definition: mimeole.c:651

Referenced by read_value().

◆ sub_stream_AddRef()

static ULONG WINAPI sub_stream_AddRef ( IStream iface)
static

Definition at line 200 of file mimeole.c.

201{
204
205 TRACE("(%p) ref=%ld\n", This, ref);
206
207 return ref;
208}
static sub_stream_t * impl_from_IStream(IStream *iface)
Definition: mimeole.c:177

◆ sub_stream_Clone()

static HRESULT WINAPI sub_stream_Clone ( IStream iface,
IStream **  ppstm 
)
static

Definition at line 399 of file mimeole.c.

402{
403 FIXME("stub\n");
404 return E_NOTIMPL;
405}

◆ sub_stream_Commit()

static HRESULT WINAPI sub_stream_Commit ( IStream iface,
DWORD  grfCommitFlags 
)
static

Definition at line 352 of file mimeole.c.

355{
356 FIXME("stub\n");
357 return E_NOTIMPL;
358}

◆ sub_stream_CopyTo()

static HRESULT WINAPI sub_stream_CopyTo ( IStream iface,
IStream pstm,
ULARGE_INTEGER  cb,
ULARGE_INTEGER pcbRead,
ULARGE_INTEGER pcbWritten 
)
static

Definition at line 303 of file mimeole.c.

309{
310 HRESULT hr = S_OK;
311 BYTE tmpBuffer[128];
312 ULONG bytesRead, bytesWritten, copySize;
313 ULARGE_INTEGER totalBytesRead;
314 ULARGE_INTEGER totalBytesWritten;
315
316 TRACE("(%p)->(%p, %ld, %p, %p)\n", iface, pstm, cb.LowPart, pcbRead, pcbWritten);
317
318 totalBytesRead.QuadPart = 0;
319 totalBytesWritten.QuadPart = 0;
320
321 while ( cb.QuadPart > 0 )
322 {
323 if ( cb.QuadPart >= sizeof(tmpBuffer) )
324 copySize = sizeof(tmpBuffer);
325 else
326 copySize = cb.LowPart;
327
328 hr = IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
329 if (FAILED(hr)) break;
330
331 totalBytesRead.QuadPart += bytesRead;
332
333 if (bytesRead)
334 {
335 hr = IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten);
336 if (FAILED(hr)) break;
337 totalBytesWritten.QuadPart += bytesWritten;
338 }
339
340 if (bytesRead != copySize)
341 cb.QuadPart = 0;
342 else
343 cb.QuadPart -= bytesRead;
344 }
345
346 if (pcbRead) pcbRead->QuadPart = totalBytesRead.QuadPart;
347 if (pcbWritten) pcbWritten->QuadPart = totalBytesWritten.QuadPart;
348
349 return hr;
350}
GLenum GLsizei GLuint GLint * bytesWritten
Definition: glext.h:11123
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
unsigned char BYTE
Definition: xxhash.c:193

◆ sub_stream_LockRegion()

static HRESULT WINAPI sub_stream_LockRegion ( IStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 367 of file mimeole.c.

372{
373 FIXME("stub\n");
374 return E_NOTIMPL;
375}

◆ sub_stream_QueryInterface()

static HRESULT WINAPI sub_stream_QueryInterface ( IStream iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 182 of file mimeole.c.

183{
185
186 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
187 *ppv = NULL;
188
190 IsEqualIID(riid, &IID_ISequentialStream) ||
191 IsEqualIID(riid, &IID_IStream))
192 {
193 IStream_AddRef(iface);
194 *ppv = iface;
195 return S_OK;
196 }
197 return E_NOINTERFACE;
198}

◆ sub_stream_Read()

static HRESULT WINAPI sub_stream_Read ( IStream iface,
void pv,
ULONG  cb,
ULONG pcbRead 
)
static

Definition at line 225 of file mimeole.c.

230{
232 HRESULT hr;
233 LARGE_INTEGER tmp_pos;
234
235 TRACE("(%p, %ld, %p)\n", pv, cb, pcbRead);
236
237 tmp_pos.QuadPart = This->pos.QuadPart + This->start.QuadPart;
238 IStream_Seek(This->base, tmp_pos, STREAM_SEEK_SET, NULL);
239
240 if(This->pos.QuadPart + cb > This->length.QuadPart)
241 cb = This->length.QuadPart - This->pos.QuadPart;
242
243 hr = IStream_Read(This->base, pv, cb, pcbRead);
244
245 This->pos.QuadPart += *pcbRead;
246
247 return hr;
248}

◆ sub_stream_Release()

static ULONG WINAPI sub_stream_Release ( IStream iface)
static

Definition at line 210 of file mimeole.c.

211{
214
215 TRACE("(%p) ref=%ld\n", This, ref);
216
217 if(!ref)
218 {
219 IStream_Release(This->base);
220 free(This);
221 }
222 return ref;
223}

◆ sub_stream_Revert()

static HRESULT WINAPI sub_stream_Revert ( IStream iface)
static

Definition at line 360 of file mimeole.c.

362{
363 FIXME("stub\n");
364 return E_NOTIMPL;
365}

◆ sub_stream_Seek()

static HRESULT WINAPI sub_stream_Seek ( IStream iface,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)
static

Definition at line 260 of file mimeole.c.

265{
267 LARGE_INTEGER new_pos;
268
269 TRACE("(%08lx.%08lx, %lx, %p)\n", dlibMove.HighPart, dlibMove.LowPart, dwOrigin, plibNewPosition);
270
271 switch(dwOrigin)
272 {
273 case STREAM_SEEK_SET:
274 new_pos = dlibMove;
275 break;
276 case STREAM_SEEK_CUR:
277 new_pos.QuadPart = This->pos.QuadPart + dlibMove.QuadPart;
278 break;
279 case STREAM_SEEK_END:
280 new_pos.QuadPart = This->length.QuadPart + dlibMove.QuadPart;
281 break;
282 default:
284 }
285
286 if(new_pos.QuadPart < 0) new_pos.QuadPart = 0;
287 else if(new_pos.QuadPart > This->length.QuadPart) new_pos.QuadPart = This->length.QuadPart;
288
289 This->pos.QuadPart = new_pos.QuadPart;
290
291 if(plibNewPosition) *plibNewPosition = This->pos;
292 return S_OK;
293}
ULONG LowPart
Definition: typedefs.h:106
#define STG_E_INVALIDFUNCTION
Definition: winerror.h:3659

◆ sub_stream_SetSize()

static HRESULT WINAPI sub_stream_SetSize ( IStream iface,
ULARGE_INTEGER  libNewSize 
)
static

Definition at line 295 of file mimeole.c.

298{
299 FIXME("stub\n");
300 return E_NOTIMPL;
301}

◆ sub_stream_Stat()

static HRESULT WINAPI sub_stream_Stat ( IStream iface,
STATSTG *  pstatstg,
DWORD  grfStatFlag 
)
static

Definition at line 387 of file mimeole.c.

391{
393 FIXME("(%p)->(%p, %08lx)\n", This, pstatstg, grfStatFlag);
394 memset(pstatstg, 0, sizeof(*pstatstg));
395 pstatstg->cbSize = This->length;
396 return S_OK;
397}
#define memset(x, y, z)
Definition: compat.h:39

◆ sub_stream_UnlockRegion()

static HRESULT WINAPI sub_stream_UnlockRegion ( IStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 377 of file mimeole.c.

382{
383 FIXME("stub\n");
384 return E_NOTIMPL;
385}

◆ sub_stream_Write()

static HRESULT WINAPI sub_stream_Write ( IStream iface,
const void pv,
ULONG  cb,
ULONG pcbWritten 
)
static

Definition at line 250 of file mimeole.c.

255{
256 FIXME("stub\n");
257 return E_NOTIMPL;
258}

◆ unfold_header()

static void unfold_header ( char header,
int  len 
)
static

Definition at line 593 of file mimeole.c.

594{
595 char *start = header, *cp = header;
596
597 do {
598 while(*cp == ' ' || *cp == '\t')
599 {
600 cp++;
601 len--;
602 }
603 if(cp != start)
604 memmove(start, cp, len + 1);
605
606 cp = strstr(start, "\r\n");
607 len -= (cp - start);
608 start = cp;
609 *start = ' ';
610 start++;
611 len--;
612 cp += 2;
613 } while(*cp == ' ' || *cp == '\t');
614
615 *(start - 1) = '\0';
616}

Referenced by read_value().

◆ unquote_string()

static char * unquote_string ( const char str)
static

Definition at line 618 of file mimeole.c.

619{
620 BOOL quoted = FALSE;
621 char *ret, *cp;
622
623 while(*str == ' ' || *str == '\t') str++;
624
625 if(*str == '"')
626 {
627 quoted = TRUE;
628 str++;
629 }
630 ret = strdup(str);
631 for(cp = ret; *cp; cp++)
632 {
633 if(*cp == '\\')
634 memmove(cp, cp + 1, strlen(cp + 1) + 1);
635 else if(*cp == '"')
636 {
637 if(!quoted)
638 {
639 WARN("quote in unquoted string\n");
640 }
641 else
642 {
643 *cp = '\0';
644 break;
645 }
646 }
647 }
648 return ret;
649}
const WCHAR * str

Referenced by add_param().

◆ VirtualStream_create()

HRESULT VirtualStream_create ( IUnknown outer,
void **  obj 
)

Definition at line 3518 of file mimeole.c.

3519{
3520 FIXME("(%p, %p)\n", outer, obj);
3521
3522 *obj = NULL;
3523 if (outer) return CLASS_E_NOAGGREGATION;
3524
3526}
HRESULT WINAPI MimeOleCreateVirtualStream(IStream **ppStream)
Definition: mimeole.c:3122

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( inetcomm  )

Variable Documentation

◆ base64_decode_table

const signed char base64_decode_table[]
static
Initial value:
=
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
-1, 0, 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, -1, -1, -1, -1, -1,
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
}

Definition at line 1531 of file mimeole.c.

Referenced by decode_base64().

◆ body_vtbl

IMimeBodyVtbl body_vtbl
static

Definition at line 1817 of file mimeole.c.

Referenced by mimebody_create().

◆ default_props

const property_t default_props[]
static

Definition at line 57 of file mimeole.c.

Referenced by find_default_prop(), and read_prop().

◆ mime_alloc_vtbl

IMimeAllocatorVtbl mime_alloc_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI MimeAlloc_FreeThumbprint(IMimeAllocator *iface, THUMBBLOB *pthumbprint)
Definition: mimeole.c:3462
static void WINAPI MimeAlloc_Free(IMimeAllocator *iface, LPVOID pv)
Definition: mimeole.c:3367
static LPVOID WINAPI MimeAlloc_Alloc(IMimeAllocator *iface, SIZE_T cb)
Definition: mimeole.c:3352
static HRESULT WINAPI MimeAlloc_FreeEnumPropertyArray(IMimeAllocator *iface, ULONG cProps, LPENUMPROPERTY prgProp, boolean fFreeArray)
Definition: mimeole.c:3452
static LPVOID WINAPI MimeAlloc_Realloc(IMimeAllocator *iface, LPVOID pv, SIZE_T cb)
Definition: mimeole.c:3359
static void WINAPI MimeAlloc_HeapMinimize(IMimeAllocator *iface)
Definition: mimeole.c:3390
static HRESULT WINAPI MimeAlloc_FreeAddressProps(IMimeAllocator *iface, LPADDRESSPROPS pAddress)
Definition: mimeole.c:3423
static HRESULT WINAPI MimeAlloc_FreeParamInfoArray(IMimeAllocator *iface, ULONG cParams, LPMIMEPARAMINFO prgParam, boolean fFreeArray)
Definition: mimeole.c:3397
static ULONG WINAPI MimeAlloc_Release(IMimeAllocator *iface)
Definition: mimeole.c:3346
static HRESULT WINAPI MimeAlloc_PropVariantClear(IMimeAllocator *iface, LPPROPVARIANT pProp)
Definition: mimeole.c:3471
static HRESULT WINAPI MimeAlloc_ReleaseObjects(IMimeAllocator *iface, ULONG cObjects, IUnknown **prgpUnknown, boolean fFreeArray)
Definition: mimeole.c:3431
static SIZE_T WINAPI MimeAlloc_GetSize(IMimeAllocator *iface, LPVOID pv)
Definition: mimeole.c:3374
static ULONG WINAPI MimeAlloc_AddRef(IMimeAllocator *iface)
Definition: mimeole.c:3340
static HRESULT WINAPI MimeAlloc_FreeEnumHeaderRowArray(IMimeAllocator *iface, ULONG cRows, LPENUMHEADERROW prgRow, boolean fFreeArray)
Definition: mimeole.c:3442
static int WINAPI MimeAlloc_DidAlloc(IMimeAllocator *iface, LPVOID pv)
Definition: mimeole.c:3382
static HRESULT WINAPI MimeAlloc_FreeAddressList(IMimeAllocator *iface, LPADDRESSLIST pList)
Definition: mimeole.c:3415
static HRESULT WINAPI MimeAlloc_QueryInterface(IMimeAllocator *iface, REFIID riid, void **obj)
Definition: mimeole.c:3319

Definition at line 3479 of file mimeole.c.

◆ mime_allocator

IMimeAllocator mime_allocator
static
Initial value:
=
{
}
static IMimeAllocatorVtbl mime_alloc_vtbl
Definition: mimeole.c:3479

Definition at line 3500 of file mimeole.c.

Referenced by MimeAllocator_create().

◆ mime_obj

IUnknown mime_obj = { &mime_obj_vtbl }
static

Definition at line 3677 of file mimeole.c.

Referenced by MimeOleObjectFromMoniker().

◆ mime_obj_vtbl

const IUnknownVtbl mime_obj_vtbl
static
Initial value:
= {
}
static HRESULT WINAPI mime_obj_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
Definition: mimeole.c:3652
static ULONG WINAPI mime_obj_Release(IUnknown *iface)
Definition: mimeole.c:3665
static ULONG WINAPI mime_obj_AddRef(IUnknown *iface)
Definition: mimeole.c:3659

Definition at line 3671 of file mimeole.c.

◆ MimeMessageVtbl

const IMimeMessageVtbl MimeMessageVtbl
static

Definition at line 3008 of file mimeole.c.

Referenced by MimeMessage_create().

◆ MimeSecurityVtbl

const IMimeSecurityVtbl MimeSecurityVtbl
static
Initial value:
=
{
}
static ULONG WINAPI MimeSecurity_Release(IMimeSecurity *iface)
Definition: mimeole.c:3169
static HRESULT WINAPI MimeSecurity_DecodeBody(IMimeSecurity *iface, IMimeMessageTree *pTree, HBODY hDecodeRoot, DWORD dwFlags)
Definition: mimeole.c:3224
static HRESULT WINAPI MimeSecurity_DecodeMessage(IMimeSecurity *iface, IMimeMessageTree *pTree, DWORD dwFlags)
Definition: mimeole.c:3215
static HRESULT WINAPI MimeSecurity_EncodeMessage(IMimeSecurity *iface, IMimeMessageTree *pTree, DWORD dwFlags)
Definition: mimeole.c:3196
static HRESULT WINAPI MimeSecurity_EncodeBody(IMimeSecurity *iface, IMimeMessageTree *pTree, HBODY hEncodeRoot, DWORD dwFlags)
Definition: mimeole.c:3205
static HRESULT WINAPI MimeSecurity_QueryInterface(IMimeSecurity *iface, REFIID riid, void **ppv)
Definition: mimeole.c:3142
static ULONG WINAPI MimeSecurity_AddRef(IMimeSecurity *iface)
Definition: mimeole.c:3159
static HRESULT WINAPI MimeSecurity_GetCertData(IMimeSecurity *iface, const PCX509CERT pX509Cert, const CERTDATAID dataid, LPPROPVARIANT pValue)
Definition: mimeole.c:3265
static HRESULT WINAPI MimeSecurity_CheckInit(IMimeSecurity *iface)
Definition: mimeole.c:3189
static HRESULT WINAPI MimeSecurity_GetMessageType(IMimeSecurity *iface, const HWND hwndParent, IMimeBody *pBody, DWORD *pdwSecType)
Definition: mimeole.c:3255
static HRESULT WINAPI MimeSecurity_GetCertificateName(IMimeSecurity *iface, const PCX509CERT pX509Cert, const CERTNAMETYPE cn, LPSTR *ppszName)
Definition: mimeole.c:3245
static HRESULT WINAPI MimeSecurity_InitNew(IMimeSecurity *iface)
Definition: mimeole.c:3182
static HRESULT WINAPI MimeSecurity_EnumCertificates(IMimeSecurity *iface, HCAPICERTSTORE hc, DWORD dwUsage, PCX509CERT pPrev, PCX509CERT *ppCert)
Definition: mimeole.c:3234

Definition at line 3276 of file mimeole.c.

Referenced by MimeSecurity_create().

◆ prop_schema_vtbl

IMimePropertySchemaVtbl prop_schema_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI propschema_GetPropertyName(IMimePropertySchema *iface, DWORD propid, char **name)
Definition: mimeole.c:3599
static HRESULT WINAPI propschema_ModifyProperty(IMimePropertySchema *iface, const char *name, DWORD flags, DWORD rownumber, VARTYPE vtdefault)
Definition: mimeole.c:3584
static HRESULT WINAPI propschema_RegisterAddressType(IMimePropertySchema *iface, const char *name, DWORD *adrtype)
Definition: mimeole.c:3606
static HRESULT WINAPI propschema_QueryInterface(IMimePropertySchema *iface, REFIID riid, void **out)
Definition: mimeole.c:3529
static HRESULT WINAPI propschema_GetPropertyId(IMimePropertySchema *iface, const char *name, DWORD *propid)
Definition: mimeole.c:3592
static ULONG WINAPI propschema_Release(IMimePropertySchema *iface)
Definition: mimeole.c:3561
static HRESULT WINAPI propschema_RegisterProperty(IMimePropertySchema *iface, const char *name, DWORD flags, DWORD rownumber, VARTYPE vtdefault, DWORD *propid)
Definition: mimeole.c:3576
static ULONG WINAPI propschema_AddRef(IMimePropertySchema *iface)
Definition: mimeole.c:3551

Definition at line 3613 of file mimeole.c.

Referenced by MimeOleGetPropertySchema().

◆ sub_stream_vtbl

struct IStreamVtbl sub_stream_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI sub_stream_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
Definition: mimeole.c:260
static HRESULT WINAPI sub_stream_QueryInterface(IStream *iface, REFIID riid, void **ppv)
Definition: mimeole.c:182
static HRESULT WINAPI sub_stream_Revert(IStream *iface)
Definition: mimeole.c:360
static HRESULT WINAPI sub_stream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
Definition: mimeole.c:295
static ULONG WINAPI sub_stream_AddRef(IStream *iface)
Definition: mimeole.c:200
static HRESULT WINAPI sub_stream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: mimeole.c:367
static HRESULT WINAPI sub_stream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
Definition: mimeole.c:250
static HRESULT WINAPI sub_stream_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
Definition: mimeole.c:303
static HRESULT WINAPI sub_stream_Clone(IStream *iface, IStream **ppstm)
Definition: mimeole.c:399
static HRESULT WINAPI sub_stream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
Definition: mimeole.c:225
static HRESULT WINAPI sub_stream_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
Definition: mimeole.c:387
static ULONG WINAPI sub_stream_Release(IStream *iface)
Definition: mimeole.c:210
static HRESULT WINAPI sub_stream_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: mimeole.c:377
static HRESULT WINAPI sub_stream_Commit(IStream *iface, DWORD grfCommitFlags)
Definition: mimeole.c:352

Definition at line 407 of file mimeole.c.

Referenced by create_sub_stream().