Commit 96cf60ec authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

taskschd: Implement ITaskDefinition_put_Triggers.

parent 5083f2a5
......@@ -1601,8 +1601,19 @@ static HRESULT WINAPI TaskDefinition_get_Triggers(ITaskDefinition *iface, ITrigg
static HRESULT WINAPI TaskDefinition_put_Triggers(ITaskDefinition *iface, ITriggerCollection *triggers)
{
FIXME("%p,%p: stub\n", iface, triggers);
return E_NOTIMPL;
TaskDefinition *taskdef = impl_from_ITaskDefinition(iface);
TRACE("%p,%p\n", iface, triggers);
if (!triggers) return E_POINTER;
if (taskdef->triggers)
ITriggerCollection_Release(taskdef->triggers);
ITriggerCollection_AddRef(triggers);
taskdef->triggers = triggers;
return S_OK;
}
static HRESULT WINAPI TaskDefinition_get_Settings(ITaskDefinition *iface, ITaskSettings **settings)
......
......@@ -1094,6 +1094,7 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test)
{
HRESULT hr;
ITaskSettings *set;
ITriggerCollection *triggers;
hr = ITaskDefinition_get_Settings(taskdef, &set);
ok(hr == S_OK, "get_Settings error %#x\n", hr);
......@@ -1158,6 +1159,15 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test)
hr = ITaskSettings_put_AllowDemandStart(set, test->allow_on_demand_start);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
triggers = NULL;
hr = ITaskDefinition_get_Triggers(taskdef, &triggers);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
ok(triggers != NULL, "triggers not set\n");
hr = ITaskDefinition_put_Triggers(taskdef, triggers);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
if (triggers) ITriggerCollection_Release(triggers);
/* FIXME: set IIdleSettings and INetworkSettings */
ITaskSettings_Release(set);
......
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