ReactOS  0.4.13-dev-39-g8b6696f
mimeole.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "objbase.h"
#include "ole2.h"
#include "mimeole.h"
#include "propvarutil.h"
#include "wine/heap.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/unicode.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 NONAMELESSUNION
 
#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 LPSTR strdupA (LPCSTR str)
 
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 1890 of file mimeole.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 23 of file mimeole.c.

◆ PARSER_BUF_SIZE

#define PARSER_BUF_SIZE   1024

Definition at line 491 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 669 of file mimeole.c.

670 {
671  const char *key = p, *value, *cp = p;
672  param_t *param;
673  char *name;
674 
675  TRACE("got param %s\n", p);
676 
677  while (*key == ' ' || *key == '\t' ) key++;
678 
679  cp = strchr(key, '=');
680  if(!cp)
681  {
682  WARN("malformed parameter - skipping\n");
683  return;
684  }
685 
686  name = HeapAlloc(GetProcessHeap(), 0, cp - key + 1);
687  memcpy(name, key, cp - key);
688  name[cp - key] = '\0';
689 
690  value = cp + 1;
691 
692  param = HeapAlloc(GetProcessHeap(), 0, sizeof(*param));
693  param->name = name;
694  param->value = unquote_string(value);
695  list_add_tail(&header->params, &param->entry);
696 }
#define WARN(fmt,...)
Definition: debug.h:111
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLfloat param
Definition: glext.h:5796
HKEY key
Definition: reg.c:42
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLsizei const GLfloat * value
Definition: glext.h:6069
char * strchr(const char *String, int ch)
Definition: utclib.c:501
POINT cp
Definition: magnifier.c:60
Definition: name.c:36
GLfloat GLfloat p
Definition: glext.h:8902
static char * unquote_string(const char *str)
Definition: mimeole.c:636
struct CFHEADER header
Definition: fdi.c:109
Definition: path.c:42
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by split_params().

◆ copy_headers_to_buf()

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

Definition at line 499 of file mimeole.c.

500 {
501  char *buf = NULL;
502  DWORD size = PARSER_BUF_SIZE, offset = 0, last_end = 0;
503  HRESULT hr;
504  BOOL done = FALSE;
505 
506  *ptr = NULL;
507 
508  do
509  {
510  char *end;
511  DWORD read;
512 
513  if(!buf)
514  buf = HeapAlloc(GetProcessHeap(), 0, size + 1);
515  else
516  {
517  size *= 2;
518  buf = HeapReAlloc(GetProcessHeap(), 0, buf, size + 1);
519  }
520  if(!buf)
521  {
522  hr = E_OUTOFMEMORY;
523  goto fail;
524  }
525 
526  hr = IStream_Read(stm, buf + offset, size - offset, &read);
527  if(FAILED(hr)) goto fail;
528 
529  offset += read;
530  buf[offset] = '\0';
531 
532  if(read == 0) done = TRUE;
533 
534  while(!done && (end = strstr(buf + last_end, "\r\n")))
535  {
536  DWORD new_end = end - buf + 2;
537  if(new_end - last_end == 2)
538  {
540  off.QuadPart = (LONGLONG)new_end - offset;
541  IStream_Seek(stm, off, STREAM_SEEK_CUR, NULL);
542  buf[new_end] = '\0';
543  done = TRUE;
544  }
545  else
546  last_end = new_end;
547  }
548  } while(!done);
549 
550  *ptr = buf;
551  return S_OK;
552 
553 fail:
554  HeapFree(GetProcessHeap(), 0, buf);
555  return hr;
556 }
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
GLintptr offset
Definition: glext.h:5920
#define PARSER_BUF_SIZE
Definition: mimeole.c:491
GLuint GLuint end
Definition: gl.h:1545
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int BOOL
Definition: ntddk_ex.h:94
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
int64_t LONGLONG
Definition: typedefs.h:66
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:59
#define HeapReAlloc
Definition: compat.h:393
#define HeapFree(x, y, z)
Definition: compat.h:394
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
off
Definition: i386-dis.c:3909

Referenced by parse_headers().

◆ count_children()

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

Definition at line 2504 of file mimeole.c.

2505 {
2506  body_t *child;
2507 
2508  LIST_FOR_EACH_ENTRY(child, &body->children, body_t, entry)
2509  {
2510  (*count)++;
2511  if(recurse) count_children(child, recurse, count);
2512  }
2513 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
uint8_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 void count_children(body_t *body, boolean recurse, ULONG *count)
Definition: mimeole.c:2504
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100

Referenced by 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 2062 of file mimeole.c.

2063 {
2064  HRESULT hr;
2065  DWORD read, boundary_start;
2066  int boundary_len = strlen(boundary);
2067  char *buf, *ptr, *overlap;
2068  DWORD start = 0, overlap_no;
2069  offset_entry_t *cur_body = NULL;
2070  BOOL is_first_line = TRUE;
2071  ULARGE_INTEGER cur;
2073 
2074  list_init(body_offsets);
2075 
2076  overlap_no = boundary_len + 5;
2077 
2078  overlap = buf = HeapAlloc(GetProcessHeap(), 0, overlap_no + PARSER_BUF_SIZE + 1);
2079 
2080  zero.QuadPart = 0;
2081  hr = IStream_Seek(stm, zero, STREAM_SEEK_CUR, &cur);
2082  start = cur.u.LowPart;
2083 
2084  do {
2085  hr = IStream_Read(stm, overlap, PARSER_BUF_SIZE, &read);
2086  if(FAILED(hr)) goto end;
2087  if(read == 0) break;
2088  overlap[read] = '\0';
2089 
2090  ptr = buf;
2091  while(1) {
2092  if(is_first_line) {
2093  is_first_line = FALSE;
2094  }else {
2095  ptr = strstr(ptr, "\r\n");
2096  if(!ptr)
2097  break;
2098  ptr += 2;
2099  }
2100 
2101  boundary_start = start + ptr - buf;
2102 
2103  if(*ptr == '-' && *(ptr + 1) == '-' && !memcmp(ptr + 2, boundary, boundary_len)) {
2104  ptr += boundary_len + 2;
2105 
2106  if(*ptr == '\r' && *(ptr + 1) == '\n')
2107  {
2108  ptr += 2;
2109  if(cur_body)
2110  {
2111  cur_body->offsets.cbBodyEnd = boundary_start - 2;
2112  list_add_tail(body_offsets, &cur_body->entry);
2113  }
2114  cur_body = HeapAlloc(GetProcessHeap(), 0, sizeof(*cur_body));
2115  cur_body->offsets.cbBoundaryStart = boundary_start;
2116  cur_body->offsets.cbHeaderStart = start + ptr - buf;
2117  }
2118  else if(*ptr == '-' && *(ptr + 1) == '-')
2119  {
2120  if(cur_body)
2121  {
2122  cur_body->offsets.cbBodyEnd = boundary_start - 2;
2123  list_add_tail(body_offsets, &cur_body->entry);
2124  goto end;
2125  }
2126  }
2127  }
2128  }
2129 
2130  if(overlap == buf) /* 1st iteration */
2131  {
2132  memmove(buf, buf + PARSER_BUF_SIZE - overlap_no, overlap_no);
2133  overlap = buf + overlap_no;
2134  start += read - overlap_no;
2135  }
2136  else
2137  {
2138  memmove(buf, buf + PARSER_BUF_SIZE, overlap_no);
2139  start += read;
2140  }
2141  } while(1);
2142 
2143 end:
2144  HeapFree(GetProcessHeap(), 0, buf);
2145  return hr;
2146 }
struct _ULARGE_INTEGER::@3736 u
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
#define TRUE
Definition: types.h:120
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
HRESULT hr
Definition: shlfolder.c:183
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
#define PARSER_BUF_SIZE
Definition: mimeole.c:491
GLuint GLuint end
Definition: gl.h:1545
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
Definition: mimeole.c:2056
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
static double zero
Definition: j0_y0.c:96
struct list entry
Definition: mimeole.c:2058
GLuint start
Definition: gl.h:1545
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
#define HeapFree(x, y, z)
Definition: compat.h:394
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
BODYOFFSETS offsets
Definition: mimeole.c:2059

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 2148 of file mimeole.c.

2149 {
2151  MimeBody *mime_body;
2152  HRESULT hr;
2153  body_t *body;
2155 
2156  pos.QuadPart = offset->cbHeaderStart;
2157  IStream_Seek(pStm, pos, STREAM_SEEK_SET, NULL);
2158 
2159  mime_body = mimebody_create();
2160  IMimeBody_Load(&mime_body->IMimeBody_iface, pStm);
2161 
2162  pos.QuadPart = 0;
2163  hr = IStream_Seek(pStm, pos, STREAM_SEEK_CUR, &start);
2164  offset->cbBodyStart = start.QuadPart;
2165  if (parent) MimeBody_set_offsets(mime_body, offset);
2166 
2167  length.QuadPart = offset->cbBodyEnd - offset->cbBodyStart;
2168  create_sub_stream(pStm, start, length, (IStream**)&mime_body->data);
2169  mime_body->data_iid = IID_IStream;
2170 
2171  body = new_body_entry(mime_body, msg->next_index++, parent);
2172 
2173  if(IMimeBody_IsContentType(&mime_body->IMimeBody_iface, "multipart", NULL) == S_OK)
2174  {
2175  MIMEPARAMINFO *param_info;
2176  ULONG count, i;
2177  IMimeAllocator *alloc;
2178 
2179  hr = IMimeBody_GetParameters(&mime_body->IMimeBody_iface, "Content-Type", &count,
2180  &param_info);
2181  if(hr != S_OK || count == 0) return body;
2182 
2184 
2185  for(i = 0; i < count; i++)
2186  {
2187  if(!lstrcmpiA(param_info[i].pszName, "boundary"))
2188  {
2189  struct list offset_list;
2190  offset_entry_t *cur, *cursor2;
2191  hr = create_body_offset_list(pStm, param_info[i].pszData, &offset_list);
2192  LIST_FOR_EACH_ENTRY_SAFE(cur, cursor2, &offset_list, offset_entry_t, entry)
2193  {
2194  body_t *sub_body;
2195 
2196  sub_body = create_sub_body(msg, pStm, &cur->offsets, body);
2197  list_add_tail(&body->children, &sub_body->entry);
2198  list_remove(&cur->entry);
2199  HeapFree(GetProcessHeap(), 0, cur);
2200  }
2201  break;
2202  }
2203  }
2204  IMimeAllocator_FreeParamInfoArray(alloc, count, param_info, TRUE);
2205  IMimeAllocator_Release(alloc);
2206  }
2207  return body;
2208 }
#define TRUE
Definition: types.h:120
static MimeBody * mimebody_create(void)
Definition: mimeole.c:1892
static HRESULT MimeBody_set_offsets(MimeBody *body, const BODYOFFSETS *offsets)
Definition: mimeole.c:1881
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
HRESULT hr
Definition: shlfolder.c:183
GLuint GLuint GLsizei count
Definition: gl.h:1545
uint8_t entry
Definition: isohybrid.c:63
GLintptr offset
Definition: glext.h:5920
IMimeBody IMimeBody_iface
Definition: mimeole.c:158
static HRESULT create_body_offset_list(IStream *stm, const char *boundary, struct list *body_offsets)
Definition: mimeole.c:2062
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
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
smooth NULL
Definition: ftsmooth.c:416
Definition: mimeole.c:2056
struct list entry
Definition: mimeole.c:1941
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
r parent
Definition: btrfs.c:2659
HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator **alloc)
Definition: mimeole.c:3530
LONG HRESULT
Definition: typedefs.h:77
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
static HRESULT create_sub_stream(IStream *stream, ULARGE_INTEGER start, ULARGE_INTEGER length, IStream **out)
Definition: mimeole.c:430
static body_t * create_sub_body(MimeMessage *msg, IStream *pStm, BODYOFFSETS *offset, body_t *parent)
Definition: mimeole.c:2148
Definition: _list.h:228
#define S_OK
Definition: intsafe.h:59
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
GLuint start
Definition: gl.h:1545
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
#define alloc
Definition: rosglue.h:13
#define msg(x)
Definition: auth_time.c:54
static body_t * new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent)
Definition: mimeole.c:2041
unsigned int ULONG
Definition: retypes.h:1
void * data
Definition: mimeole.c:169
IID data_iid
Definition: mimeole.c:170
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by MimeMessage_Load().

◆ create_sub_stream()

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

Definition at line 430 of file mimeole.c.

431 {
433 
434  *out = NULL;
435  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
436  if(!This) return E_OUTOFMEMORY;
437 
438  This->IStream_iface.lpVtbl = &sub_stream_vtbl;
439  This->ref = 1;
440  This->start = start;
441  This->length = length;
442  This->pos.QuadPart = 0;
443  IStream_AddRef(stream);
444  This->base = stream;
445 
446  *out = &This->IStream_iface;
447  return S_OK;
448 }
static struct IStreamVtbl sub_stream_vtbl
Definition: mimeole.c:412
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
static FILE * out
Definition: regtests2xml.c:44
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
#define S_OK
Definition: intsafe.h:59
GLuint start
Definition: gl.h:1545

Referenced by create_sub_body(), and MimeBody_GetData().

◆ decode_base64()

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

Definition at line 1560 of file mimeole.c.

1561 {
1562  const unsigned char *ptr, *end;
1563  unsigned char buf[1024];
1565  unsigned char *ret;
1566  unsigned char in[4];
1567  IStream *output;
1568  DWORD size;
1569  int n = 0;
1570  HRESULT hres;
1571 
1572  pos.QuadPart = 0;
1573  hres = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL);
1574  if(FAILED(hres))
1575  return hres;
1576 
1578  if(FAILED(hres))
1579  return hres;
1580 
1581  while(1) {
1582  hres = IStream_Read(input, buf, sizeof(buf), &size);
1583  if(FAILED(hres) || !size)
1584  break;
1585 
1586  ptr = ret = buf;
1587  end = buf + size;
1588 
1589  while(1) {
1590  /* skip invalid chars */
1591  while(ptr < end && (*ptr >= ARRAY_SIZE(base64_decode_table)
1592  || base64_decode_table[*ptr] == -1))
1593  ptr++;
1594  if(ptr == end)
1595  break;
1596 
1597  in[n++] = base64_decode_table[*ptr++];
1598  switch(n) {
1599  case 2:
1600  *ret++ = in[0] << 2 | in[1] >> 4;
1601  continue;
1602  case 3:
1603  *ret++ = in[1] << 4 | in[2] >> 2;
1604  continue;
1605  case 4:
1606  *ret++ = ((in[2] << 6) & 0xc0) | in[3];
1607  n = 0;
1608  }
1609  }
1610 
1611  if(ret > buf) {
1612  hres = IStream_Write(output, buf, ret - buf, NULL);
1613  if(FAILED(hres))
1614  break;
1615  }
1616  }
1617 
1618  if(SUCCEEDED(hres))
1619  hres = IStream_Seek(output, pos, STREAM_SEEK_SET, NULL);
1620  if(FAILED(hres)) {
1621  IStream_Release(output);
1622  return hres;
1623  }
1624 
1625  *ret_stream = output;
1626  return S_OK;
1627 }
#define TRUE
Definition: types.h:120
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLdouble n
Definition: glext.h:7729
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
GLuint GLuint end
Definition: gl.h:1545
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define S_OK
Definition: intsafe.h:59
GLenum GLenum GLenum input
Definition: glext.h:9031
GLuint in
Definition: glext.h:9616
#define ARRAY_SIZE(a)
Definition: main.h:24
static const signed char base64_decode_table[]
Definition: mimeole.c:1548
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by MimeBody_GetData().

◆ decode_qp()

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

Definition at line 1640 of file mimeole.c.

1641 {
1642  const unsigned char *ptr, *end;
1643  unsigned char *ret, prev = 0;
1644  unsigned char buf[1024];
1646  IStream *output;
1647  DWORD size;
1648  int n = -1;
1649  HRESULT hres;
1650 
1651  pos.QuadPart = 0;
1652  hres = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL);
1653  if(FAILED(hres))
1654  return hres;
1655 
1657  if(FAILED(hres))
1658  return hres;
1659 
1660  while(1) {
1661  hres = IStream_Read(input, buf, sizeof(buf), &size);
1662  if(FAILED(hres) || !size)
1663  break;
1664 
1665  ptr = ret = buf;
1666  end = buf + size;
1667 
1668  while(ptr < end) {
1669  unsigned char byte = *ptr++;
1670 
1671  switch(n) {
1672  case -1:
1673  if(byte == '=')
1674  n = 0;
1675  else
1676  *ret++ = byte;
1677  continue;
1678  case 0:
1679  prev = byte;
1680  n = 1;
1681  continue;
1682  case 1:
1683  if(prev != '\r' || byte != '\n') {
1684  int h1 = hex_digit(prev), h2 = hex_digit(byte);
1685  if(h1 != -1 && h2 != -1)
1686  *ret++ = (h1 << 4) | h2;
1687  else
1688  *ret++ = '=';
1689  }
1690  n = -1;
1691  continue;
1692  }
1693  }
1694 
1695  if(ret > buf) {
1696  hres = IStream_Write(output, buf, ret - buf, NULL);
1697  if(FAILED(hres))
1698  break;
1699  }
1700  }
1701 
1702  if(SUCCEEDED(hres))
1703  hres = IStream_Seek(output, pos, STREAM_SEEK_SET, NULL);
1704  if(FAILED(hres)) {
1705  IStream_Release(output);
1706  return hres;
1707  }
1708 
1709  *ret_stream = output;
1710  return S_OK;
1711 }
struct list * prev
Definition: list.h:39
#define TRUE
Definition: types.h:120
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLdouble n
Definition: glext.h:7729
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
static int hex_digit(char c)
Definition: mimeole.c:1629
GLuint GLuint end
Definition: gl.h:1545
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define S_OK
Definition: intsafe.h:59
GLenum GLenum GLenum input
Definition: glext.h:9031
#define byte(x, n)
Definition: tomcrypt.h:118
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by MimeBody_GetData().

◆ empty_body_list()

static void empty_body_list ( struct list list)
static

Definition at line 1994 of file mimeole.c.

1995 {
1996  body_t *body, *cursor2;
1998  {
1999  empty_body_list(&body->children);
2000  list_remove(&body->entry);
2001  IMimeBody_Release(&body->mime_body->IMimeBody_iface);
2002  HeapFree(GetProcessHeap(), 0, body);
2003  }
2004 }
uint8_t entry
Definition: isohybrid.c:63
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
Definition: _list.h:228
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
static void empty_body_list(struct list *list)
Definition: mimeole.c:1994
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by MimeMessage_Load(), and MimeMessage_Release().

