taskschd: Implement ITaskSettings_put_Enabled.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2017-11-28 15:22:00 +01:00 committed by Alexandre Julliard
parent 64c08e68c0
commit 196a97740e
2 changed files with 13 additions and 8 deletions

View File

@ -1165,8 +1165,13 @@ static HRESULT WINAPI TaskSettings_get_Enabled(ITaskSettings *iface, VARIANT_BOO
static HRESULT WINAPI TaskSettings_put_Enabled(ITaskSettings *iface, VARIANT_BOOL enabled)
{
FIXME("%p,%d: stub\n", iface, enabled);
return E_NOTIMPL;
TaskSettings *taskset = impl_from_ITaskSettings(iface);
TRACE("%p,%d\n", iface, enabled);
taskset->enabled = enabled ? TRUE : FALSE;
return S_OK;
}
static HRESULT WINAPI TaskSettings_get_DeleteExpiredTaskAfter(ITaskSettings *iface, BSTR *delay)

View File

@ -1132,6 +1132,12 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test)
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
hr = ITaskSettings_put_Enabled(set, test->enabled);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
if (!test->delete_expired_task_after[0])
hr = ITaskSettings_put_DeleteExpiredTaskAfter(set, NULL);
else
hr = ITaskSettings_put_DeleteExpiredTaskAfter(set, test->delete_expired_task_after);
todo_wine
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
/* FIXME: Remove once implemented */
@ -1141,12 +1147,6 @@ todo_wine
return;
}
if (!test->delete_expired_task_after[0])
hr = ITaskSettings_put_DeleteExpiredTaskAfter(set, NULL);
else
hr = ITaskSettings_put_DeleteExpiredTaskAfter(set, test->delete_expired_task_after);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
hr = ITaskSettings_put_Priority(set, test->priority);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);