taskschd: Implement ITaskDefinition_put_Triggers.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5083f2a589
commit
96cf60ecac
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue