inetcomm: Implement IMimeBody:[G|S]etCurrentEncoding.
This commit is contained in:
parent
19cb4bcd36
commit
dd66f04c21
|
@ -103,6 +103,7 @@ typedef struct MimeBody
|
||||||
DWORD next_prop_id;
|
DWORD next_prop_id;
|
||||||
char *content_pri_type;
|
char *content_pri_type;
|
||||||
char *content_sub_type;
|
char *content_sub_type;
|
||||||
|
ENCODINGTYPE encoding;
|
||||||
} MimeBody;
|
} MimeBody;
|
||||||
|
|
||||||
static inline MimeBody *impl_from_IMimeBody( IMimeBody *iface )
|
static inline MimeBody *impl_from_IMimeBody( IMimeBody *iface )
|
||||||
|
@ -762,16 +763,24 @@ static HRESULT WINAPI MimeBody_GetCurrentEncoding(
|
||||||
IMimeBody* iface,
|
IMimeBody* iface,
|
||||||
ENCODINGTYPE* pietEncoding)
|
ENCODINGTYPE* pietEncoding)
|
||||||
{
|
{
|
||||||
FIXME("stub\n");
|
MimeBody *This = impl_from_IMimeBody(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, pietEncoding);
|
||||||
|
|
||||||
|
*pietEncoding = This->encoding;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MimeBody_SetCurrentEncoding(
|
static HRESULT WINAPI MimeBody_SetCurrentEncoding(
|
||||||
IMimeBody* iface,
|
IMimeBody* iface,
|
||||||
ENCODINGTYPE ietEncoding)
|
ENCODINGTYPE ietEncoding)
|
||||||
{
|
{
|
||||||
FIXME("stub\n");
|
MimeBody *This = impl_from_IMimeBody(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p)->(%d)\n", This, ietEncoding);
|
||||||
|
|
||||||
|
This->encoding = ietEncoding;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MimeBody_GetEstimatedSize(
|
static HRESULT WINAPI MimeBody_GetEstimatedSize(
|
||||||
|
@ -924,6 +933,7 @@ HRESULT MimeBody_create(IUnknown *outer, void **obj)
|
||||||
This->next_prop_id = FIRST_CUSTOM_PROP_ID;
|
This->next_prop_id = FIRST_CUSTOM_PROP_ID;
|
||||||
This->content_pri_type = NULL;
|
This->content_pri_type = NULL;
|
||||||
This->content_sub_type = NULL;
|
This->content_sub_type = NULL;
|
||||||
|
This->encoding = IET_7BIT;
|
||||||
|
|
||||||
*obj = (IMimeBody *)&This->lpVtbl;
|
*obj = (IMimeBody *)&This->lpVtbl;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
|
@ -89,6 +89,7 @@ static void test_CreateBody(void)
|
||||||
IStream *in;
|
IStream *in;
|
||||||
LARGE_INTEGER off;
|
LARGE_INTEGER off;
|
||||||
ULARGE_INTEGER pos;
|
ULARGE_INTEGER pos;
|
||||||
|
ENCODINGTYPE enc;
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_IMimeBody, NULL, CLSCTX_INPROC_SERVER, &IID_IMimeBody, (void**)&body);
|
hr = CoCreateInstance(&CLSID_IMimeBody, NULL, CLSCTX_INPROC_SERVER, &IID_IMimeBody, (void**)&body);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr);
|
ok(hr == S_OK, "ret %08x\n", hr);
|
||||||
|
@ -107,6 +108,10 @@ static void test_CreateBody(void)
|
||||||
hr = IMimeBody_InitNew(body);
|
hr = IMimeBody_InitNew(body);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr);
|
ok(hr == S_OK, "ret %08x\n", hr);
|
||||||
|
|
||||||
|
hr = IMimeBody_GetCurrentEncoding(body, &enc);
|
||||||
|
ok(hr == S_OK, "ret %08x\n", hr);
|
||||||
|
ok(enc == IET_7BIT, "encoding %d\n", enc);
|
||||||
|
|
||||||
hr = IMimeBody_Load(body, in);
|
hr = IMimeBody_Load(body, in);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr);
|
ok(hr == S_OK, "ret %08x\n", hr);
|
||||||
off.QuadPart = 0;
|
off.QuadPart = 0;
|
||||||
|
|
Loading…
Reference in New Issue