taskschd: Implement ITaskSettings_put_DisallowStartIfOnBatteries.

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:21:55 +01:00 committed by Alexandre Julliard
parent eb87ede3fe
commit 2032eedfa6
2 changed files with 10 additions and 5 deletions

View File

@ -1023,8 +1023,13 @@ static HRESULT WINAPI TaskSettings_get_DisallowStartIfOnBatteries(ITaskSettings
static HRESULT WINAPI TaskSettings_put_DisallowStartIfOnBatteries(ITaskSettings *iface, VARIANT_BOOL disallow)
{
FIXME("%p,%d: stub\n", iface, disallow);
return E_NOTIMPL;
TaskSettings *taskset = impl_from_ITaskSettings(iface);
TRACE("%p,%d\n", iface, disallow);
taskset->disallow_start_if_on_batteries = disallow ? TRUE : FALSE;
return S_OK;
}
static HRESULT WINAPI TaskSettings_get_AllowHardTerminate(ITaskSettings *iface, VARIANT_BOOL *allow)

View File

@ -1114,6 +1114,9 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test)
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
hr = ITaskSettings_put_DisallowStartIfOnBatteries(set, test->disallow_start_if_on_batteries);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
hr = ITaskSettings_put_AllowHardTerminate(set, test->allow_hard_terminate);
todo_wine
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
/* FIXME: Remove once implemented */
@ -1123,9 +1126,6 @@ todo_wine
return;
}
hr = ITaskSettings_put_AllowHardTerminate(set, test->allow_hard_terminate);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
hr = ITaskSettings_put_StartWhenAvailable(set, test->start_when_available);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);