◆ empty_header_list()

static void empty_header_list ( struct list list)
static

Definition at line 833 of file mimeole.c.

834 {
835  header_t *header, *cursor2;
836 
838  {
840  }
841 }
static void free_header(header_t *header)
Definition: mimeole.c:825
uint8_t entry
Definition: isohybrid.c:63
Definition: _list.h:228
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
struct CFHEADER header
Definition: fdi.c:109

Referenced by MimeBody_Release().

◆ empty_new_prop_list()

static void empty_new_prop_list ( struct list list)
static

Definition at line 843 of file mimeole.c.

844 {
845  property_list_entry_t *prop, *cursor2;
846 
848  {
849  list_remove(&prop->entry);
850  HeapFree(GetProcessHeap(), 0, (char *)prop->prop.name);
851  HeapFree(GetProcessHeap(), 0, prop);
852  }
853 }
Definition: mimeole.c:56
uint8_t entry
Definition: isohybrid.c:63
LPCSTR name
Definition: mimeole.c:50
struct list entry
Definition: mimeole.c:58
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
Definition: _list.h:228
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
property_t prop
Definition: mimeole.c:59
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by MimeBody_Release().

◆ empty_param_list()

static void empty_param_list ( struct list list)
static

Definition at line 812 of file mimeole.c.

813 {
814  param_t *param, *cursor2;
815 
817  {
818  list_remove(&param->entry);
822  }
823 }
char * name
Definition: wpp.c:36
uint8_t entry
Definition: isohybrid.c:63
char * value
Definition: wpp.c:37
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
GLfloat param
Definition: glext.h:5796
Definition: _list.h:228
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by free_header().

◆ find_body()

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

Definition at line 2330 of file mimeole.c.

2331 {
2332  body_t *cur;
2333  HRESULT hr;
2334 
2335  if(hbody == HBODY_ROOT)
2336  {
2338  return S_OK;
2339  }
2340 
2342  {
2343  if(cur->index == HandleToUlong(hbody))
2344  {
2345  *body = cur;
2346  return S_OK;
2347  }
2348  hr = find_body(&cur->children, hbody, body);
2349  if(hr == S_OK) return S_OK;
2350  }
2351  return S_FALSE;
2352 }
HRESULT hr
Definition: shlfolder.c:183
uint8_t entry
Definition: isohybrid.c:63
#define HandleToUlong(h)
Definition: basetsd.h:79
DWORD index
Definition: mimeole.c:1942
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:77
static HRESULT find_body(struct list *list, HBODY hbody, body_t **body)
Definition: mimeole.c:2330
Definition: _list.h:228
#define S_OK
Definition: intsafe.h:59
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
struct list children
Definition: mimeole.c:1946
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by 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 891 of file mimeole.c.

892 {
893  const property_t *prop_def = NULL;
894 
895  for(prop_def = default_props; prop_def->name; prop_def++)
896  {
897  if(ISPIDSTR(name))
898  {
899  if(STRTOPID(name) == prop_def->id)
900  {
901  break;
902  }
903  }
904  else if(!lstrcmpiA(name, prop_def->name))
905  {
906  break;
907  }
908  }
909 
910  if(prop_def->id)
911  TRACE("%s: found match with default property id %d\n", prop_def->name, prop_def->id);
912  else
913  prop_def = NULL;
914 
915  return prop_def;
916 }
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
LPCSTR name
Definition: mimeole.c:50
DWORD id
Definition: mimeole.c:51
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static const property_t default_props[]
Definition: mimeole.c:62
Definition: name.c:36

Referenced by MimeBody_SetProp().

◆ find_next()

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

Definition at line 2533 of file mimeole.c.

2534 {
2535  struct list *ptr;
2536  HBODY next;
2537 
2538  for (;;)
2539  {
2540  if (!body) ptr = list_head( &This->body_tree );
2541  else
2542  {
2543  ptr = list_head( &body->children );
2544  while (!ptr)
2545  {
2546  if (!body->parent) return MIME_E_NOT_FOUND;
2547  if (!(ptr = list_next( &body->parent->children, &body->entry ))) body = body->parent;
2548  }
2549  }
2550 
2551  body = LIST_ENTRY( ptr, body_t, entry );
2552  next = UlongToHandle( body->index );
2553  find->dwReserved = body->index;
2554  if (IMimeBody_IsContentType(&body->mime_body->IMimeBody_iface, find->pszPriType,
2555  find->pszSubType) == S_OK)
2556  {
2557  *out = next;
2558  return S_OK;
2559  }
2560  }
2561  return MIME_E_NOT_FOUND;
2562 }
uint8_t entry
Definition: isohybrid.c:63
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
static PVOID ptr
Definition: dispmode.c:27
#define UlongToHandle(ul)
Definition: basetsd.h:97
static FILE * out
Definition: regtests2xml.c:44
Definition: _list.h:228
#define S_OK
Definition: intsafe.h:59
static unsigned __int64 next
Definition: rand_nt.c:6
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
static TAGID TAGID find
Definition: db.cpp:153
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
#define LIST_ENTRY(type)
Definition: queue.h:175

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 865 of file mimeole.c.

866 {
867  header_t *header;
868 
869  *prop = NULL;
870 
872  {
873  if(ISPIDSTR(name))
874  {
875  if(STRTOPID(name) == header->prop->id)
876  {
877  *prop = header;
878  return S_OK;
879  }
880  }
881  else if(!lstrcmpiA(name, header->prop->name))
882  {
883  *prop = header;
884  return S_OK;
885  }
886  }
887 
888  return MIME_E_NOT_FOUND;
889 }
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
uint8_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
Definition: name.c:36
struct CFHEADER header
Definition: fdi.c:109

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

◆ free_header()

static void free_header ( header_t header)
static

Definition at line 825 of file mimeole.c.

826 {
827  list_remove(&header->entry);
828  PropVariantClear(&header->value);
829  empty_param_list(&header->params);
830  heap_free(header);
831 }
static void empty_param_list(struct list *list)
Definition: mimeole.c:812
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2952
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
struct CFHEADER header
Definition: fdi.c:109
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

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 2387 of file mimeole.c.

2388 {
2389  body_t *root = LIST_ENTRY(list_head(&msg->body_tree), body_t, entry);
2390  body_t *body;
2391  HRESULT hr;
2392  struct list *list;
2393 
2394  if(location == IBL_ROOT)
2395  {
2396  *out = root;
2397  return S_OK;
2398  }
2399 
2400  hr = find_body(&msg->body_tree, pivot, &body);
2401 
2402  if(hr == S_OK)
2403  {
2404  switch(location)
2405  {
2406  case IBL_PARENT:
2407  if(body->parent)
2408  *out = body->parent;
2409  else
2410  hr = MIME_E_NOT_FOUND;
2411  break;
2412 
2413  case IBL_FIRST:
2414  list = list_head(&body->children);
2415  if(list)
2416  *out = LIST_ENTRY(list, body_t, entry);
2417  else
2418  hr = MIME_E_NOT_FOUND;
2419  break;
2420 
2421  case IBL_LAST:
2422  list = list_tail(&body->children);
2423  if(list)
2424  *out = LIST_ENTRY(list, body_t, entry);
2425  else
2426  hr = MIME_E_NOT_FOUND;
2427  break;
2428 
2429  case IBL_NEXT:
2430  list = list_next(&body->parent->children, &body->entry);
2431  if(list)
2432  *out = LIST_ENTRY(list, body_t, entry);
2433  else
2434  hr = MIME_E_NOT_FOUND;
2435  break;
2436 
2437  case IBL_PREVIOUS:
2438  list = list_prev(&body->parent->children, &body->entry);
2439  if(list)
2440  *out = LIST_ENTRY(list, body_t, entry);
2441  else
2442  hr = MIME_E_NOT_FOUND;
2443  break;
2444 
2445  default:
2446  hr = E_FAIL;
2447  break;
2448  }
2449  }
2450 
2451  return hr;
2452 }
HRESULT hr
Definition: shlfolder.c:183
__WINE_SERVER_LIST_INLINE struct list * list_prev(const struct list *list, const struct list *elem)
Definition: list.h:123
struct _root root
uint8_t entry
Definition: isohybrid.c:63
__WINE_SERVER_LIST_INLINE struct list * list_tail(const struct list *list)
Definition: list.h:137
#define E_FAIL
Definition: ddrawi.h:102
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
static HRESULT find_body(struct list *list, HBODY hbody, body_t **body)
Definition: mimeole.c:2330
Definition: _list.h:228
#define S_OK
Definition: intsafe.h:59
#define list
Definition: rosglue.h:35
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
#define msg(x)
Definition: auth_time.c:54
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by MimeMessage_GetBody().

◆ get_stream_size()

static HRESULT get_stream_size ( IStream stream,
ULARGE_INTEGER size 
)
static

Definition at line 450 of file mimeole.c.

451 {
452  STATSTG statstg = {NULL};
454  HRESULT hres;
455 
456  hres = IStream_Stat(stream, &statstg, STATFLAG_NONAME);
457  if(SUCCEEDED(hres)) {
458  *size = statstg.cbSize;
459  return S_OK;
460  }
461 
462  zero.QuadPart = 0;
463  return IStream_Seek(stream, zero, STREAM_SEEK_END, size);
464 }
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static double zero
Definition: j0_y0.c:96
Definition: parse.h:22
#define S_OK
Definition: intsafe.h:59
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by MimeBody_GetData().

