Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a20b10e4
Commit
a20b10e4
authored
Feb 11, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Forward ITaskFolder::RegisterTask to IRegisterTask constructor.
parent
e4eee4dd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
12 deletions
+39
-12
folder.c
dlls/taskschd/folder.c
+26
-6
regtask.c
dlls/taskschd/regtask.c
+2
-1
taskschd_private.h
dlls/taskschd/taskschd_private.h
+7
-1
scheduler.c
dlls/taskschd/tests/scheduler.c
+4
-4
No files found.
dlls/taskschd/folder.c
View file @
a20b10e4
...
...
@@ -287,13 +287,15 @@ static HRESULT WINAPI TaskFolder_DeleteFolder(ITaskFolder *iface, BSTR name, LON
return
reg_delete_folder
(
folder
->
path
,
name
);
}
static
HRESULT
WINAPI
TaskFolder_GetTask
(
ITaskFolder
*
iface
,
BSTR
path
,
IRegisteredTask
**
task
)
static
HRESULT
WINAPI
TaskFolder_GetTask
(
ITaskFolder
*
iface
,
BSTR
name
,
IRegisteredTask
**
task
)
{
TRACE
(
"%p,%s,%p
\n
"
,
iface
,
debugstr_w
(
path
),
task
);
TaskFolder
*
folder
=
impl_from_ITaskFolder
(
iface
);
TRACE
(
"%p,%s,%p
\n
"
,
iface
,
debugstr_w
(
name
),
task
);
if
(
!
task
)
return
E_POINTER
;
return
RegisteredTask_create
(
path
,
task
);
return
RegisteredTask_create
(
folder
->
path
,
name
,
NULL
,
0
,
task
,
FALSE
);
}
static
HRESULT
WINAPI
TaskFolder_GetTasks
(
ITaskFolder
*
iface
,
LONG
flags
,
IRegisteredTaskCollection
**
tasks
)
...
...
@@ -313,13 +315,31 @@ static HRESULT WINAPI TaskFolder_DeleteTask(ITaskFolder *iface, BSTR name, LONG
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskFolder_RegisterTask
(
ITaskFolder
*
iface
,
BSTR
path
,
BSTR
xml
,
LONG
flags
,
static
HRESULT
WINAPI
TaskFolder_RegisterTask
(
ITaskFolder
*
iface
,
BSTR
name
,
BSTR
xml
,
LONG
flags
,
VARIANT
user
,
VARIANT
password
,
TASK_LOGON_TYPE
logon
,
VARIANT
sddl
,
IRegisteredTask
**
task
)
{
FIXME
(
"%p,%s,%s,%x,%s,%s,%d,%s,%p: stub
\n
"
,
iface
,
debugstr_w
(
path
),
debugstr_w
(
xml
),
flags
,
TaskFolder
*
folder
=
impl_from_ITaskFolder
(
iface
);
IRegisteredTask
*
regtask
=
NULL
;
HRESULT
hr
;
FIXME
(
"%p,%s,%s,%x,%s,%s,%d,%s,%p: stub
\n
"
,
iface
,
debugstr_w
(
name
),
debugstr_w
(
xml
),
flags
,
debugstr_variant
(
&
user
),
debugstr_variant
(
&
password
),
logon
,
debugstr_variant
(
&
sddl
),
task
);
return
E_NOTIMPL
;
if
(
!
is_variant_null
(
&
sddl
))
FIXME
(
"security descriptor %s is ignored
\n
"
,
debugstr_variant
(
&
sddl
));
if
(
!
is_variant_null
(
&
user
)
||
!
is_variant_null
(
&
password
))
FIXME
(
"user/password are ignored
\n
"
);
if
(
!
task
)
task
=
&
regtask
;
hr
=
RegisteredTask_create
(
folder
->
path
,
name
,
xml
,
logon
,
task
,
TRUE
);
if
(
regtask
)
IRegisteredTask_Release
(
regtask
);
return
hr
;
}
static
HRESULT
WINAPI
TaskFolder_RegisterTaskDefinition
(
ITaskFolder
*
iface
,
BSTR
path
,
ITaskDefinition
*
definition
,
LONG
flags
,
...
...
dlls/taskschd/regtask.c
View file @
a20b10e4
...
...
@@ -251,7 +251,8 @@ static const IRegisteredTaskVtbl RegisteredTask_vtbl =
regtask_GetRunTimes
};
HRESULT
RegisteredTask_create
(
const
WCHAR
*
path
,
IRegisteredTask
**
obj
)
HRESULT
RegisteredTask_create
(
const
WCHAR
*
path
,
const
WCHAR
*
name
,
const
WCHAR
*
xml
,
TASK_LOGON_TYPE
logon
,
IRegisteredTask
**
obj
,
BOOL
create
)
{
RegisteredTask
*
regtask
;
...
...
dlls/taskschd/taskschd_private.h
View file @
a20b10e4
...
...
@@ -16,12 +16,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_TASKSCHD_PRIVATE_H__
#define __WINE_TASKSCHD_PRIVATE_H__
#include "wine/unicode.h"
HRESULT
TaskService_create
(
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
TaskFolder_create
(
const
WCHAR
*
parent
,
const
WCHAR
*
path
,
ITaskFolder
**
obj
,
BOOL
create
)
DECLSPEC_HIDDEN
;
HRESULT
TaskFolderCollection_create
(
const
WCHAR
*
path
,
ITaskFolderCollection
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
RegisteredTask_create
(
const
WCHAR
*
path
,
IRegisteredTask
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
RegisteredTask_create
(
const
WCHAR
*
path
,
const
WCHAR
*
name
,
const
WCHAR
*
xml
,
TASK_LOGON_TYPE
logon
,
IRegisteredTask
**
obj
,
BOOL
create
)
DECLSPEC_HIDDEN
;
HRESULT
RegisteredTaskCollection_create
(
const
WCHAR
*
path
,
IRegisteredTaskCollection
**
obj
)
DECLSPEC_HIDDEN
;
const
char
*
debugstr_variant
(
const
VARIANT
*
v
)
DECLSPEC_HIDDEN
;
...
...
@@ -52,3 +56,5 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
if
((
dst
=
heap_alloc
(
len
)))
memcpy
(
dst
,
src
,
len
);
return
dst
;
}
#endif
/* __WINE_TASKSCHD_PRIVATE_H__ */
dlls/taskschd/tests/scheduler.c
View file @
a20b10e4
...
...
@@ -734,7 +734,6 @@ static void test_GetTask(void)
MultiByteToWideChar
(
CP_ACP
,
0
,
xml1
,
-
1
,
xmlW
,
sizeof
(
xmlW
)
/
sizeof
(
xmlW
[
0
]));
hr
=
ITaskFolder_RegisterTask
(
root
,
Wine_Task1
,
xmlW
,
TASK_CREATE
,
v_null
,
v_null
,
TASK_LOGON_NONE
,
v_null
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"RegisterTask error %#x
\n
"
,
hr
);
hr
=
ITaskFolder_RegisterTask
(
root
,
Wine_Task1
,
xmlW
,
TASK_CREATE
,
v_null
,
v_null
,
TASK_LOGON_NONE
,
v_null
,
&
task1
);
...
...
@@ -742,16 +741,17 @@ todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_ALREADY_EXISTS
),
"expected ERROR_ALREADY_EXISTS, got %#x
\n
"
,
hr
);
hr
=
ITaskFolder_RegisterTask
(
root
,
Wine_Task1
,
xmlW
,
TASK_CREATE_OR_UPDATE
,
v_null
,
v_null
,
TASK_LOGON_NONE
,
v_null
,
&
task1
);
todo_wine
ok
(
hr
==
S_OK
,
"RegisterTask error %#x
\n
"
,
hr
);
/* FIXME: Remove once implemented */
if
(
hr
!=
S_OK
)
goto
failed
;
hr
=
IRegisteredTask_get_Name
(
task1
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"expected E_POINTER, got %#x
\n
"
,
hr
);
hr
=
IRegisteredTask_get_Name
(
task1
,
&
bstr
);
todo_wine
ok
(
hr
==
S_OK
,
"get_Name error %#x
\n
"
,
hr
);
/* FIXME: Remove once implemented */
if
(
hr
!=
S_OK
)
goto
failed
;
ok
(
!
lstrcmpW
(
bstr
,
Task1
),
"expected Task1, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
IRegisteredTask_get_Path
(
task1
,
&
bstr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment