ReactOS  0.4.12-dev-90-g2e2e63e
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 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 1886 of file mimeole.c.

Referenced by mimebody_create().

◆ 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.

Referenced by copy_headers_to_buf(), and create_body_offset_list().

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.

Referenced by split_params().

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 }
struct list entry
Definition: mimeole.c:143
#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)
struct list params
Definition: mimeole.c:153
GLfloat param
Definition: glext.h:5796
char * name
Definition: mimeole.c:144
HKEY key
Definition: reg.c:42
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLsizei const GLfloat * value
Definition: glext.h:6069
char * value
Definition: mimeole.c:145
char * strchr(const char *String, int ch)
Definition: utclib.c:501
POINT cp
Definition: magnifier.c:60
GLfloat GLfloat p
Definition: glext.h:8902
static char * unquote_string(const char *str)
Definition: mimeole.c:636
Definition: path.c:42
GLuint const GLchar * name
Definition: glext.h:6031

◆ copy_headers_to_buf()

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

Definition at line 499 of file mimeole.c.

Referenced by parse_headers().

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
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
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
int64_t LONGLONG
Definition: typedefs.h:66
unsigned int BOOL
Definition: ntddk_ex.h:94
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)
LONGLONG QuadPart
Definition: typedefs.h:112
off
Definition: i386-dis.c:3909

◆ count_children()

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

Definition at line 2500 of file mimeole.c.

Referenced by MimeMessage_CountBodies().

2501 {
2502  body_t *child;
2503 
2504  LIST_FOR_EACH_ENTRY(child, &body->children, body_t, entry)
2505  {
2506  (*count)++;
2507  if(recurse) count_children(child, recurse, count);
2508  }
2509 }
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:2500
struct list children
Definition: mimeole.c:1942

◆ create_body_offset_list()

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

Definition at line 2058 of file mimeole.c.

Referenced by create_sub_body().

2059 {
2060  HRESULT hr;
2061  DWORD read, boundary_start;
2062  int boundary_len = strlen(boundary);
2063  char *buf, *ptr, *overlap;
2064  DWORD start = 0, overlap_no;
2065  offset_entry_t *cur_body = NULL;
2066  BOOL is_first_line = TRUE;
2067  ULARGE_INTEGER cur;
2069 
2070  list_init(body_offsets);
2071 
2072  overlap_no = boundary_len + 5;
2073 
2074  overlap = buf = HeapAlloc(GetProcessHeap(), 0, overlap_no + PARSER_BUF_SIZE + 1);
2075 
2076  zero.QuadPart = 0;
2077  hr = IStream_Seek(stm, zero, STREAM_SEEK_CUR, &cur);
2078  start = cur.u.LowPart;
2079 
2080  do {
2081  hr = IStream_Read(stm, overlap, PARSER_BUF_SIZE, &read);
2082  if(FAILED(hr)) goto end;
2083  if(read == 0) break;
2084  overlap[read] = '\0';
2085 
2086  ptr = buf;
2087  while(1) {
2088  if(is_first_line) {
2089  is_first_line = FALSE;
2090  }else {
2091  ptr = strstr(ptr, "\r\n");
2092  if(!ptr)
2093  break;
2094  ptr += 2;
2095  }
2096 
2097  boundary_start = start + ptr - buf;
2098 
2099  if(*ptr == '-' && *(ptr + 1) == '-' && !memcmp(ptr + 2, boundary, boundary_len)) {
2100  ptr += boundary_len + 2;
2101 
2102  if(*ptr == '\r' && *(ptr + 1) == '\n')
2103  {
2104  ptr += 2;
2105  if(cur_body)
2106  {
2107  cur_body->offsets.cbBodyEnd = boundary_start - 2;
2108  list_add_tail(body_offsets, &cur_body->entry);
2109  }
2110  cur_body = HeapAlloc(GetProcessHeap(), 0, sizeof(*cur_body));
2111  cur_body->offsets.cbBoundaryStart = boundary_start;
2112  cur_body->offsets.cbHeaderStart = start + ptr - buf;
2113  }
2114  else if(*ptr == '-' && *(ptr + 1) == '-')
2115  {
2116  if(cur_body)
2117  {
2118  cur_body->offsets.cbBodyEnd = boundary_start - 2;
2119  list_add_tail(body_offsets, &cur_body->entry);
2120  goto end;
2121  }
2122  }
2123  }
2124  }
2125 
2126  if(overlap == buf) /* 1st iteration */
2127  {
2128  memmove(buf, buf + PARSER_BUF_SIZE - overlap_no, overlap_no);
2129  overlap = buf + overlap_no;
2130  start += read - overlap_no;
2131  }
2132  else
2133  {
2134  memmove(buf, buf + PARSER_BUF_SIZE, overlap_no);
2135  start += read;
2136  }
2137  } while(1);
2138 
2139 end:
2140  HeapFree(GetProcessHeap(), 0, buf);
2141  return hr;
2142 }
#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
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
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
Definition: mimeole.c:2052
struct _ULARGE_INTEGER::@3737 u
unsigned int BOOL
Definition: ntddk_ex.h:94
#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:2054
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)
LONGLONG QuadPart
Definition: typedefs.h:112
BODYOFFSETS offsets
Definition: mimeole.c:2055

◆ create_sub_body()

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

Definition at line 2144 of file mimeole.c.

Referenced by MimeMessage_Load().

2145 {
2147  MimeBody *mime_body;
2148  HRESULT hr;
2149  body_t *body;
2151 
2152  pos.QuadPart = offset->cbHeaderStart;
2153  IStream_Seek(pStm, pos, STREAM_SEEK_SET, NULL);
2154 
2155  mime_body = mimebody_create();
2156  IMimeBody_Load(&mime_body->IMimeBody_iface, pStm);
2157 
2158  pos.QuadPart = 0;
2159  hr = IStream_Seek(pStm, pos, STREAM_SEEK_CUR, &start);
2160  offset->cbBodyStart = start.QuadPart;
2161  if (parent) MimeBody_set_offsets(mime_body, offset);
2162 
2163  length.QuadPart = offset->cbBodyEnd - offset->cbBodyStart;
2164  create_sub_stream(pStm, start, length, (IStream**)&mime_body->data);
2165  mime_body->data_iid = IID_IStream;
2166 
2167  body = new_body_entry(mime_body, msg->next_index++, parent);
2168 
2169  if(IMimeBody_IsContentType(&mime_body->IMimeBody_iface, "multipart", NULL) == S_OK)
2170  {
2171  MIMEPARAMINFO *param_info;
2172  ULONG count, i;
2173  IMimeAllocator *alloc;
2174 
2175  hr = IMimeBody_GetParameters(&mime_body->IMimeBody_iface, "Content-Type", &count,
2176  &param_info);
2177  if(hr != S_OK || count == 0) return body;
2178 
2179  MimeOleGetAllocator(&alloc);
2180 
2181  for(i = 0; i < count; i++)
2182  {
2183  if(!lstrcmpiA(param_info[i].pszName, "boundary"))
2184  {
2185  struct list offset_list;
2186  offset_entry_t *cur, *cursor2;
2187  hr = create_body_offset_list(pStm, param_info[i].pszData, &offset_list);
2188  LIST_FOR_EACH_ENTRY_SAFE(cur, cursor2, &offset_list, offset_entry_t, entry)
2189  {
2190  body_t *sub_body;
2191 
2192  sub_body = create_sub_body(msg, pStm, &cur->offsets, body);
2193  list_add_tail(&body->children, &sub_body->entry);
2194  list_remove(&cur->entry);
2195  HeapFree(GetProcessHeap(), 0, cur);
2196  }
2197  break;
2198  }
2199  }
2200  IMimeAllocator_FreeParamInfoArray(alloc, count, param_info, TRUE);
2201  IMimeAllocator_Release(alloc);
2202  }
2203  return body;
2204 }
#define TRUE
Definition: types.h:120
static MimeBody * mimebody_create(void)
Definition: mimeole.c:1888
static HRESULT MimeBody_set_offsets(MimeBody *body, const BODYOFFSETS *offsets)
Definition: mimeole.c:1877
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
GLuint GLuint GLsizei count
Definition: gl.h:1545
uint8_t entry
Definition: isohybrid.c:63
GLintptr offset
Definition: glext.h:5920
DWORD next_index
Definition: mimeole.c:1952
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:2058
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
GLenum GLclampf GLint i
Definition: glfuncs.h:14
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
smooth NULL
Definition: ftsmooth.c:416
Definition: mimeole.c:2052
struct list entry
Definition: mimeole.c:1937
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator **alloc)
Definition: mimeole.c:3526
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:2144
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
struct list children
Definition: mimeole.c:1942
#define alloc
Definition: rosglue.h:13
static body_t * new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent)
Definition: mimeole.c:2037
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
LONGLONG QuadPart
Definition: typedefs.h:112