◆ hex_digit()

static int hex_digit ( char  c)
static

Definition at line 1629 of file mimeole.c.

1630 {
1631  if('0' <= c && c <= '9')
1632  return c - '0';
1633  if('A' <= c && c <= 'F')
1634  return c - 'A' + 10;
1635  if('a' <= c && c <= 'f')
1636  return c - 'a' + 10;
1637  return -1;
1638 }
const GLubyte * c
Definition: glext.h:8905

Referenced by decode_qp().

◆ impl_from_IMimeBody()

◆ impl_from_IMimeMessage()

static MimeMessage* impl_from_IMimeMessage ( IMimeMessage iface)
inlinestatic

Definition at line 1959 of file mimeole.c.

1960 {
1961  return CONTAINING_RECORD(iface, MimeMessage, IMimeMessage_iface);
1962 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by MimeMessage_AddRef(), MimeMessage_BindToObject(), MimeMessage_CountBodies(), MimeMessage_FindFirst(), MimeMessage_FindNext(), MimeMessage_GetBody(), MimeMessage_GetMessageSource(), MimeMessage_Load(), and MimeMessage_Release().

◆ impl_from_IMimePropertySchema()

static propschema* impl_from_IMimePropertySchema ( IMimePropertySchema *  iface)
inlinestatic

Definition at line 477 of file mimeole.c.

478 {
479  return CONTAINING_RECORD(iface, propschema, IMimePropertySchema_iface);
480 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by propschema_AddRef(), propschema_GetPropertyId(), propschema_GetPropertyName(), propschema_ModifyProperty(), propschema_QueryInterface(), propschema_RegisterAddressType(), propschema_RegisterProperty(), and propschema_Release().

◆ impl_from_IMimeSecurity()

static MimeSecurity* impl_from_IMimeSecurity ( IMimeSecurity iface)
inlinestatic

Definition at line 3154 of file mimeole.c.

3155 {
3156  return CONTAINING_RECORD(iface, MimeSecurity, IMimeSecurity_iface);
3157 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by MimeSecurity_AddRef(), and MimeSecurity_Release().

◆ impl_from_IStream()

static sub_stream_t* impl_from_IStream ( IStream iface)
inlinestatic

Definition at line 182 of file mimeole.c.

183 {
184  return CONTAINING_RECORD(iface, sub_stream_t, IStream_iface);
185 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by StgStreamImpl_AddRef(), StgStreamImpl_Clone(), StgStreamImpl_Commit(), StgStreamImpl_CopyTo(), StgStreamImpl_LockRegion(), StgStreamImpl_QueryInterface(), StgStreamImpl_Read(), StgStreamImpl_Release(), StgStreamImpl_Seek(), StgStreamImpl_SetSize(), StgStreamImpl_Stat(), StgStreamImpl_UnlockRegion(), StgStreamImpl_Write(), sub_stream_AddRef(), sub_stream_QueryInterface(), sub_stream_Read(), sub_stream_Release(), sub_stream_Seek(), and sub_stream_Stat().

◆ init_content_encoding()

static void init_content_encoding ( MimeBody body,
header_t header 
)
static

Definition at line 767 of file mimeole.c.

768 {
769  const char *encoding = header->value.u.pszVal;
770 
771  if(!strcasecmp(encoding, "base64"))
772  body->encoding = IET_BASE64;
773  else if(!strcasecmp(encoding, "quoted-printable"))
774  body->encoding = IET_QP;
775  else if(!strcasecmp(encoding, "7bit"))
776  body->encoding = IET_7BIT;
777  else if(!strcasecmp(encoding, "8bit"))
778  body->encoding = IET_8BIT;
779  else
780  FIXME("unknown encoding %s\n", debugstr_a(encoding));
781 }
#define strcasecmp
Definition: fake.h:9
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
ed encoding
Definition: write.c:2847
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
struct CFHEADER header
Definition: fdi.c:109

Referenced by parse_headers().

◆ init_content_type()

static void init_content_type ( MimeBody body,
header_t header 
)
static

Definition at line 749 of file mimeole.c.

750 {
751  char *slash;
752  DWORD len;
753 
754  slash = strchr(header->value.u.pszVal, '/');
755  if(!slash)
756  {
757  WARN("malformed context type value\n");
758  return;
759  }
760  len = slash - header->value.u.pszVal;
761  body->content_pri_type = HeapAlloc(GetProcessHeap(), 0, len + 1);
762  memcpy(body->content_pri_type, header->value.u.pszVal, len);
763  body->content_pri_type[len] = '\0';
764  body->content_sub_type = strdupA(slash + 1);
765 }
#define WARN(fmt,...)
Definition: debug.h:111
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
char * strchr(const char *String, int ch)
Definition: utclib.c:501
static LPSTR strdupA(LPCSTR str)
Definition: mimeole.c:482
struct CFHEADER header
Definition: fdi.c:109

Referenced by parse_headers().

◆ mime_obj_AddRef()

static ULONG WINAPI mime_obj_AddRef ( IUnknown iface)
static

Definition at line 3676 of file mimeole.c.

3677 {
3678  TRACE("\n");
3679  return 2;
3680 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ mime_obj_QueryInterface()

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

Definition at line 3669 of file mimeole.c.

3670 {
3671  FIXME("(%s %p)\n", debugstr_guid(riid), ppv);
3672  *ppv = NULL;
3673  return E_NOINTERFACE;
3674 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35

◆ mime_obj_Release()

static ULONG WINAPI mime_obj_Release ( IUnknown iface)
static

Definition at line 3682 of file mimeole.c.

3683 {
3684  TRACE("\n");
3685  return 1;
3686 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ MimeAlloc_AddRef()

static ULONG WINAPI MimeAlloc_AddRef ( IMimeAllocator *  iface)
static

Definition at line 3357 of file mimeole.c.

3359 {
3360  return 2;
3361 }

◆ MimeAlloc_Alloc()

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

Definition at line 3369 of file mimeole.c.

3372 {
3373  return CoTaskMemAlloc(cb);
3374 }
static DWORD cb
Definition: integrity.c:41
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406

◆ MimeAlloc_DidAlloc()

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

Definition at line 3399 of file mimeole.c.

3402 {
3403  FIXME("stub\n");
3404  return 0;
3405 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ MimeAlloc_Free()

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

Definition at line 3384 of file mimeole.c.

3387 {
3388  CoTaskMemFree(pv);
3389 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422

◆ MimeAlloc_FreeAddressList()

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

Definition at line 3432 of file mimeole.c.

3435 {
3436  FIXME("stub\n");
3437  return E_NOTIMPL;
3438 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeAlloc_FreeAddressProps()

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

Definition at line 3440 of file mimeole.c.

3443 {
3444  FIXME("stub\n");
3445  return E_NOTIMPL;
3446 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeAlloc_FreeEnumHeaderRowArray()

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

Definition at line 3459 of file mimeole.c.

3464 {
3465  FIXME("stub\n");
3466  return E_NOTIMPL;
3467 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeAlloc_FreeEnumPropertyArray()

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

Definition at line 3469 of file mimeole.c.

3474 {
3475  FIXME("stub\n");
3476  return E_NOTIMPL;
3477 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeAlloc_FreeParamInfoArray()

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

Definition at line 3414 of file mimeole.c.

3419 {
3420  ULONG i;
3421  TRACE("(%p)->(%d, %p, %d)\n", iface, cParams, prgParam, fFreeArray);
3422 
3423  for(i = 0; i < cParams; i++)
3424  {
3425  IMimeAllocator_Free(iface, prgParam[i].pszName);
3426  IMimeAllocator_Free(iface, prgParam[i].pszData);
3427  }
3428  if(fFreeArray) IMimeAllocator_Free(iface, prgParam);
3429  return S_OK;
3430 }
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 TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
unsigned int ULONG
Definition: retypes.h:1

◆ MimeAlloc_FreeThumbprint()

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

Definition at line 3479 of file mimeole.c.

3482 {
3483  FIXME("stub\n");
3484  return E_NOTIMPL;
3485 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeAlloc_GetSize()

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

Definition at line 3391 of file mimeole.c.

3394 {
3395  FIXME("stub\n");
3396  return 0;
3397 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ MimeAlloc_HeapMinimize()

static void WINAPI MimeAlloc_HeapMinimize ( IMimeAllocator *  iface)
static

Definition at line 3407 of file mimeole.c.

3409 {
3410  FIXME("stub\n");
3411  return;
3412 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ MimeAlloc_PropVariantClear()

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

Definition at line 3488 of file mimeole.c.

3491 {
3492  FIXME("stub\n");
3493  return E_NOTIMPL;
3494 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeAlloc_QueryInterface()

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

Definition at line 3336 of file mimeole.c.

3340 {
3341  TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), obj);
3342 
3343  if (IsEqualIID(riid, &IID_IUnknown) ||
3344  IsEqualIID(riid, &IID_IMalloc) ||
3345  IsEqualIID(riid, &IID_IMimeAllocator))
3346  {
3347  *obj = iface;
3348  IMimeAllocator_AddRef(iface);
3349  return S_OK;
3350  }
3351 
3352  FIXME("no interface for %s\n", debugstr_guid(riid));
3353  *obj = NULL;
3354  return E_NOINTERFACE;
3355 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ MimeAlloc_Realloc()

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

Definition at line 3376 of file mimeole.c.

3380 {
3381  return CoTaskMemRealloc(pv, cb);
3382 }
static DWORD cb
Definition: integrity.c:41
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:440

◆ MimeAlloc_Release()

static ULONG WINAPI MimeAlloc_Release ( IMimeAllocator *  iface)
static

Definition at line 3363 of file mimeole.c.

3365 {
3366  return 1;
3367 }

◆ MimeAlloc_ReleaseObjects()

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

Definition at line 3448 of file mimeole.c.

3453 {
3454  FIXME("stub\n");
3455  return E_NOTIMPL;
3456 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeAllocator_create()

HRESULT MimeAllocator_create ( IUnknown outer,
void **  obj 
)

Definition at line 3522 of file mimeole.c.

3523 {
3524  if(outer) return CLASS_E_NOAGGREGATION;
3525 
3526  *obj = &mime_allocator;
3527  return S_OK;
3528 }
static IMimeAllocator mime_allocator
Definition: mimeole.c:3517
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define S_OK
Definition: intsafe.h:59

Referenced by MimeOleGetAllocator().

◆ MimeBody_AddRef()

static ULONG WINAPI MimeBody_AddRef ( IMimeBody iface)
static

Definition at line 945 of file mimeole.c.

946 {
949 
950  TRACE("(%p) ref=%d\n", This, ref);
951 
952  return ref;
953 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define InterlockedIncrement
Definition: armddk.h:53

◆ MimeBody_AppendProp()

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

Definition at line 1213 of file mimeole.c.

1218 {
1219  MimeBody *This = impl_from_IMimeBody(iface);
1220  FIXME("(%p)->(%s, 0x%x, %p) stub\n", This, debugstr_a(pszName), dwFlags, pValue);
1221  return E_NOTIMPL;
1222 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_BindToObject()

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

Definition at line 1385 of file mimeole.c.

1389 {
1390  MimeBody *This = impl_from_IMimeBody(iface);
1391  FIXME("(%p)->(%s, %p) stub\n", This, debugstr_guid(riid), ppvObject);
1392  return E_NOTIMPL;
1393 }
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_Clone()

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

Definition at line 1395 of file mimeole.c.

1398 {
1399  MimeBody *This = impl_from_IMimeBody(iface);
1400  FIXME("(%p)->(%p) stub\n", This, ppPropertySet);
1401  return E_NOTIMPL;
1402 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_CopyProps()

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

Definition at line 1251 of file mimeole.c.

1256 {
1257  MimeBody *This = impl_from_IMimeBody(iface);
1258  FIXME("(%p)->(%d, %p, %p) stub\n", This, cNames, prgszName, pPropertySet);
1259  return E_NOTIMPL;
1260 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_CopyTo()

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

Definition at line 1792 of file mimeole.c.

1795 {
1796  MimeBody *This = impl_from_IMimeBody(iface);
1797  FIXME("(%p)->(%p) stub\n", This, pBody);
1798  return E_NOTIMPL;
1799 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ mimebody_create()

static MimeBody* mimebody_create ( void  )
static

Definition at line 1892 of file mimeole.c.

1893 {
1894  MimeBody *This;
1895  BODYOFFSETS body_offsets;
1896 
1897  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
1898  if (!This)
1899  return NULL;
1900 
1901  This->IMimeBody_iface.lpVtbl = &body_vtbl;
1902  This->ref = 1;
1903  This->handle = NULL;
1904  list_init(&This->headers);
1905  list_init(&This->new_props);
1906  This->next_prop_id = FIRST_CUSTOM_PROP_ID;
1907  This->content_pri_type = NULL;
1908  This->content_sub_type = NULL;
1909  This->encoding = IET_7BIT;
1910  This->data = NULL;
1911  This->data_iid = IID_NULL;
1912 
1913  body_offsets.cbBoundaryStart = body_offsets.cbHeaderStart = 0;
1914  body_offsets.cbBodyStart = body_offsets.cbBodyEnd = 0;
1915  MimeBody_set_offsets(This, &body_offsets);
1916 
1917  return This;
1918 }
static HRESULT MimeBody_set_offsets(MimeBody *body, const BODYOFFSETS *offsets)
Definition: mimeole.c:1881
static IMimeBodyVtbl body_vtbl
Definition: mimeole.c:1834
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define IID_NULL
Definition: guiddef.h:93
#define FIRST_CUSTOM_PROP_ID
Definition: mimeole.c:1890
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

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

◆ MimeBody_create()

HRESULT MimeBody_create ( IUnknown outer,
void **  ppv 
)

Definition at line 1920 of file mimeole.c.

1921 {
1922  MimeBody *mb;
1923 
1924  if(outer)
1925  return CLASS_E_NOAGGREGATION;
1926 
1927  if ((mb = mimebody_create()))
1928  {
1929  *ppv = &mb->IMimeBody_iface;
1930  return S_OK;
1931  }
1932  else
1933  {
1934  *ppv = NULL;
1935  return E_OUTOFMEMORY;
1936  }
1937 }
static MimeBody * mimebody_create(void)
Definition: mimeole.c:1892
REFIID LPVOID * ppv
Definition: atlbase.h:39
IMimeBody IMimeBody_iface
Definition: mimeole.c:158
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_DeleteExcept()

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

Definition at line 1273 of file mimeole.c.

1277 {
1278  MimeBody *This = impl_from_IMimeBody(iface);
1279  FIXME("(%p)->(%d, %p) stub\n", This, cNames, prgszName);
1280  return E_NOTIMPL;
1281 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_DeleteProp()

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

Definition at line 1224 of file mimeole.c.

1227 {
1228  MimeBody *This = impl_from_IMimeBody(iface);
1229  header_t *cursor;
1230  BOOL found;
1231 
1232  TRACE("(%p)->(%s) stub\n", This, debugstr_a(pszName));
1233 
1235  {
1236  if(ISPIDSTR(pszName))
1237  found = STRTOPID(pszName) == cursor->prop->id;
1238  else
1239  found = !lstrcmpiA(pszName, cursor->prop->name);
1240 
1241  if(found)
1242  {
1244  return S_OK;
1245  }
1246  }
1247 
1248  return MIME_E_NOT_FOUND;
1249 }
static void free_header(header_t *header)
Definition: mimeole.c:825
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
uint8_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59
const char cursor[]
Definition: icontest.c:13

◆ MimeBody_EmptyData()

static HRESULT WINAPI MimeBody_EmptyData ( IMimeBody iface)
static

Definition at line 1784 of file mimeole.c.

1786 {
1787  MimeBody *This = impl_from_IMimeBody(iface);
1788  FIXME("(%p)->() stub\n", This);
1789  return E_NOTIMPL;
1790 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_EnumProps()

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

Definition at line 1446 of file mimeole.c.

1450 {
1451  MimeBody *This = impl_from_IMimeBody(iface);
1452  FIXME("(%p)->(0x%x, %p) stub\n", This, dwFlags, ppEnum);
1453  return E_NOTIMPL;
1454 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_GetCharset()

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

Definition at line 1295 of file mimeole.c.

1298 {
1299  MimeBody *This = impl_from_IMimeBody(iface);
1300  FIXME("(%p)->(%p) stub\n", This, phCharset);
1301  *phCharset = NULL;
1302  return S_OK;
1303 }
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_GetClassID()

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

Definition at line 978 of file mimeole.c.

981 {
983 
984  TRACE("(%p)->(%p)\n", This, pClassID);
985 
986  if(!pClassID)
987  return E_INVALIDARG;
988 
989  *pClassID = IID_IMimeBody;
990  return S_OK;
991 }
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_GetCurrentEncoding()

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

Definition at line 1504 of file mimeole.c.

1507 {
1508  MimeBody *This = impl_from_IMimeBody(iface);
1509 
1510  TRACE("(%p)->(%p)\n", This, pietEncoding);
1511 
1512  *pietEncoding = This->encoding;
1513  return S_OK;
1514 }
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_GetData()

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

Definition at line 1713 of file mimeole.c.

1717 {
1718  MimeBody *This = impl_from_IMimeBody(iface);
1720  HRESULT hres;
1721 
1722  TRACE("(%p)->(%d %p)\n", This, ietEncoding, ppStream);
1723 
1724  if(This->encoding != ietEncoding) {
1725  switch(This->encoding) {
1726  case IET_BASE64:
1727  hres = decode_base64(This->data, ppStream);
1728  break;
1729  case IET_QP:
1730  hres = decode_qp(This->data, ppStream);
1731  break;
1732  default:
1733  FIXME("Decoding %d is not supported.\n", This->encoding);
1734  hres = S_FALSE;
1735  }
1736  if(ietEncoding != IET_BINARY)
1737  FIXME("Encoding %d is not supported.\n", ietEncoding);
1738  if(hres != S_FALSE)
1739  return hres;
1740  }
1741 
1742  start.QuadPart = 0;
1743  hres = get_stream_size(This->data, &size);
1744  if(SUCCEEDED(hres))
1745  hres = create_sub_stream(This->data, start, size, ppStream);
1746  return hres;
1747 }
static HRESULT decode_qp(IStream *input, IStream **ret_stream)
Definition: mimeole.c:1640
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_FALSE
Definition: winerror.h:2357
static HRESULT get_stream_size(IStream *stream, ULARGE_INTEGER *size)
Definition: mimeole.c:450
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static HRESULT create_sub_stream(IStream *stream, ULARGE_INTEGER start, ULARGE_INTEGER length, IStream **out)
Definition: mimeole.c:430
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
GLuint start
Definition: gl.h:1545
static HRESULT decode_base64(IStream *input, IStream **ret_stream)
Definition: mimeole.c:1560
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ MimeBody_GetDataHere()

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

Definition at line 1538 of file mimeole.c.

1542 {
1543  MimeBody *This = impl_from_IMimeBody(iface);
1544  FIXME("(%p)->(%d, %p) stub\n", This, ietEncoding, pStream);
1545  return E_NOTIMPL;
1546 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_GetDisplayName()

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

Definition at line 1482 of file mimeole.c.

1485 {
1486  MimeBody *This = impl_from_IMimeBody(iface);
1487  FIXME("(%p)->(%p) stub\n", This, ppszDisplay);
1488  return E_NOTIMPL;
1489 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_GetEstimatedSize()

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

Definition at line 1528 of file mimeole.c.

1532 {
1533  MimeBody *This = impl_from_IMimeBody(iface);
1534  FIXME("(%p)->(%d, %p) stub\n", This, ietEncoding, pcbSize);
1535  return E_NOTIMPL;
1536 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_GetHandle()

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

Definition at line 1820 of file mimeole.c.

1823 {
1824  MimeBody *This = impl_from_IMimeBody(iface);
1825  TRACE("(%p)->(%p)\n", iface, phBody);
1826 
1827  if(!phBody)
1828  return E_INVALIDARG;
1829 
1830  *phBody = This->handle;
1831  return This->handle ? S_OK : MIME_E_NO_DATA;
1832 }
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_GetOffsets()

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

Definition at line 1491 of file mimeole.c.

1494 {
1495  MimeBody *This = impl_from_IMimeBody(iface);
1496  TRACE("(%p)->(%p)\n", This, pOffsets);
1497 
1498  *pOffsets = This->body_offsets;
1499 
1500  if(This->body_offsets.cbBodyEnd == 0) return MIME_E_NO_DATA;
1501  return S_OK;
1502 }
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_GetOption()

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

Definition at line 1436 of file mimeole.c.

1440 {
1441  MimeBody *This = impl_from_IMimeBody(iface);
1442  FIXME("(%p)->(%08x, %p): stub\n", This, oid, pValue);
1443  return E_NOTIMPL;
1444 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_GetParameters()

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

Definition at line 1315 of file mimeole.c.

1320 {
1321  MimeBody *This = impl_from_IMimeBody(iface);
1322  HRESULT hr;
1323  header_t *header;
1324 
1325  TRACE("(%p)->(%s, %p, %p)\n", iface, debugstr_a(pszName), pcParams, pprgParam);
1326 
1327  *pprgParam = NULL;
1328  *pcParams = 0;
1329 
1330  hr = find_prop(This, pszName, &header);
1331  if(hr != S_OK) return hr;
1332 
1333  *pcParams = list_count(&header->params);
1334  if(*pcParams)
1335  {
1336  IMimeAllocator *alloc;
1337  param_t *param;
1338  MIMEPARAMINFO *info;
1339 
1341 
1342  *pprgParam = info = IMimeAllocator_Alloc(alloc, *pcParams * sizeof(**pprgParam));
1344  {
1345  int len;
1346 
1347  len = strlen(param->name) + 1;
1348  info->pszName = IMimeAllocator_Alloc(alloc, len);
1349  memcpy(info->pszName, param->name, len);
1350  len = strlen(param->value) + 1;
1351  info->pszData = IMimeAllocator_Alloc(alloc, len);
1352  memcpy(info->pszData, param->value, len);
1353  info++;
1354  }
1355  IMimeAllocator_Release(alloc);
1356  }
1357  return S_OK;
1358 }
HRESULT hr
Definition: shlfolder.c:183
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
uint8_t entry
Definition: isohybrid.c:63
struct _test_info info[]
Definition: SetCursorPos.c:19
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator **alloc)
Definition: mimeole.c:3530
LONG HRESULT
Definition: typedefs.h:77
GLfloat param
Definition: glext.h:5796
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:59
#define alloc
Definition: rosglue.h:13
static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop)
Definition: mimeole.c:865
struct CFHEADER header
Definition: fdi.c:109

◆ MimeBody_GetProp()

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

Definition at line 1086 of file mimeole.c.

1091 {
1092  MimeBody *This = impl_from_IMimeBody(iface);
1093  header_t *header;
1094  HRESULT hr;
1095 
1096  TRACE("(%p)->(%s, 0x%x, %p)\n", This, debugstr_a(pszName), dwFlags, pValue);
1097 
1098  if(!pszName || !pValue)
1099  return E_INVALIDARG;
1100 
1101  if(!ISPIDSTR(pszName) && !lstrcmpiA(pszName, "att:pri-content-type"))
1102  {
1103  PropVariantClear(pValue);
1104  pValue->vt = VT_LPSTR;
1105  pValue->u.pszVal = strdupA(This->content_pri_type);
1106  return S_OK;
1107  }
1108 
1109  hr = find_prop(This, pszName, &header);
1110  if(hr == S_OK)
1111  {
1112  TRACE("type %d->%d\n", header->value.vt, pValue->vt);
1113 
1114  hr = PropVariantChangeType(pValue, &header->value, 0, pValue->vt);
1115  if(FAILED(hr))
1116  FIXME("Conversion not currently supported (%d->%d)\n", header->value.vt, pValue->vt);
1117  }
1118 
1119  return hr;
1120 }
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2952
HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc, PROPVAR_CHANGE_FLAGS flags, VARTYPE vt)
Definition: propvar.c:361
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59
static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop)
Definition: mimeole.c:865
static LPSTR strdupA(LPCSTR str)
Definition: mimeole.c:482
struct CFHEADER header
Definition: fdi.c:109

◆ MimeBody_GetPropInfo()

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

Definition at line 1032 of file mimeole.c.

1036 {
1037  MimeBody *This = impl_from_IMimeBody(iface);
1038  header_t *header;
1039  HRESULT hr;
1040  DWORD supported = PIM_PROPID | PIM_VTDEFAULT;
1041 
1042  TRACE("(%p)->(%s, %p) semi-stub\n", This, debugstr_a(pszName), pInfo);
1043 
1044  if(!pszName || !pInfo)
1045  return E_INVALIDARG;
1046 
1047  TRACE("mask 0x%04x\n", pInfo->dwMask);
1048 
1049  if(pInfo->dwMask & ~supported)
1050  FIXME("Unsupported mask flags 0x%04x\n", pInfo->dwMask & ~supported);
1051 
1052  hr = find_prop(This, pszName, &header);
1053  if(hr == S_OK)
1054  {
1055  if(pInfo->dwMask & PIM_CHARSET)
1056  pInfo->hCharset = 0;
1057  if(pInfo->dwMask & PIM_FLAGS)
1058  pInfo->dwFlags = 0x00000000;
1059  if(pInfo->dwMask & PIM_ROWNUMBER)
1060  pInfo->dwRowNumber = 0;
1061  if(pInfo->dwMask & PIM_ENCODINGTYPE)
1062  pInfo->ietEncoding = 0;
1063  if(pInfo->dwMask & PIM_VALUES)
1064  pInfo->cValues = 0;
1065  if(pInfo->dwMask & PIM_PROPID)
1066  pInfo->dwPropId = header->prop->id;
1067  if(pInfo->dwMask & PIM_VTDEFAULT)
1068  pInfo->vtDefault = header->prop->default_vt;
1069  if(pInfo->dwMask & PIM_VTCURRENT)
1070  pInfo->vtCurrent = 0;
1071  }
1072 
1073  return hr;
1074 }
HRESULT hr
Definition: shlfolder.c:183
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59
static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop)
Definition: mimeole.c:865
struct CFHEADER header
Definition: fdi.c:109

◆ MimeBody_GetSizeMax()

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

Definition at line 1015 of file mimeole.c.

1018 {
1019  MimeBody *This = impl_from_IMimeBody(iface);
1020  FIXME("(%p)->(%p) stub\n", This, pcbSize);
1021  return E_NOTIMPL;
1022 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_GetTransmitInfo()

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

Definition at line 1801 of file mimeole.c.

1804 {
1805  MimeBody *This = impl_from_IMimeBody(iface);
1806  FIXME("(%p)->(%p) stub\n", This, pTransmitInfo);
1807  return E_NOTIMPL;
1808 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_InitNew()

static HRESULT WINAPI MimeBody_InitNew ( IMimeBody iface)
static

Definition at line 1024 of file mimeole.c.

1026 {
1027  MimeBody *This = impl_from_IMimeBody(iface);
1028  TRACE("(%p)->()\n", This);
1029  return S_OK;
1030 }
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_IsContentType()

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

Definition at line 1360 of file mimeole.c.

1364 {
1365  MimeBody *This = impl_from_IMimeBody(iface);
1366 
1367  TRACE("(%p)->(%s, %s)\n", This, debugstr_a(pszPriType), debugstr_a(pszSubType));
1368  if(pszPriType)
1369  {
1370  const char *pri = This->content_pri_type;
1371  if(!pri) pri = "text";
1372  if(lstrcmpiA(pri, pszPriType)) return S_FALSE;
1373  }
1374 
1375  if(pszSubType)
1376  {
1377  const char *sub = This->content_sub_type;
1378  if(!sub) sub = "plain";
1379  if(lstrcmpiA(sub, pszSubType)) return S_FALSE;
1380  }
1381 
1382  return S_OK;
1383 }
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_IsDirty()

static HRESULT WINAPI MimeBody_IsDirty ( IMimeBody iface)
static

Definition at line 993 of file mimeole.c.

995 {
997  FIXME("(%p)->() stub\n", This);
998  return E_NOTIMPL;
999 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_IsType()

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

Definition at line 1456 of file mimeole.c.

1459 {
1460  MimeBody *This = impl_from_IMimeBody(iface);
1461 
1462  TRACE("(%p)->(%d)\n", This, bodytype);
1463  switch(bodytype)
1464  {
1465  case IBT_EMPTY:
1466  return This->data ? S_FALSE : S_OK;
1467  default:
1468  FIXME("Unimplemented bodytype %d - returning S_OK\n", bodytype);
1469  }
1470  return S_OK;
1471 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_Load()

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

Definition at line 1001 of file mimeole.c.

1002 {
1003  MimeBody *This = impl_from_IMimeBody(iface);
1004  TRACE("(%p)->(%p)\n", This, pStm);
1005  return parse_headers(This, pStm);
1006 }
static HRESULT parse_headers(MimeBody *body, IStream *stm)
Definition: mimeole.c:783
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466

◆ MimeBody_MoveProps()

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

Definition at line 1262 of file mimeole.c.

1267 {
1268  MimeBody *This = impl_from_IMimeBody(iface);
1269  FIXME("(%p)->(%d, %p, %p) stub\n", This, cNames, prgszName, pPropertySet);
1270  return E_NOTIMPL;
1271 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_QueryInterface()

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

Definition at line 918 of file mimeole.c.

921 {
922  TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObject);
923 
924  *ppvObject = NULL;
925 
926  if (IsEqualIID(riid, &IID_IUnknown) ||
929  IsEqualIID(riid, &IID_IMimePropertySet) ||
930  IsEqualIID(riid, &IID_IMimeBody))
931  {
932  *ppvObject = iface;
933  }
934 
935  if(*ppvObject)
936  {
937  IUnknown_AddRef((IUnknown*)*ppvObject);
938  return S_OK;
939  }
940 
941  FIXME("no interface for %s\n", debugstr_guid(riid));
942  return E_NOINTERFACE;
943 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IPersistStreamInit
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ MimeBody_QueryProp()

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

Definition at line 1283 of file mimeole.c.

1289 {
1290  MimeBody *This = impl_from_IMimeBody(iface);
1291  FIXME("(%p)->(%s, %s, %d, %d) stub\n", This, debugstr_a(pszName), debugstr_a(pszCriteria), fSubString, fCaseSensitive);
1292  return E_NOTIMPL;
1293 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_Release()

static ULONG WINAPI MimeBody_Release ( IMimeBody iface)
static

Definition at line 955 of file mimeole.c.

956 {
959 
960  TRACE("(%p) ref=%d\n", This, ref);
961 
962  if (!ref)
963  {
964  empty_header_list(&This->headers);
965  empty_new_prop_list(&This->new_props);
966 
967  HeapFree(GetProcessHeap(), 0, This->content_pri_type);
968  HeapFree(GetProcessHeap(), 0, This->content_sub_type);
969 
970  release_data(&This->data_iid, This->data);
971 
973  }
974 
975  return ref;
976 }
static void release_data(REFIID riid, void *data)
Definition: mimeole.c:855
Definition: send.c:47
long LONG
Definition: pedump.c:60
static void empty_header_list(struct list *list)
Definition: mimeole.c:833
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
static void empty_new_prop_list(struct list *list)
Definition: mimeole.c:843
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define InterlockedDecrement
Definition: armddk.h:52
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by MimeMessage_IsBodyType().

◆ MimeBody_Save()

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

Definition at line 1008 of file mimeole.c.

1009 {
1010  MimeBody *This = impl_from_IMimeBody(iface);
1011  FIXME("(%p)->(%p, %d)\n", This, pStm, fClearDirty);
1012  return E_NOTIMPL;
1013 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_SaveToFile()

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

Definition at line 1810 of file mimeole.c.

1814 {
1815  MimeBody *This = impl_from_IMimeBody(iface);
1816  FIXME("(%p)->(%d, %s) stub\n", This, ietEncoding, debugstr_a(pszFilePath));
1817  return E_NOTIMPL;
1818 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_set_offsets()

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

Definition at line 1881 of file mimeole.c.

1882 {
1883  TRACE("setting offsets to %d, %d, %d, %d\n", offsets->cbBoundaryStart,
1884  offsets->cbHeaderStart, offsets->cbBodyStart, offsets->cbBodyEnd);
1885 
1886  body->body_offsets = *offsets;
1887  return S_OK;
1888 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100

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 1305 of file mimeole.c.

1309 {
1310  MimeBody *This = impl_from_IMimeBody(iface);
1311  FIXME("(%p)->(%p, %d) stub\n", This, hCharset, applytype);
1312  return E_NOTIMPL;
1313 }
#define FIXME(fmt,...)
Definition: debug.h:110
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_SetCurrentEncoding()

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

Definition at line 1516 of file mimeole.c.

1519 {
1520  MimeBody *This = impl_from_IMimeBody(iface);
1521 
1522  TRACE("(%p)->(%d)\n", This, ietEncoding);
1523 
1524  This->encoding = ietEncoding;
1525  return S_OK;
1526 }
#define TRACE(s)
Definition: solgame.cpp:4
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_SetData()

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

Definition at line 1749 of file mimeole.c.

1756 {
1757  MimeBody *This = impl_from_IMimeBody(iface);
1758  TRACE("(%p)->(%d, %s, %s, %s %p)\n", This, ietEncoding, debugstr_a(pszPriType), debugstr_a(pszSubType),
1759  debugstr_guid(riid), pvObject);
1760 
1761  if(IsEqualIID(riid, &IID_IStream))
1762  IStream_AddRef((IStream *)pvObject);
1763  else
1764  {
1765  FIXME("Unhandled object type %s\n", debugstr_guid(riid));
1766  return E_INVALIDARG;
1767  }
1768 
1769  if(This->data)
1770  release_data(&This->data_iid, This->data);
1771 
1772  This->data_iid = *riid;
1773  This->data = pvObject;
1774 
1775  IMimeBody_SetCurrentEncoding(iface, ietEncoding);
1776 
1777  /* FIXME: Update the content type.
1778  If pszPriType == NULL use 'application'
1779  If pszSubType == NULL use 'octet-stream' */
1780 
1781  return S_OK;
1782 }
static void release_data(REFIID riid, void *data)
Definition: mimeole.c:855
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ MimeBody_SetDisplayName()

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

Definition at line 1473 of file mimeole.c.

1476 {
1477  MimeBody *This = impl_from_IMimeBody(iface);
1478  FIXME("(%p)->(%s) stub\n", This, debugstr_a(pszDisplay));
1479  return E_NOTIMPL;
1480 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_SetOption()

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

Definition at line 1404 of file mimeole.c.

1408 {
1409  MimeBody *This = impl_from_IMimeBody(iface);
1410  HRESULT hr = E_NOTIMPL;
1411  TRACE("(%p)->(%08x, %p)\n", This, oid, pValue);
1412 
1413  if(pValue->vt != TYPEDID_TYPE(oid))
1414  {
1415  WARN("Called with vartype %04x and oid %08x\n", pValue->vt, oid);
1416  return E_INVALIDARG;
1417  }
1418 
1419  switch(oid)
1420  {
1421  case OID_SECURITY_HWND_OWNER:
1422  FIXME("OID_SECURITY_HWND_OWNER (value %08x): ignoring\n", pValue->u.ulVal);
1423  hr = S_OK;
1424  break;
1425  case OID_TRANSMIT_BODY_ENCODING:
1426  FIXME("OID_TRANSMIT_BODY_ENCODING (value %08x): ignoring\n", pValue->u.ulVal);
1427  hr = S_OK;
1428  break;
1429  default:
1430  FIXME("Unhandled oid %08x\n", oid);
1431  }
1432 
1433  return hr;
1434 }
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_SetProp()

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

Definition at line 1122 of file mimeole.c.

1127 {
1128  MimeBody *This = impl_from_IMimeBody(iface);
1129  header_t *header;
1130  HRESULT hr;
1131 
1132  TRACE("(%p)->(%s, 0x%x, %p)\n", This, debugstr_a(pszName), dwFlags, pValue);
1133 
1134  if(!pszName || !pValue)
1135  return E_INVALIDARG;
1136 
1137  hr = find_prop(This, pszName, &header);
1138  if(hr != S_OK)
1139  {
1140  property_list_entry_t *prop_entry;
1141  const property_t *prop = NULL;
1142 
1143  LIST_FOR_EACH_ENTRY(prop_entry, &This->new_props, property_list_entry_t, entry)
1144  {
1145  if(ISPIDSTR(pszName))
1146  {
1147  if(STRTOPID(pszName) == prop_entry->prop.id)
1148  {
1149  TRACE("Found match with already added new property id %d\n", prop_entry->prop.id);
1150  prop = &prop_entry->prop;
1151  break;
1152  }
1153  }
1154  else if(!lstrcmpiA(pszName, prop_entry->prop.name))
1155  {
1156  TRACE("Found match with already added new property id %d\n", prop_entry->prop.id);
1157  prop = &prop_entry->prop;
1158  break;
1159  }
1160  }
1161 
1162  header = HeapAlloc(GetProcessHeap(), 0, sizeof(*header));
1163  if(!header)
1164  return E_OUTOFMEMORY;
1165 
1166  if(!prop)
1167  {
1168  const property_t *prop_def = NULL;
1169  prop_entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*prop_entry));
1170  if(!prop_entry)
1171  {
1173  return E_OUTOFMEMORY;
1174  }
1175 
1176  prop_def = find_default_prop(pszName);
1177  if(prop_def)
1178  {
1179  prop_entry->prop.name = strdupA(prop_def->name);
1180  prop_entry->prop.id = prop_def->id;
1181  }
1182  else
1183  {
1184  if(ISPIDSTR(pszName))
1185  {
1186  HeapFree(GetProcessHeap(), 0, prop_entry);
1188  return MIME_E_NOT_FOUND;
1189  }
1190 
1191  prop_entry->prop.name = strdupA(pszName);
1192  prop_entry->prop.id = This->next_prop_id++;
1193  }
1194 
1195  prop_entry->prop.flags = 0;
1196  prop_entry->prop.default_vt = pValue->vt;
1197  list_add_tail(&This->new_props, &prop_entry->entry);
1198  prop = &prop_entry->prop;
1199  TRACE("Allocating new prop id %d\n", prop_entry->prop.id);
1200  }
1201 
1202  header->prop = prop;
1203  PropVariantInit(&header->value);
1204  list_init(&header->params);
1205  list_add_tail(&This->headers, &header->entry);
1206  }
1207 
1208  PropVariantCopy(&header->value, pValue);
1209 
1210  return S_OK;
1211 }
Definition: mimeole.c:56
static const property_t * find_default_prop(const char *name)
Definition: mimeole.c:891
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
HRESULT hr
Definition: shlfolder.c:183
uint8_t entry
Definition: isohybrid.c:63
LPCSTR name
Definition: mimeole.c:50
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
DWORD id
Definition: mimeole.c:51
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
struct list entry
Definition: mimeole.c:58
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
Definition: ole2.c:3068
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59
VARTYPE default_vt
Definition: mimeole.c:53
property_t prop
Definition: mimeole.c:59
DWORD flags
Definition: mimeole.c:52
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop)
Definition: mimeole.c:865
static LPSTR strdupA(LPCSTR str)
Definition: mimeole.c:482
#define HeapFree(x, y, z)
Definition: compat.h:394
struct CFHEADER header
Definition: fdi.c:109

◆ MimeBody_SetPropInfo()

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

Definition at line 1076 of file mimeole.c.

1080 {
1081  MimeBody *This = impl_from_IMimeBody(iface);
1082  FIXME("(%p)->(%s, %p) stub\n", This, debugstr_a(pszName), pInfo);
1083  return E_NOTIMPL;
1084 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeGetAddressFormatW()

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

Definition at line 3661 of file mimeole.c.

3663 {
3664  FIXME("(%s, %p, %d, %d, %p) stub\n", debugstr_guid(riid), object, addr_type, addr_format, address);
3665 
3666  return E_NOTIMPL;
3667 }
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
GLuint address
Definition: glext.h:9393
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_AddRef()

static ULONG WINAPI MimeMessage_AddRef ( IMimeMessage iface)
static

Definition at line 1984 of file mimeole.c.

1985 {
1988 
1989  TRACE("(%p) ref=%d\n", This, ref);
1990 
1991  return ref;
1992 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1959
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ MimeMessage_AttachFile()

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

Definition at line 2900 of file mimeole.c.

2905 {
2906  FIXME("(%p)->(%s, %p, %p)\n", iface, pszFilePath, pstmFile, phBody);
2907  return E_NOTIMPL;
2908 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_AttachObject()

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

Definition at line 2890 of file mimeole.c.

2895 {
2896  FIXME("(%p)->(%s, %p, %p)\n", iface, debugstr_guid(riid), pvObject, phBody);
2897  return E_NOTIMPL;
2898 }
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 2910 of file mimeole.c.

2918 {
2919  FIXME("(%p)->(%s, %s, 0x%x, %p, %p, %p)\n", iface, pszBase, pszURL, dwFlags, pstmURL, ppszCIDURL, phBody);
2920  return E_NOTIMPL;
2921 }
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_BindToObject()

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

Definition at line 2354 of file mimeole.c.

2356 {
2358  HRESULT hr;
2359  body_t *body;
2360 
2361  TRACE("(%p)->(%p, %s, %p)\n", iface, hBody, debugstr_guid(riid), ppvObject);
2362 
2363  hr = find_body(&This->body_tree, hBody, &body);
2364 
2365  if(hr != S_OK) return hr;
2366 
2367  if(IsEqualIID(riid, &IID_IMimeBody))
2368  {
2369  IMimeBody_AddRef(&body->mime_body->IMimeBody_iface);
2370  *ppvObject = &body->mime_body->IMimeBody_iface;
2371  return S_OK;
2372  }
2373 
2374  return E_NOINTERFACE;
2375 }
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT find_body(struct list *list, HBODY hbody, body_t **body)
Definition: mimeole.c:2330
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1959
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ MimeMessage_Commit()

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

Definition at line 2314 of file mimeole.c.

2317 {
2318  FIXME("(%p)->(0x%x)\n", iface, dwFlags);
2319  return S_OK;
2320 }
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59

◆ MimeMessage_CountBodies()

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

Definition at line 2515 of file mimeole.c.

2517 {
2518  HRESULT hr;
2520  body_t *body;
2521 
2522  TRACE("(%p)->(%p, %s, %p)\n", iface, hParent, fRecurse ? "TRUE" : "FALSE", pcBodies);
2523 
2524  hr = find_body(&This->body_tree, hParent, &body);
2525  if(hr != S_OK) return hr;
2526 
2527  *pcBodies = 1;
2528  count_children(body, fRecurse, pcBodies);
2529 
2530  return S_OK;
2531 }
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT find_body(struct list *list, HBODY hbody, body_t **body)
Definition: mimeole.c:2330
const DOCKBAR PVOID HWND hParent
Definition: tooldock.h:22
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1959
static void count_children(body_t *body, boolean recurse, ULONG *count)
Definition: mimeole.c:2504
#define S_OK
Definition: intsafe.h:59
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100

◆ MimeMessage_create()

HRESULT MimeMessage_create ( IUnknown outer,
void **  obj 
)

Definition at line 3085 of file mimeole.c.

3086 {
3087  MimeMessage *This;
3088  MimeBody *mime_body;
3089  body_t *root_body;
3090 
3091  TRACE("(%p, %p)\n", outer, obj);
3092 
3093  if (outer)
3094  {
3095  FIXME("outer unknown not supported yet\n");
3096  return E_NOTIMPL;
3097  }
3098 
3099  *obj = NULL;
3100 
3101  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
3102  if (!This) return E_OUTOFMEMORY;
3103 
3104  This->IMimeMessage_iface.lpVtbl = &MimeMessageVtbl;
3105  This->ref = 1;
3106  This->stream = NULL;
3107  list_init(&This->body_tree);
3108  This->next_index = 1;
3109 
3110  mime_body = mimebody_create();
3111  root_body = new_body_entry(mime_body, This->next_index++, NULL);
3112  list_add_head(&This->body_tree, &root_body->entry);
3113 
3114  *obj = &This->IMimeMessage_iface;
3115  return S_OK;
3116 }
static MimeBody * mimebody_create(void)
Definition: mimeole.c:1892
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
static const IMimeMessageVtbl MimeMessageVtbl
Definition: mimeole.c:3025
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
struct list entry
Definition: mimeole.c:1941
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
static body_t * new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent)
Definition: mimeole.c:2041

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 2780 of file mimeole.c.

2786 {
2787  FIXME("(%p)->(%p, %p, %p, %p)\n", iface, pRootStm, pOptions, pCallback, ppMoniker);
2788  *ppMoniker = NULL;
2789  return E_NOTIMPL;
2790 }
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_DeleteBody()

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

Definition at line 2486 of file mimeole.c.

2490 {
2491  FIXME("(%p)->(%p, %08x)\n", iface, hBody, dwFlags);
2492  return E_NOTIMPL;
2493 }
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_DeleteBodyProp()

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

Definition at line 2716 of file mimeole.c.

2720 {
2721  FIXME("(%p)->(%p, %s)\n", iface, hBody, pszName);
2722  return E_NOTIMPL;
2723 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_DeleteProp()

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

Definition at line 2812 of file mimeole.c.

2815 {
2816  FIXME("(%p)->(%s)\n", iface, pszName);
2817  return E_NOTIMPL;
2818 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_EnumAddressTypes()

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

Definition at line 2998 of file mimeole.c.

3003 {
3004  FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, dwProps, ppEnum);
3005  return E_NOTIMPL;
3006 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_FindFirst()

static HRESULT WINAPI MimeMessage_FindFirst ( IMimeMessage iface,
FINDBODY *  pFindBody,