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
2201d7b0
Commit
2201d7b0
authored
Feb 05, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Add IRegisteredTaskCollection stub implementation.
parent
4bd02f8e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
2 deletions
+137
-2
folder.c
dlls/taskschd/folder.c
+7
-2
regtask.c
dlls/taskschd/regtask.c
+129
-0
taskschd_private.h
dlls/taskschd/taskschd_private.h
+1
-0
No files found.
dlls/taskschd/folder.c
View file @
2201d7b0
...
...
@@ -298,8 +298,13 @@ static HRESULT WINAPI TaskFolder_GetTask(ITaskFolder *iface, BSTR path, IRegiste
static
HRESULT
WINAPI
TaskFolder_GetTasks
(
ITaskFolder
*
iface
,
LONG
flags
,
IRegisteredTaskCollection
**
tasks
)
{
FIXME
(
"%p,%x,%p: stub
\n
"
,
iface
,
flags
,
tasks
);
return
E_NOTIMPL
;
TaskFolder
*
folder
=
impl_from_ITaskFolder
(
iface
);
TRACE
(
"%p,%x,%p: stub
\n
"
,
iface
,
flags
,
tasks
);
if
(
!
tasks
)
return
E_POINTER
;
return
RegisteredTaskCollection_create
(
folder
->
path
,
tasks
);
}
static
HRESULT
WINAPI
TaskFolder_DeleteTask
(
ITaskFolder
*
iface
,
BSTR
name
,
LONG
flags
)
...
...
dlls/taskschd/regtask.c
View file @
2201d7b0
...
...
@@ -267,3 +267,132 @@ HRESULT RegisteredTask_create(const WCHAR *path, IRegisteredTask **obj)
return
S_OK
;
}
typedef
struct
{
IRegisteredTaskCollection
IRegisteredTaskCollection_iface
;
LONG
ref
;
WCHAR
*
path
;
}
RegisteredTaskCollection
;
static
inline
RegisteredTaskCollection
*
impl_from_IRegisteredTaskCollection
(
IRegisteredTaskCollection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
RegisteredTaskCollection
,
IRegisteredTaskCollection_iface
);
}
static
ULONG
WINAPI
regtasks_AddRef
(
IRegisteredTaskCollection
*
iface
)
{
RegisteredTaskCollection
*
regtasks
=
impl_from_IRegisteredTaskCollection
(
iface
);
return
InterlockedIncrement
(
&
regtasks
->
ref
);
}
static
ULONG
WINAPI
regtasks_Release
(
IRegisteredTaskCollection
*
iface
)
{
RegisteredTaskCollection
*
regtasks
=
impl_from_IRegisteredTaskCollection
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
regtasks
->
ref
);
if
(
!
ref
)
{
TRACE
(
"destroying %p
\n
"
,
iface
);
heap_free
(
regtasks
->
path
);
heap_free
(
regtasks
);
}
return
ref
;
}
static
HRESULT
WINAPI
regtasks_QueryInterface
(
IRegisteredTaskCollection
*
iface
,
REFIID
riid
,
void
**
obj
)
{
if
(
!
riid
||
!
obj
)
return
E_INVALIDARG
;
TRACE
(
"%p,%s,%p
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IRegisteredTaskCollection
)
||
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
IRegisteredTaskCollection_AddRef
(
iface
);
*
obj
=
iface
;
return
S_OK
;
}
FIXME
(
"interface %s is not implemented
\n
"
,
debugstr_guid
(
riid
));
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
HRESULT
WINAPI
regtasks_GetTypeInfoCount
(
IRegisteredTaskCollection
*
iface
,
UINT
*
count
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
regtasks_GetTypeInfo
(
IRegisteredTaskCollection
*
iface
,
UINT
index
,
LCID
lcid
,
ITypeInfo
**
info
)
{
FIXME
(
"%p,%u,%u,%p: stub
\n
"
,
iface
,
index
,
lcid
,
info
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
regtasks_GetIDsOfNames
(
IRegisteredTaskCollection
*
iface
,
REFIID
riid
,
LPOLESTR
*
names
,
UINT
count
,
LCID
lcid
,
DISPID
*
dispid
)
{
FIXME
(
"%p,%s,%p,%u,%u,%p: stub
\n
"
,
iface
,
debugstr_guid
(
riid
),
names
,
count
,
lcid
,
dispid
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
regtasks_Invoke
(
IRegisteredTaskCollection
*
iface
,
DISPID
dispid
,
REFIID
riid
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
result
,
EXCEPINFO
*
excepinfo
,
UINT
*
argerr
)
{
FIXME
(
"%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub
\n
"
,
iface
,
dispid
,
debugstr_guid
(
riid
),
lcid
,
flags
,
params
,
result
,
excepinfo
,
argerr
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
regtasks_get_Count
(
IRegisteredTaskCollection
*
iface
,
LONG
*
count
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
regtasks_get_Item
(
IRegisteredTaskCollection
*
iface
,
VARIANT
index
,
IRegisteredTask
**
regtask
)
{
FIXME
(
"%p,%s,%p: stub
\n
"
,
iface
,
debugstr_variant
(
&
index
),
regtask
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
regtasks_get__NewEnum
(
IRegisteredTaskCollection
*
iface
,
IUnknown
**
penum
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
penum
);
return
E_NOTIMPL
;
}
static
const
IRegisteredTaskCollectionVtbl
RegisteredTaskCollection_vtbl
=
{
regtasks_QueryInterface
,
regtasks_AddRef
,
regtasks_Release
,
regtasks_GetTypeInfoCount
,
regtasks_GetTypeInfo
,
regtasks_GetIDsOfNames
,
regtasks_Invoke
,
regtasks_get_Count
,
regtasks_get_Item
,
regtasks_get__NewEnum
};
HRESULT
RegisteredTaskCollection_create
(
const
WCHAR
*
path
,
IRegisteredTaskCollection
**
obj
)
{
RegisteredTaskCollection
*
regtasks
;
regtasks
=
heap_alloc
(
sizeof
(
*
regtasks
));
if
(
!
regtasks
)
return
E_OUTOFMEMORY
;
regtasks
->
IRegisteredTaskCollection_iface
.
lpVtbl
=
&
RegisteredTaskCollection_vtbl
;
regtasks
->
ref
=
1
;
regtasks
->
path
=
heap_strdupW
(
path
);
*
obj
=
&
regtasks
->
IRegisteredTaskCollection_iface
;
TRACE
(
"created %p
\n
"
,
*
obj
);
return
S_OK
;
}
dlls/taskschd/taskschd_private.h
View file @
2201d7b0
...
...
@@ -22,6 +22,7 @@ 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
RegisteredTaskCollection_create
(
const
WCHAR
*
path
,
IRegisteredTaskCollection
**
obj
)
DECLSPEC_HIDDEN
;
const
char
*
debugstr_variant
(
const
VARIANT
*
v
)
DECLSPEC_HIDDEN
;
...
...
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