◆ 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.

Referenced by create_sub_body(), and MimeBody_GetData().

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
ULARGE_INTEGER pos
Definition: mimeole.c:179
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
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
ULARGE_INTEGER length
Definition: mimeole.c:179
IStream * base
Definition: mimeole.c:178
IStream IStream_iface
Definition: mimeole.c:176
GLuint GLuint stream
Definition: glext.h:7522
LONG ref
Definition: mimeole.c:177
#define S_OK
Definition: intsafe.h:59
GLuint start
Definition: gl.h:1545
ULARGE_INTEGER start
Definition: mimeole.c:179

◆ decode_base64()

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

Definition at line 1556 of file mimeole.c.

Referenced by MimeBody_GetData().

1557 {
1558  const unsigned char *ptr, *end;
1559  unsigned char buf[1024];
1561  unsigned char *ret;
1562  unsigned char in[4];
1563  IStream *output;
1564  DWORD size;
1565  int n = 0;
1566  HRESULT hres;
1567 
1568  pos.QuadPart = 0;
1569  hres = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL);
1570  if(FAILED(hres))
1571  return hres;
1572 
1573  hres = CreateStreamOnHGlobal(NULL, TRUE, &output);
1574  if(FAILED(hres))
1575  return hres;
1576 
1577  while(1) {
1578  hres = IStream_Read(input, buf, sizeof(buf), &size);
1579  if(FAILED(hres) || !size)
1580  break;
1581 
1582  ptr = ret = buf;
1583  end = buf + size;
1584 
1585  while(1) {
1586  /* skip invalid chars */
1587  while(ptr < end && (*ptr >= ARRAY_SIZE(base64_decode_table)
1588  || base64_decode_table[*ptr] == -1))
1589  ptr++;
1590  if(ptr == end)
1591  break;
1592 
1593  in[n++] = base64_decode_table[*ptr++];
1594  switch(n) {
1595  case 2:
1596  *ret++ = in[0] << 2 | in[1] >> 4;
1597  continue;
1598  case 3:
1599  *ret++ = in[1] << 4 | in[2] >> 2;
1600  continue;
1601  case 4:
1602  *ret++ = ((in[2] << 6) & 0xc0) | in[3];
1603  n = 0;
1604  }
1605  }
1606 
1607  if(ret > buf) {
1608  hres = IStream_Write(output, buf, ret - buf, NULL);
1609  if(FAILED(hres))
1610  break;
1611  }
1612  }
1613 
1614  if(SUCCEEDED(hres))
1615  hres = IStream_Seek(output, pos, STREAM_SEEK_SET, NULL);
1616  if(FAILED(hres)) {
1617  IStream_Release(output);
1618  return hres;
1619  }
1620 
1621  *ret_stream = output;
1622  return S_OK;
1623 }
#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
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
GLuint GLuint end
Definition: gl.h:1545
GLuint n
Definition: s_context.h:57
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
GLfloat CONST GLvector4f * in
Definition: m_xform.h:122
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
static const signed char base64_decode_table[]
Definition: mimeole.c:1544
#define SUCCEEDED(hr)
Definition: intsafe.h:57
LONGLONG QuadPart
Definition: typedefs.h:112

◆ decode_qp()

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

Definition at line 1636 of file mimeole.c.

Referenced by MimeBody_GetData().

1637 {
1638  const unsigned char *ptr, *end;
1639  unsigned char *ret, prev = 0;
1640  unsigned char buf[1024];
1642  IStream *output;
1643  DWORD size;
1644  int n = -1;
1645  HRESULT hres;
1646 
1647  pos.QuadPart = 0;
1648  hres = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL);
1649  if(FAILED(hres))
1650  return hres;
1651 
1652  hres = CreateStreamOnHGlobal(NULL, TRUE, &output);
1653  if(FAILED(hres))
1654  return hres;
1655 
1656  while(1) {
1657  hres = IStream_Read(input, buf, sizeof(buf), &size);
1658  if(FAILED(hres) || !size)
1659  break;
1660 
1661  ptr = ret = buf;
1662  end = buf + size;
1663 
1664  while(ptr < end) {
1665  unsigned char byte = *ptr++;
1666 
1667  switch(n) {
1668  case -1:
1669  if(byte == '=')
1670  n = 0;
1671  else
1672  *ret++ = byte;
1673  continue;
1674  case 0:
1675  prev = byte;
1676  n = 1;
1677  continue;
1678  case 1:
1679  if(prev != '\r' || byte != '\n') {
1680  int h1 = hex_digit(prev), h2 = hex_digit(byte);
1681  if(h1 != -1 && h2 != -1)
1682  *ret++ = (h1 << 4) | h2;
1683  else
1684  *ret++ = '=';
1685  }
1686  n = -1;
1687  continue;
1688  }
1689  }
1690 
1691  if(ret > buf) {
1692  hres = IStream_Write(output, buf, ret - buf, NULL);
1693  if(FAILED(hres))
1694  break;
1695  }
1696  }
1697 
1698  if(SUCCEEDED(hres))
1699  hres = IStream_Seek(output, pos, STREAM_SEEK_SET, NULL);
1700  if(FAILED(hres)) {
1701  IStream_Release(output);
1702  return hres;
1703  }
1704 
1705  *ret_stream = output;
1706  return S_OK;
1707 }
unsigned char byte
Definition: rpcndr.h:116
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
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
static int hex_digit(char c)
Definition: mimeole.c:1625
GLuint GLuint end
Definition: gl.h:1545
GLuint n
Definition: s_context.h:57
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
#define byte(x, n)
Definition: tomcrypt.h:118
#define SUCCEEDED(hr)
Definition: intsafe.h:57
LONGLONG QuadPart
Definition: typedefs.h:112

◆ empty_body_list()

static void empty_body_list ( struct list list)
static

Definition at line 1990 of file mimeole.c.

Referenced by MimeMessage_Load(), and MimeMessage_Release().

1991 {
1992  body_t *body, *cursor2;
1993  LIST_FOR_EACH_ENTRY_SAFE(body, cursor2, list, body_t, entry)
1994  {
1995  empty_body_list(&body->children);
1996  list_remove(&body->entry);
1997  IMimeBody_Release(&body->mime_body->IMimeBody_iface);
1998  HeapFree(GetProcessHeap(), 0, body);
1999  }
2000 }
MimeBody * mime_body
Definition: mimeole.c:1939
uint8_t entry
Definition: isohybrid.c:63
IMimeBody IMimeBody_iface
Definition: mimeole.c:158
struct list entry
Definition: mimeole.c:1937
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
#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
struct list children
Definition: mimeole.c:1942
static void empty_body_list(struct list *list)
Definition: mimeole.c:1990
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ empty_header_list()

static void empty_header_list ( struct list list)
static

Definition at line 825 of file mimeole.c.

Referenced by MimeBody_Release().

826 {
827  header_t *header, *cursor2;
828 
829  LIST_FOR_EACH_ENTRY_SAFE(header, cursor2, list, header_t, entry)
830  {
831  list_remove(&header->entry);
832  PropVariantClear(&header->value);
833  empty_param_list(&header->params);
834  HeapFree(GetProcessHeap(), 0, header);
835  }
836 }
static void empty_param_list(struct list *list)
Definition: mimeole.c:812
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2809
uint8_t entry
Definition: isohybrid.c:63
PROPVARIANT value
Definition: mimeole.c:152
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:395
struct list params
Definition: mimeole.c:153
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
struct list entry
Definition: mimeole.c:150
#define HeapFree(x, y, z)
Definition: compat.h:394
struct CFHEADER header
Definition: fdi.c:109

◆ empty_new_prop_list()

static void empty_new_prop_list ( struct list list)
static

Definition at line 838 of file mimeole.c.

Referenced by MimeBody_Release().

839 {
840  property_list_entry_t *prop, *cursor2;
841 
843  {
844  list_remove(&prop->entry);
845  HeapFree(GetProcessHeap(), 0, (char *)prop->prop.name);
846  HeapFree(GetProcessHeap(), 0, prop);
847  }
848 }
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
#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

◆ empty_param_list()

static void empty_param_list ( struct list list)
static

Definition at line 812 of file mimeole.c.

Referenced by empty_header_list().

813 {
814  param_t *param, *cursor2;
815 
816  LIST_FOR_EACH_ENTRY_SAFE(param, cursor2, list, param_t, entry)
817  {
818  list_remove(&param->entry);
819  HeapFree(GetProcessHeap(), 0, param->name);
820  HeapFree(GetProcessHeap(), 0, param->value);
821  HeapFree(GetProcessHeap(), 0, param);
822  }
823 }
struct list entry
Definition: mimeole.c:143
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
GLfloat param
Definition: glext.h:5796
char * name
Definition: mimeole.c:144
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
char * value
Definition: mimeole.c:145
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ find_body()

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

Definition at line 2326 of file mimeole.c.

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

2327 {
2328  body_t *cur;
2329  HRESULT hr;
2330 
2331  if(hbody == HBODY_ROOT)
2332  {
2333  *body = LIST_ENTRY(list_head(list), body_t, entry);
2334  return S_OK;
2335  }
2336 
2337  LIST_FOR_EACH_ENTRY(cur, list, body_t, entry)
2338  {
2339  if(cur->index == HandleToUlong(hbody))
2340  {
2341  *body = cur;
2342  return S_OK;
2343  }
2344  hr = find_body(&cur->children, hbody, body);
2345  if(hr == S_OK) return S_OK;
2346  }
2347  return S_FALSE;
2348 }
uint8_t entry
Definition: isohybrid.c:63
#define HandleToUlong(h)
Definition: basetsd.h:79
DWORD index
Definition: mimeole.c:1938
__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:2326
#define S_OK
Definition: intsafe.h:59
struct list children
Definition: mimeole.c:1942
#define LIST_ENTRY(type)
Definition: queue.h:175

◆ find_default_prop()

static const property_t* find_default_prop ( const char name)
static

Definition at line 886 of file mimeole.c.

Referenced by MimeBody_SetProp().

887 {
888  const property_t *prop_def = NULL;
889 
890  for(prop_def = default_props; prop_def->name; prop_def++)
891  {
892  if(ISPIDSTR(name))
893  {
894  if(STRTOPID(name) == prop_def->id)
895  {
896  break;
897  }
898  }
899  else if(!lstrcmpiA(name, prop_def->name))
900  {
901  break;
902  }
903  }
904 
905  if(prop_def->id)
906  TRACE("%s: found match with default property id %d\n", prop_def->name, prop_def->id);
907  else
908  prop_def = NULL;
909 
910  return prop_def;
911 }
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

◆ find_next()

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

Definition at line 2529 of file mimeole.c.

Referenced by MimeMessage_FindFirst(), and MimeMessage_FindNext().

2530 {
2531  struct list *ptr;
2532  HBODY next;
2533 
2534  for (;;)
2535  {
2536  if (!body) ptr = list_head( &This->body_tree );
2537  else
2538  {
2539  ptr = list_head( &body->children );
2540  while (!ptr)
2541  {
2542  if (!body->parent) return MIME_E_NOT_FOUND;
2543  if (!(ptr = list_next( &body->parent->children, &body->entry ))) body = body->parent;
2544  }
2545  }
2546 
2547  body = LIST_ENTRY( ptr, body_t, entry );
2548  next = UlongToHandle( body->index );
2549  find->dwReserved = body->index;
2550  if (IMimeBody_IsContentType(&body->mime_body->IMimeBody_iface, find->pszPriType,
2551  find->pszSubType) == S_OK)
2552  {
2553  *out = next;
2554  return S_OK;
2555  }
2556  }
2557  return MIME_E_NOT_FOUND;
2558 }
MimeBody * mime_body
Definition: mimeole.c:1939
uint8_t entry
Definition: isohybrid.c:63
DWORD index
Definition: mimeole.c:1938
IMimeBody IMimeBody_iface
Definition: mimeole.c:158
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
static PVOID ptr
Definition: dispmode.c:27
struct body_t * parent
Definition: mimeole.c:1941
struct list entry
Definition: mimeole.c:1937
#define UlongToHandle(ul)
Definition: basetsd.h:97
static FILE * out
Definition: regtests2xml.c:44
Definition: _list.h:228
struct list body_tree
Definition: mimeole.c:1951
#define S_OK
Definition: intsafe.h:59
static unsigned __int64 next
Definition: rand_nt.c:6
struct list children
Definition: mimeole.c:1942
static TAGID TAGID find
Definition: db.cpp:143
__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

◆ find_prop()

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

Definition at line 860 of file mimeole.c.

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

861 {
862  header_t *header;
863 
864  *prop = NULL;
865 
866  LIST_FOR_EACH_ENTRY(header, &body->headers, header_t, entry)
867  {
868  if(ISPIDSTR(name))
869  {
870  if(STRTOPID(name) == header->prop->id)
871  {
872  *prop = header;
873  return S_OK;
874  }
875  }
876  else if(!lstrcmpiA(name, header->prop->name))
877  {
878  *prop = header;
879  return S_OK;
880  }
881  }
882 
883  return MIME_E_NOT_FOUND;
884 }
struct list headers
Definition: mimeole.c:163
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
const property_t * prop
Definition: mimeole.c:151
uint8_t entry
Definition: isohybrid.c:63
LPCSTR name
Definition: mimeole.c:50
DWORD id
Definition: mimeole.c:51
#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
Definition: name.c:36
struct CFHEADER header
Definition: fdi.c:109

◆ get_body()

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

Definition at line 2383 of file mimeole.c.

Referenced by MimeMessage_GetBody().

2384 {
2386  body_t *body;
2387  HRESULT hr;
2388  struct list *list;
2389 
2390  if(location == IBL_ROOT)
2391  {
2392  *out = root;
2393  return S_OK;
2394  }
2395 
2396  hr = find_body(&msg->body_tree, pivot, &body);
2397 
2398  if(hr == S_OK)
2399  {
2400  switch(location)
2401  {
2402  case IBL_PARENT:
2403  if(body->parent)
2404  *out = body->parent;
2405  else
2406  hr = MIME_E_NOT_FOUND;
2407  break;
2408 
2409  case IBL_FIRST:
2410  list = list_head(&body->children);
2411  if(list)
2412  *out = LIST_ENTRY(list, body_t, entry);
2413  else
2414  hr = MIME_E_NOT_FOUND;
2415  break;
2416 
2417  case IBL_LAST:
2418  list = list_tail(&body->children);
2419  if(list)
2420  *out = LIST_ENTRY(list, body_t, entry);
2421  else
2422  hr = MIME_E_NOT_FOUND;
2423  break;
2424 
2425  case IBL_NEXT:
2426  list = list_next(&body->parent->children, &body->entry);
2427  if(list)
2428  *out = LIST_ENTRY(list, body_t, entry);
2429  else
2430  hr = MIME_E_NOT_FOUND;
2431  break;
2432 
2433  case IBL_PREVIOUS:
2434  list = list_prev(&body->parent->children, &body->entry);
2435  if(list)
2436  *out = LIST_ENTRY(list, body_t, entry);
2437  else
2438  hr = MIME_E_NOT_FOUND;
2439  break;
2440 
2441  default:
2442  hr = E_FAIL;
2443  break;
2444  }
2445  }
2446 
2447  return hr;
2448 }
__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
struct body_t * parent
Definition: mimeole.c:1941
struct list entry
Definition: mimeole.c:1937
LONG HRESULT
Definition: typedefs.h:77
static HRESULT find_body(struct list *list, HBODY hbody, body_t **body)
Definition: mimeole.c:2326
Definition: _list.h:228
struct list body_tree
Definition: mimeole.c:1951
#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:1942
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
#define list
Definition: rosglue.h:35
#define LIST_ENTRY(type)
Definition: queue.h:175

◆ get_stream_size()

static HRESULT get_stream_size ( IStream stream,
ULARGE_INTEGER size 
)
static

Definition at line 450 of file mimeole.c.

Referenced by MimeBody_GetData().

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
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static double zero
Definition: j0_y0.c:96
#define S_OK
Definition: intsafe.h:59
#define SUCCEEDED(hr)
Definition: intsafe.h:57
LONGLONG QuadPart
Definition: typedefs.h:112

◆ hex_digit()

static int hex_digit ( char  c)
static

Definition at line 1625 of file mimeole.c.

Referenced by decode_qp().

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

◆ impl_from_IMimeBody()

◆ impl_from_IMimeMessage()

static MimeMessage* impl_from_IMimeMessage ( IMimeMessage iface)
inlinestatic

Definition at line 1955 of file mimeole.c.

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

1956 {
1957  return CONTAINING_RECORD(iface, MimeMessage, IMimeMessage_iface);
1958 }
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

◆ impl_from_IMimePropertySchema()

static propschema* impl_from_IMimePropertySchema ( IMimePropertySchema *  iface)
inlinestatic

Definition at line 477 of file mimeole.c.

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

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

◆ impl_from_IMimeSecurity()

static MimeSecurity* impl_from_IMimeSecurity ( IMimeSecurity iface)
inlinestatic

Definition at line 3150 of file mimeole.c.

Referenced by MimeSecurity_AddRef(), and MimeSecurity_Release().

3151 {
3152  return CONTAINING_RECORD(iface, MimeSecurity, IMimeSecurity_iface);
3153 }
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

◆ impl_from_IStream()

static sub_stream_t* impl_from_IStream ( IStream iface)
inlinestatic

Definition at line 182 of file mimeole.c.

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().

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

◆ init_content_encoding()

static void init_content_encoding ( MimeBody body,
header_t header 
)
static

Definition at line 767 of file mimeole.c.

Referenced by parse_headers().

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
PROPVARIANT value
Definition: mimeole.c:152
#define debugstr_a
Definition: kernel32.h:31
ed encoding
Definition: write.c:2847
ENCODINGTYPE encoding
Definition: mimeole.c:168

◆ init_content_type()

static void init_content_type ( MimeBody body,
header_t header 
)
static

Definition at line 749 of file mimeole.c.

Referenced by parse_headers().

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
char * content_pri_type
Definition: mimeole.c:166
PROPVARIANT value
Definition: mimeole.c:152
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
char * content_sub_type
Definition: mimeole.c:167
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
char * strchr(const char *String, int ch)
Definition: utclib.c:501
static LPSTR strdupA(LPCSTR str)
Definition: mimeole.c:482

◆ mime_obj_AddRef()

static ULONG WINAPI mime_obj_AddRef ( IUnknown iface)
static

Definition at line 3672 of file mimeole.c.

3673 {
3674  TRACE("\n");
3675  return 2;
3676 }
#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 3665 of file mimeole.c.

3666 {
3667  FIXME("(%s %p)\n", debugstr_guid(riid), ppv);
3668  *ppv = NULL;
3669  return E_NOINTERFACE;
3670 }
#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

◆ mime_obj_Release()

static ULONG WINAPI mime_obj_Release ( IUnknown iface)
static

Definition at line 3678 of file mimeole.c.

3679 {
3680  TRACE("\n");
3681  return 1;
3682 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ MimeAlloc_AddRef()

static ULONG WINAPI MimeAlloc_AddRef ( IMimeAllocator *  iface)
static

Definition at line 3353 of file mimeole.c.

3355 {
3356  return 2;
3357 }

◆ MimeAlloc_Alloc()

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

Definition at line 3365 of file mimeole.c.

3368 {
3369  return CoTaskMemAlloc(cb);
3370 }
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 3395 of file mimeole.c.

3398 {
3399  FIXME("stub\n");
3400  return 0;
3401 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ MimeAlloc_Free()

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

Definition at line 3380 of file mimeole.c.

3383 {
3384  CoTaskMemFree(pv);
3385 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422

◆ MimeAlloc_FreeAddressList()

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

Definition at line 3428 of file mimeole.c.

3431 {
3432  FIXME("stub\n");
3433  return E_NOTIMPL;
3434 }
#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 3436 of file mimeole.c.

3439 {
3440  FIXME("stub\n");
3441  return E_NOTIMPL;
3442 }
#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 3455 of file mimeole.c.

3460 {
3461  FIXME("stub\n");
3462  return E_NOTIMPL;
3463 }
#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 3465 of file mimeole.c.

3470 {
3471  FIXME("stub\n");
3472  return E_NOTIMPL;
3473 }
#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 3410 of file mimeole.c.

3415 {
3416  ULONG i;
3417  TRACE("(%p)->(%d, %p, %d)\n", iface, cParams, prgParam, fFreeArray);
3418 
3419  for(i = 0; i < cParams; i++)
3420  {
3421  IMimeAllocator_Free(iface, prgParam[i].pszName);
3422  IMimeAllocator_Free(iface, prgParam[i].pszData);
3423  }
3424  if(fFreeArray) IMimeAllocator_Free(iface, prgParam);
3425  return S_OK;
3426 }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#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 3475 of file mimeole.c.

3478 {
3479  FIXME("stub\n");
3480  return E_NOTIMPL;
3481 }
#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 3387 of file mimeole.c.

3390 {
3391  FIXME("stub\n");
3392  return 0;
3393 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ MimeAlloc_HeapMinimize()

static void WINAPI MimeAlloc_HeapMinimize ( IMimeAllocator *  iface)
static

Definition at line 3403 of file mimeole.c.

3405 {
3406  FIXME("stub\n");
3407  return;
3408 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ MimeAlloc_PropVariantClear()

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

Definition at line 3484 of file mimeole.c.

3487 {
3488  FIXME("stub\n");
3489  return E_NOTIMPL;
3490 }
#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 3332 of file mimeole.c.

3336 {
3337  TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), obj);
3338 
3339  if (IsEqualIID(riid, &IID_IUnknown) ||
3340  IsEqualIID(riid, &IID_IMalloc) ||
3341  IsEqualIID(riid, &IID_IMimeAllocator))
3342  {
3343  *obj = iface;
3344  IMimeAllocator_AddRef(iface);
3345  return S_OK;
3346  }
3347 
3348  FIXME("no interface for %s\n", debugstr_guid(riid));
3349  *obj = NULL;
3350  return E_NOINTERFACE;
3351 }
#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 3372 of file mimeole.c.

3376 {
3377  return CoTaskMemRealloc(pv, cb);
3378 }
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 3359 of file mimeole.c.

3361 {
3362  return 1;
3363 }

◆ MimeAlloc_ReleaseObjects()

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

Definition at line 3444 of file mimeole.c.

3449 {
3450  FIXME("stub\n");
3451  return E_NOTIMPL;
3452 }
#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 3518 of file mimeole.c.

Referenced by MimeOleGetAllocator().

3519 {
3520  if(outer) return CLASS_E_NOAGGREGATION;
3521 
3522  *obj = &mime_allocator;
3523  return S_OK;
3524 }
static IMimeAllocator mime_allocator
Definition: mimeole.c:3513
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_AddRef()

static ULONG WINAPI MimeBody_AddRef ( IMimeBody iface)
static

Definition at line 940 of file mimeole.c.

941 {
943  LONG ref = InterlockedIncrement(&This->ref);
944 
945  TRACE("(%p) ref=%d\n", This, ref);
946 
947  return ref;
948 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
LONG ref
Definition: mimeole.c:159
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 1208 of file mimeole.c.

1213 {
1214  MimeBody *This = impl_from_IMimeBody(iface);
1215  FIXME("(%p)->(%s, 0x%x, %p) stub\n", This, debugstr_a(pszName), dwFlags, pValue);
1216  return E_NOTIMPL;
1217 }
#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 1381 of file mimeole.c.

1385 {
1386  MimeBody *This = impl_from_IMimeBody(iface);
1387  FIXME("(%p)->(%s, %p) stub\n", This, debugstr_guid(riid), ppvObject);
1388  return E_NOTIMPL;
1389 }
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
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeBody_Clone()

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

Definition at line 1391 of file mimeole.c.

1394 {
1395  MimeBody *This = impl_from_IMimeBody(iface);
1396  FIXME("(%p)->(%p) stub\n", This, ppPropertySet);
1397  return E_NOTIMPL;
1398 }
#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 1247 of file mimeole.c.

1252 {
1253  MimeBody *This = impl_from_IMimeBody(iface);
1254  FIXME("(%p)->(%d, %p, %p) stub\n", This, cNames, prgszName, pPropertySet);
1255  return E_NOTIMPL;
1256 }
#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 1788 of file mimeole.c.

1791 {
1792  MimeBody *This = impl_from_IMimeBody(iface);
1793  FIXME("(%p)->(%p) stub\n", This, pBody);
1794  return E_NOTIMPL;
1795 }
#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 1888 of file mimeole.c.

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

1889 {
1890  MimeBody *This;
1891  BODYOFFSETS body_offsets;
1892 
1893  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
1894  if (!This)
1895  return NULL;
1896 
1897  This->IMimeBody_iface.lpVtbl = &body_vtbl;
1898  This->ref = 1;
1899  This->handle = NULL;
1900  list_init(&This->headers);
1901  list_init(&This->new_props);
1903  This->content_pri_type = NULL;
1904  This->content_sub_type = NULL;
1905  This->encoding = IET_7BIT;
1906  This->data = NULL;
1907  This->data_iid = IID_NULL;
1908 
1909  body_offsets.cbBoundaryStart = body_offsets.cbHeaderStart = 0;
1910  body_offsets.cbBodyStart = body_offsets.cbBodyEnd = 0;
1911  MimeBody_set_offsets(This, &body_offsets);
1912 
1913  return This;
1914 }
struct list headers
Definition: mimeole.c:163
static HRESULT MimeBody_set_offsets(MimeBody *body, const BODYOFFSETS *offsets)
Definition: mimeole.c:1877
static IMimeBodyVtbl body_vtbl
Definition: mimeole.c:1830
IMimeBody IMimeBody_iface
Definition: mimeole.c:158
HBODY handle
Definition: mimeole.c:161
char * content_pri_type
Definition: mimeole.c:166
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG ref
Definition: mimeole.c:159
char * content_sub_type
Definition: mimeole.c:167
#define IID_NULL
Definition: guiddef.h:93
struct list new_props
Definition: mimeole.c:164
#define FIRST_CUSTOM_PROP_ID
Definition: mimeole.c:1886
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
void * data
Definition: mimeole.c:169
DWORD next_prop_id
Definition: mimeole.c:165
ENCODINGTYPE encoding
Definition: mimeole.c:168
IID data_iid
Definition: mimeole.c:170

◆ MimeBody_create()

HRESULT MimeBody_create ( IUnknown outer,
void **  ppv 
)

Definition at line 1916 of file mimeole.c.

1917 {
1918  MimeBody *mb;
1919 
1920  if(outer)
1921  return CLASS_E_NOAGGREGATION;
1922 
1923  if ((mb = mimebody_create()))
1924  {
1925  *ppv = &mb->IMimeBody_iface;
1926  return S_OK;
1927  }
1928  else
1929  {
1930  *ppv = NULL;
1931  return E_OUTOFMEMORY;
1932  }
1933 }
static MimeBody * mimebody_create(void)
Definition: mimeole.c:1888
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 1269 of file mimeole.c.

1273 {
1274  MimeBody *This = impl_from_IMimeBody(iface);
1275  FIXME("(%p)->(%d, %p) stub\n", This, cNames, prgszName);
1276  return E_NOTIMPL;
1277 }
#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 1219 of file mimeole.c.

1222 {
1223  MimeBody *This = impl_from_IMimeBody(iface);
1224  header_t *cursor;
1225  BOOL found;
1226 
1227  TRACE("(%p)->(%s) stub\n", This, debugstr_a(pszName));
1228 
1229  LIST_FOR_EACH_ENTRY(cursor, &This->headers, header_t, entry)
1230  {
1231  if(ISPIDSTR(pszName))
1232  found = STRTOPID(pszName) == cursor->prop->id;
1233  else
1234  found = !lstrcmpiA(pszName, cursor->prop->name);
1235 
1236  if(found)
1237  {
1238  list_remove(&cursor->entry);
1239  HeapFree(GetProcessHeap(), 0, cursor);
1240  return S_OK;
1241  }
1242  }
1243 
1244  return MIME_E_NOT_FOUND;
1245 }
struct list headers
Definition: mimeole.c:163
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
const property_t * prop
Definition: mimeole.c:151
uint8_t entry
Definition: isohybrid.c:63
LPCSTR name
Definition: mimeole.c:50
DWORD id
Definition: mimeole.c:51
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GetProcessHeap()
Definition: compat.h:395
#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
struct list entry
Definition: mimeole.c:150
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ MimeBody_EmptyData()

static HRESULT WINAPI MimeBody_EmptyData ( IMimeBody iface)
static

Definition at line 1780 of file mimeole.c.

1782 {
1783  MimeBody *This = impl_from_IMimeBody(iface);
1784  FIXME("(%p)->() stub\n", This);
1785  return E_NOTIMPL;
1786 }
#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 1442 of file mimeole.c.

1446 {
1447  MimeBody *This = impl_from_IMimeBody(iface);
1448  FIXME("(%p)->(0x%x, %p) stub\n", This, dwFlags, ppEnum);
1449  return E_NOTIMPL;
1450 }
#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 1291 of file mimeole.c.

1294 {
1295  MimeBody *This = impl_from_IMimeBody(iface);
1296  FIXME("(%p)->(%p) stub\n", This, phCharset);
1297  *phCharset = NULL;
1298  return S_OK;
1299 }
#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 973 of file mimeole.c.

976 {
978 
979  TRACE("(%p)->(%p)\n", This, pClassID);
980 
981  if(!pClassID)
982  return E_INVALIDARG;
983 
984  *pClassID = IID_IMimeBody;
985  return S_OK;
986 }
#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 1500 of file mimeole.c.

1503 {
1504  MimeBody *This = impl_from_IMimeBody(iface);
1505 
1506  TRACE("(%p)->(%p)\n", This, pietEncoding);
1507 
1508  *pietEncoding = This->encoding;
1509  return S_OK;
1510 }
#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
ENCODINGTYPE encoding
Definition: mimeole.c:168

◆ MimeBody_GetData()

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

Definition at line 1709 of file mimeole.c.

1713 {
1714  MimeBody *This = impl_from_IMimeBody(iface);
1716  HRESULT hres;
1717 
1718  TRACE("(%p)->(%d %p)\n", This, ietEncoding, ppStream);
1719 
1720  if(This->encoding != ietEncoding) {
1721  switch(This->encoding) {
1722  case IET_BASE64:
1723  hres = decode_base64(This->data, ppStream);
1724  break;
1725  case IET_QP:
1726  hres = decode_qp(This->data, ppStream);
1727  break;
1728  default:
1729  FIXME("Decoding %d is not supported.\n", This->encoding);
1730  hres = S_FALSE;
1731  }
1732  if(ietEncoding != IET_BINARY)
1733  FIXME("Encoding %d is not supported.\n", ietEncoding);
1734  if(hres != S_FALSE)
1735  return hres;
1736  }
1737 
1738  start.QuadPart = 0;
1739  hres = get_stream_size(This->data, &size);
1740  if(SUCCEEDED(hres))
1741  hres = create_sub_stream(This->data, start, size, ppStream);
1742  return hres;
1743 }
static HRESULT decode_qp(IStream *input, IStream **ret_stream)
Definition: mimeole.c:1636
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#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:1556
void * data
Definition: mimeole.c:169
ENCODINGTYPE encoding
Definition: mimeole.c:168
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ MimeBody_GetDataHere()

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

Definition at line 1534 of file mimeole.c.

1538 {
1539  MimeBody *This = impl_from_IMimeBody(iface);
1540  FIXME("(%p)->(%d, %p) stub\n", This, ietEncoding, pStream);
1541  return E_NOTIMPL;
1542 }
#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 1478 of file mimeole.c.

1481 {
1482  MimeBody *This = impl_from_IMimeBody(iface);
1483  FIXME("(%p)->(%p) stub\n", This, ppszDisplay);
1484  return E_NOTIMPL;
1485 }
#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 1524 of file mimeole.c.

1528 {
1529  MimeBody *This = impl_from_IMimeBody(iface);
1530  FIXME("(%p)->(%d, %p) stub\n", This, ietEncoding, pcbSize);
1531  return E_NOTIMPL;
1532 }
#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 1816 of file mimeole.c.

1819 {
1820  MimeBody *This = impl_from_IMimeBody(iface);
1821  TRACE("(%p)->(%p)\n", iface, phBody);
1822 
1823  if(!phBody)
1824  return E_INVALIDARG;
1825 
1826  *phBody = This->handle;
1827  return This->handle ? S_OK : MIME_E_NO_DATA;
1828 }
HBODY handle
Definition: mimeole.c:161
#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 1487 of file mimeole.c.

1490 {
1491  MimeBody *This = impl_from_IMimeBody(iface);
1492  TRACE("(%p)->(%p)\n", This, pOffsets);
1493 
1494  *pOffsets = This->body_offsets;
1495 
1496  if(This->body_offsets.cbBodyEnd == 0) return MIME_E_NO_DATA;
1497  return S_OK;
1498 }
#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
BODYOFFSETS body_offsets
Definition: mimeole.c:171

◆ MimeBody_GetOption()

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

Definition at line 1432 of file mimeole.c.

1436 {
1437  MimeBody *This = impl_from_IMimeBody(iface);
1438  FIXME("(%p)->(%08x, %p): stub\n", This, oid, pValue);
1439  return E_NOTIMPL;
1440 }
#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 1311 of file mimeole.c.

1316 {
1317  MimeBody *This = impl_from_IMimeBody(iface);
1318  HRESULT hr;
1319  header_t *header;
1320 
1321  TRACE("(%p)->(%s, %p, %p)\n", iface, debugstr_a(pszName), pcParams, pprgParam);
1322 
1323  *pprgParam = NULL;
1324  *pcParams = 0;
1325 
1326  hr = find_prop(This, pszName, &header);
1327  if(hr != S_OK) return hr;
1328 
1329  *pcParams = list_count(&header->params);
1330  if(*pcParams)
1331  {
1332  IMimeAllocator *alloc;
1333  param_t *param;
1334  MIMEPARAMINFO *info;
1335 
1336  MimeOleGetAllocator(&alloc);
1337 
1338  *pprgParam = info = IMimeAllocator_Alloc(alloc, *pcParams * sizeof(**pprgParam));
1339  LIST_FOR_EACH_ENTRY(param, &header->params, param_t, entry)
1340  {
1341  int len;
1342 
1343  len = strlen(param->name) + 1;
1344  info->pszName = IMimeAllocator_Alloc(alloc, len);
1345  memcpy(info->pszName, param->name, len);
1346  len = strlen(param->value) + 1;
1347  info->pszData = IMimeAllocator_Alloc(alloc, len);
1348  memcpy(info->pszData, param->value, len);
1349  info++;
1350  }
1351  IMimeAllocator_Release(alloc);
1352  }
1353  return S_OK;
1354 }
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
struct list params
Definition: mimeole.c:153
#define debugstr_a
Definition: kernel32.h:31
HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator **alloc)
Definition: mimeole.c:3526
LONG HRESULT
Definition: typedefs.h:77
GLfloat param
Definition: glext.h:5796
char * name
Definition: mimeole.c:144
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
char * value
Definition: mimeole.c:145
static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop)
Definition: mimeole.c:860
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 1081 of file mimeole.c.

1086 {
1087  MimeBody *This = impl_from_IMimeBody(iface);
1088  header_t *header;
1089  HRESULT hr;
1090 
1091  TRACE("(%p)->(%s, 0x%x, %p)\n", This, debugstr_a(pszName), dwFlags, pValue);
1092 
1093  if(!pszName || !pValue)
1094  return E_INVALIDARG;
1095 
1096  if(!ISPIDSTR(pszName) && !lstrcmpiA(pszName, "att:pri-content-type"))
1097  {
1098  PropVariantClear(pValue);
1099  pValue->vt = VT_LPSTR;
1100  pValue->u.pszVal = strdupA(This->content_pri_type);
1101  return S_OK;
1102  }
1103 
1104  hr = find_prop(This, pszName, &header);
1105  if(hr == S_OK)
1106  {
1107  TRACE("type %d->%d\n", header->value.vt, pValue->vt);
1108 
1109  hr = PropVariantChangeType(pValue, &header->value, 0, pValue->vt);
1110  if(FAILED(hr))
1111  FIXME("Conversion not currently supported (%d->%d)\n", header->value.vt, pValue->vt);
1112  }
1113 
1114  return hr;
1115 }
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2809
HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc, PROPVAR_CHANGE_FLAGS flags, VARTYPE vt)
Definition: propvar.c:361
char * content_pri_type
Definition: mimeole.c:166
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
PROPVARIANT value
Definition: mimeole.c:152
#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:860
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 1027 of file mimeole.c.

1031 {
1032  MimeBody *This = impl_from_IMimeBody(iface);
1033  header_t *header;
1034  HRESULT hr;
1035  DWORD supported = PIM_PROPID | PIM_VTDEFAULT;
1036 
1037  TRACE("(%p)->(%s, %p) semi-stub\n", This, debugstr_a(pszName), pInfo);
1038 
1039  if(!pszName || !pInfo)
1040  return E_INVALIDARG;
1041 
1042  TRACE("mask 0x%04x\n", pInfo->dwMask);
1043 
1044  if(pInfo->dwMask & ~supported)
1045  FIXME("Unsupported mask flags 0x%04x\n", pInfo->dwMask & ~supported);
1046 
1047  hr = find_prop(This, pszName, &header);
1048  if(hr == S_OK)
1049  {
1050  if(pInfo->dwMask & PIM_CHARSET)
1051  pInfo->hCharset = 0;
1052  if(pInfo->dwMask & PIM_FLAGS)
1053  pInfo->dwFlags = 0x00000000;
1054  if(pInfo->dwMask & PIM_ROWNUMBER)
1055  pInfo->dwRowNumber = 0;
1056  if(pInfo->dwMask & PIM_ENCODINGTYPE)
1057  pInfo->ietEncoding = 0;
1058  if(pInfo->dwMask & PIM_VALUES)
1059  pInfo->cValues = 0;
1060  if(pInfo->dwMask & PIM_PROPID)
1061  pInfo->dwPropId = header->prop->id;
1062  if(pInfo->dwMask & PIM_VTDEFAULT)
1063  pInfo->vtDefault = header->prop->default_vt;
1064  if(pInfo->dwMask & PIM_VTCURRENT)
1065  pInfo->vtCurrent = 0;
1066  }
1067 
1068  return hr;
1069 }
const property_t * prop
Definition: mimeole.c:151
DWORD id
Definition: mimeole.c:51
#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
VARTYPE default_vt
Definition: mimeole.c:53
static HRESULT find_prop(MimeBody *body, const char *name, header_t **prop)
Definition: mimeole.c:860
struct CFHEADER header
Definition: fdi.c:109

◆ MimeBody_GetSizeMax()

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

Definition at line 1010 of file mimeole.c.

1013 {
1014  MimeBody *This = impl_from_IMimeBody(iface);
1015  FIXME("(%p)->(%p) stub\n", This, pcbSize);
1016  return E_NOTIMPL;
1017 }
#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 1797 of file mimeole.c.

1800 {
1801  MimeBody *This = impl_from_IMimeBody(iface);
1802  FIXME("(%p)->(%p) stub\n", This, pTransmitInfo);
1803  return E_NOTIMPL;
1804 }
#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 1019 of file mimeole.c.

1021 {
1022  MimeBody *This = impl_from_IMimeBody(iface);
1023  TRACE("(%p)->()\n", This);
1024  return S_OK;
1025 }
#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 1356 of file mimeole.c.

1360 {
1361  MimeBody *This = impl_from_IMimeBody(iface);
1362 
1363  TRACE("(%p)->(%s, %s)\n", This, debugstr_a(pszPriType), debugstr_a(pszSubType));
1364  if(pszPriType)
1365  {
1366  const char *pri = This->content_pri_type;
1367  if(!pri) pri = "text";
1368  if(lstrcmpiA(pri, pszPriType)) return S_FALSE;
1369  }
1370 
1371  if(pszSubType)
1372  {
1373  const char *sub = This->content_sub_type;
1374  if(!sub) sub = "plain";
1375  if(lstrcmpiA(sub, pszSubType)) return S_FALSE;
1376  }
1377 
1378  return S_OK;
1379 }
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
char * content_pri_type
Definition: mimeole.c:166
#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
char * content_sub_type
Definition: mimeole.c:167
#define S_OK
Definition: intsafe.h:59

◆ MimeBody_IsDirty()

static HRESULT WINAPI MimeBody_IsDirty ( IMimeBody iface)
static

Definition at line 988 of file mimeole.c.

990 {
992  FIXME("(%p)->() stub\n", This);
993  return E_NOTIMPL;
994 }
#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 1452 of file mimeole.c.

1455 {
1456  MimeBody *This = impl_from_IMimeBody(iface);
1457 
1458  TRACE("(%p)->(%d)\n", This, bodytype);
1459  switch(bodytype)
1460  {
1461  case IBT_EMPTY:
1462  return This->data ? S_FALSE : S_OK;
1463  default:
1464  FIXME("Unimplemented bodytype %d - returning S_OK\n", bodytype);
1465  }
1466  return S_OK;
1467 }
#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
void * data
Definition: mimeole.c:169

◆ MimeBody_Load()

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

Definition at line 996 of file mimeole.c.

997 {
999  TRACE("(%p)->(%p)\n", This, pStm);
1000  return parse_headers(This, pStm);
1001 }
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 1258 of file mimeole.c.

1263 {
1264  MimeBody *This = impl_from_IMimeBody(iface);
1265  FIXME("(%p)->(%d, %p, %p) stub\n", This, cNames, prgszName, pPropertySet);
1266  return E_NOTIMPL;
1267 }
#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 913 of file mimeole.c.

916 {
917  TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObject);
918 
919  *ppvObject = NULL;
920 
921  if (IsEqualIID(riid, &IID_IUnknown) ||
924  IsEqualIID(riid, &IID_IMimePropertySet) ||
925  IsEqualIID(riid, &IID_IMimeBody))
926  {
927  *ppvObject = iface;
928  }
929 
930  if(*ppvObject)
931  {
932  IUnknown_AddRef((IUnknown*)*ppvObject);
933  return S_OK;
934  }
935 
936  FIXME("no interface for %s\n", debugstr_guid(riid));
937  return E_NOINTERFACE;
938 }
#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
#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 1279 of file mimeole.c.

1285 {
1286  MimeBody *This = impl_from_IMimeBody(iface);
1287  FIXME("(%p)->(%s, %s, %d, %d) stub\n", This, debugstr_a(pszName), debugstr_a(pszCriteria), fSubString, fCaseSensitive);
1288  return E_NOTIMPL;
1289 }
#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 950 of file mimeole.c.

Referenced by MimeMessage_IsBodyType().

951 {
953  LONG ref = InterlockedDecrement(&This->ref);
954 
955  TRACE("(%p) ref=%d\n", This, ref);
956 
957  if (!ref)
958  {
959  empty_header_list(&This->headers);
961 
964 
965  release_data(&This->data_iid, This->data);
966 
967  HeapFree(GetProcessHeap(), 0, This);
968  }
969 
970  return ref;
971 }
struct list headers
Definition: mimeole.c:163
static void release_data(REFIID riid, void *data)
Definition: mimeole.c:850
char * content_pri_type
Definition: mimeole.c:166
Definition: send.c:47
long LONG
Definition: pedump.c:60
static void empty_header_list(struct list *list)
Definition: mimeole.c:825
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:838
LONG ref
Definition: mimeole.c:159
static MimeBody * impl_from_IMimeBody(IMimeBody *iface)
Definition: mimeole.c:466
char * content_sub_type
Definition: mimeole.c:167
#define InterlockedDecrement
Definition: armddk.h:52
struct list new_props
Definition: mimeole.c:164
void * data
Definition: mimeole.c:169
IID data_iid
Definition: mimeole.c:170
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ MimeBody_Save()

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

Definition at line 1003 of file mimeole.c.

1004 {
1005  MimeBody *This = impl_from_IMimeBody(iface);
1006  FIXME("(%p)->(%p, %d)\n", This, pStm, fClearDirty);
1007  return E_NOTIMPL;
1008 }
#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 1806 of file mimeole.c.

1810 {
1811  MimeBody *This = impl_from_IMimeBody(iface);
1812  FIXME("(%p)->(%d, %s) stub\n", This, ietEncoding, debugstr_a(pszFilePath));
1813  return E_NOTIMPL;
1814 }
#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 1877 of file mimeole.c.

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

1878 {
1879  TRACE("setting offsets to %d, %d, %d, %d\n", offsets->cbBoundaryStart,
1880  offsets->cbHeaderStart, offsets->cbBodyStart, offsets->cbBodyEnd);
1881 
1882  body->body_offsets = *offsets;
1883  return S_OK;
1884 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
BODYOFFSETS body_offsets
Definition: mimeole.c:171

◆ MimeBody_SetCharset()

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

Definition at line 1301 of file mimeole.c.

1305 {
1306  MimeBody *This = impl_from_IMimeBody(iface);
1307  FIXME("(%p)->(%p, %d) stub\n", This, hCharset, applytype);
1308  return E_NOTIMPL;
1309 }
#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 1512 of file mimeole.c.

1515 {
1516  MimeBody *This = impl_from_IMimeBody(iface);
1517 
1518  TRACE("(%p)->(%d)\n", This, ietEncoding);
1519 
1520  This->encoding = ietEncoding;
1521  return S_OK;
1522 }
#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
ENCODINGTYPE encoding
Definition: mimeole.c:168

◆ MimeBody_SetData()

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

Definition at line 1745 of file mimeole.c.

1752 {
1753  MimeBody *This = impl_from_IMimeBody(iface);
1754  TRACE("(%p)->(%d, %s, %s, %s %p)\n", This, ietEncoding, debugstr_a(pszPriType), debugstr_a(pszSubType),
1755  debugstr_guid(riid), pvObject);
1756 
1757  if(IsEqualIID(riid, &IID_IStream))
1758  IStream_AddRef((IStream *)pvObject);
1759  else
1760  {
1761  FIXME("Unhandled object type %s\n", debugstr_guid(riid));
1762  return E_INVALIDARG;
1763  }
1764 
1765  if(This->data)
1766  release_data(&This->data_iid, This->data);
1767 
1768  This->data_iid = *riid;
1769  This->data = pvObject;
1770 
1771  IMimeBody_SetCurrentEncoding(iface, ietEncoding);
1772 
1773  /* FIXME: Update the content type.
1774  If pszPriType == NULL use 'application'
1775  If pszSubType == NULL use 'octet-stream' */
1776 
1777  return S_OK;
1778 }
static void release_data(REFIID riid, void *data)
Definition: mimeole.c:850
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
void * data
Definition: mimeole.c:169
IID data_iid
Definition: mimeole.c:170
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90

◆ MimeBody_SetDisplayName()

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

Definition at line 1469 of file mimeole.c.

1472 {
1473  MimeBody *This = impl_from_IMimeBody(iface);
1474  FIXME("(%p)->(%s) stub\n", This, debugstr_a(pszDisplay));
1475  return E_NOTIMPL;
1476 }
#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 1400 of file mimeole.c.

1404 {
1405  MimeBody *This = impl_from_IMimeBody(iface);
1406  HRESULT hr = E_NOTIMPL;
1407  TRACE("(%p)->(%08x, %p)\n", This, oid, pValue);
1408 
1409  if(pValue->vt != TYPEDID_TYPE(oid))
1410  {
1411  WARN("Called with vartype %04x and oid %08x\n", pValue->vt, oid);
1412  return E_INVALIDARG;
1413  }
1414 
1415  switch(oid)
1416  {
1417  case OID_SECURITY_HWND_OWNER:
1418  FIXME("OID_SECURITY_HWND_OWNER (value %08x): ignoring\n", pValue->u.ulVal);
1419  hr = S_OK;
1420  break;
1421  case OID_TRANSMIT_BODY_ENCODING:
1422  FIXME("OID_TRANSMIT_BODY_ENCODING (value %08x): ignoring\n", pValue->u.ulVal);
1423  hr = S_OK;
1424  break;
1425  default:
1426  FIXME("Unhandled oid %08x\n", oid);
1427  }
1428 
1429  return hr;
1430 }
#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 1117 of file mimeole.c.

1122 {
1123  MimeBody *This = impl_from_IMimeBody(iface);
1124  header_t *header;
1125  HRESULT hr;
1126 
1127  TRACE("(%p)->(%s, 0x%x, %p)\n", This, debugstr_a(pszName), dwFlags, pValue);
1128 
1129  if(!pszName || !pValue)
1130  return E_INVALIDARG;
1131 
1132  hr = find_prop(This, pszName, &header);
1133  if(hr != S_OK)
1134  {
1135  property_list_entry_t *prop_entry;
1136  const property_t *prop = NULL;
1137 
1139  {
1140  if(ISPIDSTR(pszName))
1141  {
1142  if(STRTOPID(pszName) == prop_entry->prop.id)
1143  {
1144  TRACE("Found match with already added new property id %d\n", prop_entry->prop.id);
1145  prop = &prop_entry->prop;
1146  break;
1147  }
1148  }
1149  else if(!lstrcmpiA(pszName, prop_entry->prop.name))
1150  {
1151  TRACE("Found match with already added new property id %d\n", prop_entry->prop.id);
1152  prop = &prop_entry->prop;
1153  break;
1154  }
1155  }
1156 
1157  header = HeapAlloc(GetProcessHeap(), 0, sizeof(*header));
1158  if(!header)
1159  return E_OUTOFMEMORY;
1160 
1161  if(!prop)
1162  {
1163  const property_t *prop_def = NULL;
1164  prop_entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*prop_entry));
1165  if(!prop_entry)
1166  {
1167  HeapFree(GetProcessHeap(), 0, header);
1168  return E_OUTOFMEMORY;
1169  }
1170 
1171  prop_def = find_default_prop(pszName);
1172  if(prop_def)
1173  {
1174  prop_entry->prop.name = strdupA(prop_def->name);
1175  prop_entry->prop.id = prop_def->id;
1176  }
1177  else
1178  {
1179  if(ISPIDSTR(pszName))
1180  {
1181  HeapFree(GetProcessHeap(), 0, prop_entry);
1182  HeapFree(GetProcessHeap(), 0, header);
1183  return MIME_E_NOT_FOUND;
1184  }
1185 
1186  prop_entry->prop.name = strdupA(pszName);
1187  prop_entry->prop.id = This->next_prop_id++;
1188  }
1189 
1190  prop_entry->prop.flags = 0;
1191  prop_entry->prop.default_vt = pValue->vt;
1192  list_add_tail(&This->new_props, &prop_entry->entry);
1193  prop = &prop_entry->prop;
1194  TRACE("Allocating new prop id %d\n", prop_entry->prop.id);
1195  }
1196 
1197  header->prop = prop;
1198  PropVariantInit(&header->value);
1199  list_init(&header->params);
1200  list_add_tail(&This->headers, &header->entry);
1201  }
1202 
1203  PropVariantCopy(&header->value, pValue);
1204 
1205  return S_OK;
1206 }
Definition: mimeole.c:56
struct list headers
Definition: mimeole.c:163
static const property_t * find_default_prop(const char *name)
Definition: mimeole.c:886
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
const property_t * prop
Definition: mimeole.c:151
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
PROPVARIANT value
Definition: mimeole.c:152
struct list entry
Definition: mimeole.c:58
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
Definition: ole2.c:2925
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
struct list params
Definition: mimeole.c:153
#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
struct list new_props
Definition: mimeole.c:164
#define S_OK
Definition: intsafe.h:59
VARTYPE default_vt
Definition: mimeole.c:53
struct list entry
Definition: mimeole.c:150
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:860
DWORD next_prop_id
Definition: mimeole.c:165
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 1071 of file mimeole.c.

1075 {
1076  MimeBody *This = impl_from_IMimeBody(iface);
1077  FIXME("(%p)->(%s, %p) stub\n", This, debugstr_a(pszName), pInfo);
1078  return E_NOTIMPL;
1079 }
#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 3657 of file mimeole.c.

3659 {
3660  FIXME("(%s, %p, %d, %d, %p) stub\n", debugstr_guid(riid), object, addr_type, addr_format, address);
3661 
3662  return E_NOTIMPL;
3663 }
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 1980 of file mimeole.c.

1981 {
1983  ULONG ref = InterlockedIncrement(&This->ref);
1984 
1985  TRACE("(%p) ref=%d\n", This, ref);
1986 
1987  return ref;
1988 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
LONG ref
Definition: mimeole.c:1948
#define TRACE(s)
Definition: solgame.cpp:4
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1955
#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 2896 of file mimeole.c.

2901 {
2902  FIXME("(%p)->(%s, %p, %p)\n", iface, pszFilePath, pstmFile, phBody);
2903  return E_NOTIMPL;
2904 }
#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 2886 of file mimeole.c.

2891 {
2892  FIXME("(%p)->(%s, %p, %p)\n", iface, debugstr_guid(riid), pvObject, phBody);
2893  return E_NOTIMPL;
2894 }
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 2906 of file mimeole.c.

2914 {
2915  FIXME("(%p)->(%s, %s, 0x%x, %p, %p, %p)\n", iface, pszBase, pszURL, dwFlags, pstmURL, ppszCIDURL, phBody);
2916  return E_NOTIMPL;
2917 }
#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 2350 of file mimeole.c.

2352 {
2354  HRESULT hr;
2355  body_t *body;
2356 
2357  TRACE("(%p)->(%p, %s, %p)\n", iface, hBody, debugstr_guid(riid), ppvObject);
2358 
2359  hr = find_body(&This->body_tree, hBody, &body);
2360 
2361  if(hr != S_OK) return hr;
2362 
2363  if(IsEqualIID(riid, &IID_IMimeBody))
2364  {
2365  IMimeBody_AddRef(&body->mime_body->IMimeBody_iface);
2366  *ppvObject = &body->mime_body->IMimeBody_iface;
2367  return S_OK;
2368  }
2369 
2370  return E_NOINTERFACE;
2371 }
#define E_NOINTERFACE
Definition: winerror.h:2364
MimeBody * mime_body
Definition: mimeole.c:1939
REFIID riid
Definition: precomp.h:44
IMimeBody IMimeBody_iface
Definition: mimeole.c:158
#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:2326
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1955
struct list body_tree
Definition: mimeole.c:1951
#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 2310 of file mimeole.c.

2313 {
2314  FIXME("(%p)->(0x%x)\n", iface, dwFlags);
2315  return S_OK;
2316 }
#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 2511 of file mimeole.c.

2513 {
2514  HRESULT hr;
2516  body_t *body;
2517 
2518  TRACE("(%p)->(%p, %s, %p)\n", iface, hParent, fRecurse ? "TRUE" : "FALSE", pcBodies);
2519 
2520  hr = find_body(&This->body_tree, hParent, &body);
2521  if(hr != S_OK) return hr;
2522 
2523  *pcBodies = 1;
2524  count_children(body, fRecurse, pcBodies);
2525 
2526  return S_OK;
2527 }
#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:2326
const DOCKBAR PVOID HWND hParent
Definition: tooldock.h:22
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1955
static void count_children(body_t *body, boolean recurse, ULONG *count)
Definition: mimeole.c:2500
struct list body_tree
Definition: mimeole.c:1951
#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 3081 of file mimeole.c.

Referenced by load_mime_message(), and MimeOleCreateMessage().

3082 {
3083  MimeMessage *This;
3084  MimeBody *mime_body;
3085  body_t *root_body;
3086 
3087  TRACE("(%p, %p)\n", outer, obj);
3088 
3089  if (outer)
3090  {
3091  FIXME("outer unknown not supported yet\n");
3092  return E_NOTIMPL;
3093  }
3094 
3095  *obj = NULL;
3096 
3097  This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
3098  if (!This) return E_OUTOFMEMORY;
3099 
3100  This->IMimeMessage_iface.lpVtbl = &MimeMessageVtbl;
3101  This->ref = 1;
3102  This->stream = NULL;
3103  list_init(&This->body_tree);
3104  This->next_index = 1;
3105 
3106  mime_body = mimebody_create();
3107  root_body = new_body_entry(mime_body, This->next_index++, NULL);
3108  list_add_head(&This->body_tree, &root_body->entry);
3109 
3110  *obj = &This->IMimeMessage_iface;
3111  return S_OK;
3112 }
IStream * stream
Definition: mimeole.c:1949
static MimeBody * mimebody_create(void)
Definition: mimeole.c:1888
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
DWORD next_index
Definition: mimeole.c:1952
static const IMimeMessageVtbl MimeMessageVtbl
Definition: mimeole.c:3021
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FIXME(fmt,...)
Definition: debug.h:110
LONG ref
Definition: mimeole.c:1948
smooth NULL
Definition: ftsmooth.c:416
struct list entry
Definition: mimeole.c:1937
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
struct list body_tree
Definition: mimeole.c:1951
#define S_OK
Definition: intsafe.h:59
IMimeMessage IMimeMessage_iface
Definition: mimeole.c:1947
#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:2037

◆ MimeMessage_CreateWebPage()

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

Definition at line 2776 of file mimeole.c.

2782 {
2783  FIXME("(%p)->(%p, %p, %p, %p)\n", iface, pRootStm, pOptions, pCallback, ppMoniker);
2784  *ppMoniker = NULL;
2785  return E_NOTIMPL;
2786 }
#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 2482 of file mimeole.c.

2486 {
2487  FIXME("(%p)->(%p, %08x)\n", iface, hBody, dwFlags);
2488  return E_NOTIMPL;
2489 }
#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 2712 of file mimeole.c.

2716 {
2717  FIXME("(%p)->(%p, %s)\n", iface, hBody, pszName);
2718  return E_NOTIMPL;
2719 }
#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 2808 of file mimeole.c.

2811 {
2812  FIXME("(%p)->(%s)\n", iface, pszName);
2813  return E_NOTIMPL;
2814 }
#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 2994 of file mimeole.c.

2999 {
3000  FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, dwProps, ppEnum);
3001  return E_NOTIMPL;
3002 }
#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,
HBODY *  phBody 
)
static

Definition at line 2560 of file mimeole.c.

2561 {
2563 
2564  TRACE("(%p)->(%p, %p)\n", iface, pFindBody, phBody);
2565 
2566  pFindBody->dwReserved = 0;
2567  return find_next(This, NULL, pFindBody, phBody);
2568 }
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1955
static HRESULT find_next(MimeMessage *This, body_t *body, FINDBODY *find, HBODY *out)
Definition: mimeole.c:2529

◆ MimeMessage_FindNext()

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

Definition at line 2570 of file mimeole.c.

2571 {
2573  body_t *body;
2574  HRESULT hr;
2575 
2576  TRACE("(%p)->(%p, %p)\n", iface, pFindBody, phBody);
2577 
2578  hr = find_body( &This->body_tree, UlongToHandle( pFindBody->dwReserved ), &body );
2579  if (hr != S_OK) return MIME_E_NOT_FOUND;
2580  return find_next(This, body, pFindBody, phBody);
2581 }
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define UlongToHandle(ul)
Definition: basetsd.h:97
static HRESULT find_body(struct list *list, HBODY hbody, body_t **body)
Definition: mimeole.c:2326
static MimeMessage * impl_from_IMimeMessage(IMimeMessage *iface)
Definition: mimeole.c:1955
struct list body_tree
Definition: mimeole.c:1951
static HRESULT find_next(MimeMessage *This, body_t *body, FINDBODY *find, HBODY *out)
Definition: mimeole.c:2529
#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_GetAddressFormat()

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

Definition at line 2984 of file mimeole.c.

2989 {
2990  FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, format, ppszFormat);
2991  return E_NOTIMPL;
2992 }
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ MimeMessage_GetAddressTable()

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

Definition at line 2958 of file mimeole.c.