inetcomm: Implement IMimeBody_IsType(IBT_EMPTY).
This commit is contained in:
parent
cfbd34cac7
commit
59091374e8
|
@ -864,8 +864,17 @@ static HRESULT WINAPI MimeBody_IsType(
|
|||
IMimeBody* iface,
|
||||
IMSGBODYTYPE bodytype)
|
||||
{
|
||||
FIXME("(%p)->(%d): stub\n", iface, bodytype);
|
||||
return E_NOTIMPL;
|
||||
MimeBody *This = impl_from_IMimeBody(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", iface, bodytype);
|
||||
switch(bodytype)
|
||||
{
|
||||
case IBT_EMPTY:
|
||||
return This->data ? S_FALSE : S_OK;
|
||||
default:
|
||||
FIXME("Unimplemented bodytype %d - returning S_OK\n", bodytype);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeBody_SetDisplayName(
|
||||
|
|
|
@ -130,6 +130,8 @@ static void test_CreateBody(void)
|
|||
ok(hr == S_FALSE, "ret %08x\n", hr);
|
||||
hr = IMimeBody_IsContentType(body, NULL, "mixed");
|
||||
ok(hr == S_OK, "ret %08x\n", hr);
|
||||
hr = IMimeBody_IsType(body, IBT_EMPTY);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
|
||||
hr = IMimeBody_SetData(body, IET_8BIT, "text", "plain", &IID_IStream, in);
|
||||
ok(hr == S_OK, "ret %08x\n", hr);
|
||||
|
@ -148,6 +150,9 @@ static void test_CreateBody(void)
|
|||
ok(offsets.cbBodyStart == 0, "got %d\n", offsets.cbBodyStart);
|
||||
ok(offsets.cbBodyEnd == 0, "got %d\n", offsets.cbBodyEnd);
|
||||
|
||||
hr = IMimeBody_IsType(body, IBT_EMPTY);
|
||||
ok(hr == S_FALSE, "got %08x\n", hr);
|
||||
|
||||
hr = MimeOleGetAllocator(&alloc);
|
||||
ok(hr == S_OK, "ret %08x\n", hr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue