Commit 3c2d8dc3 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

taskschd: Implement IDailyTrigger_get_Enabled.

parent 929272f1
......@@ -224,8 +224,13 @@ static HRESULT WINAPI DailyTrigger_put_EndBoundary(IDailyTrigger *iface, BSTR en
static HRESULT WINAPI DailyTrigger_get_Enabled(IDailyTrigger *iface, VARIANT_BOOL *enabled)
{
DailyTrigger *This = impl_from_IDailyTrigger(iface);
FIXME("(%p)->(%p)\n", This, enabled);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, enabled);
if (!enabled) return E_POINTER;
*enabled = This->enabled ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
static HRESULT WINAPI DailyTrigger_put_Enabled(IDailyTrigger *iface, VARIANT_BOOL enabled)
......@@ -314,7 +319,7 @@ static HRESULT DailyTrigger_create(ITrigger **trigger)
daily_trigger->ref = 1;
daily_trigger->interval = 1;
daily_trigger->start_boundary = NULL;
daily_trigger->enabled = FALSE;
daily_trigger->enabled = TRUE;
*trigger = (ITrigger*)&daily_trigger->IDailyTrigger_iface;
return S_OK;
......
......@@ -1223,6 +1223,7 @@ static void test_daily_trigger(ITrigger *trigger)
};
IDailyTrigger *daily_trigger;
BSTR start_boundary;
VARIANT_BOOL enabled;
short interval;
HRESULT hr;
ULONG i;
......@@ -1281,6 +1282,22 @@ static void test_daily_trigger(ITrigger *trigger)
hr = IDailyTrigger_put_StartBoundary(daily_trigger, NULL);
ok(hr == S_OK, "put_StartBoundary failed: %08x\n", hr);
hr = IDailyTrigger_get_Enabled(daily_trigger, NULL);
ok(hr == E_POINTER, "get_Enabled failed: %08x\n", hr);
enabled = VARIANT_FALSE;
hr = IDailyTrigger_get_Enabled(daily_trigger, &enabled);
ok(hr == S_OK, "get_Enabled failed: %08x\n", hr);
ok(enabled == VARIANT_TRUE, "got %d\n", enabled);
hr = IDailyTrigger_put_Enabled(daily_trigger, VARIANT_FALSE);
ok(hr == S_OK, "put_Enabled failed: %08x\n", hr);
enabled = VARIANT_TRUE;
hr = IDailyTrigger_get_Enabled(daily_trigger, &enabled);
ok(hr == S_OK, "get_Enabled failed: %08x\n", hr);
ok(enabled == VARIANT_FALSE, "got %d\n", enabled);
IDailyTrigger_Release(daily_trigger);
}
......
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