Commit 59091374 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

inetcomm: Implement IMimeBody_IsType(IBT_EMPTY).

parent cfbd34ca
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment