Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b0600964
Commit
b0600964
authored
Dec 24, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Dec 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Add ITaskService stub implementation.
parent
bf546ac8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
254 additions
and
0 deletions
+254
-0
Makefile.in
dlls/taskschd/Makefile.in
+1
-0
task.c
dlls/taskschd/task.c
+200
-0
taskschd.c
dlls/taskschd/taskschd.c
+32
-0
taskschd_private.h
dlls/taskschd/taskschd_private.h
+21
-0
No files found.
dlls/taskschd/Makefile.in
View file @
b0600964
MODULE
=
taskschd.dll
C_SRCS
=
\
task.c
\
taskschd.c
@MAKE_DLL_RULES@
dlls/taskschd/task.c
0 → 100644
View file @
b0600964
/*
* Copyright 2013 Dmitry Timoshkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "initguid.h"
#include "objbase.h"
#include "taskschd.h"
#include "taskschd_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
taskschd
);
typedef
struct
{
ITaskService
ITaskService_iface
;
LONG
ref
;
}
TaskService
;
static
inline
TaskService
*
impl_from_ITaskService
(
ITaskService
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
TaskService
,
ITaskService_iface
);
}
static
ULONG
WINAPI
TaskService_AddRef
(
ITaskService
*
iface
)
{
TaskService
*
task_svc
=
impl_from_ITaskService
(
iface
);
return
InterlockedIncrement
(
&
task_svc
->
ref
);
}
static
ULONG
WINAPI
TaskService_Release
(
ITaskService
*
iface
)
{
TaskService
*
task_svc
=
impl_from_ITaskService
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
task_svc
->
ref
);
if
(
!
ref
)
{
TRACE
(
"destroying %p
\n
"
,
iface
);
HeapFree
(
GetProcessHeap
(),
0
,
task_svc
);
}
return
ref
;
}
static
HRESULT
WINAPI
TaskService_QueryInterface
(
ITaskService
*
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_ITaskService
)
||
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
ITaskService_AddRef
(
iface
);
*
obj
=
iface
;
return
S_OK
;
}
FIXME
(
"interface %s is not implemented
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
HRESULT
WINAPI
TaskService_GetTypeInfoCount
(
ITaskService
*
iface
,
UINT
*
count
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_GetTypeInfo
(
ITaskService
*
iface
,
UINT
index
,
LCID
lcid
,
ITypeInfo
**
info
)
{
FIXME
(
"%p,%u,%u,%p: stub
\n
"
,
iface
,
index
,
lcid
,
info
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_GetIDsOfNames
(
ITaskService
*
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
TaskService_Invoke
(
ITaskService
*
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
TaskService_GetFolder
(
ITaskService
*
iface
,
BSTR
path
,
ITaskFolder
**
folder
)
{
FIXME
(
"%p,%s,%p: stub
\n
"
,
iface
,
debugstr_w
(
path
),
folder
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_GetRunningTasks
(
ITaskService
*
iface
,
LONG
flags
,
IRunningTaskCollection
**
tasks
)
{
FIXME
(
"%p,%x,%p: stub
\n
"
,
iface
,
flags
,
tasks
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_NewTask
(
ITaskService
*
iface
,
DWORD
flags
,
ITaskDefinition
**
definition
)
{
FIXME
(
"%p,%x,%p: stub
\n
"
,
iface
,
flags
,
definition
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_Connect
(
ITaskService
*
iface
,
VARIANT
server
,
VARIANT
user
,
VARIANT
domain
,
VARIANT
password
)
{
FIXME
(
"%p,%s,%s,%s,%s: stub
\n
"
,
iface
,
debugstr_variant
(
&
server
),
debugstr_variant
(
&
user
),
debugstr_variant
(
&
domain
),
debugstr_variant
(
&
password
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_get_Connected
(
ITaskService
*
iface
,
VARIANT_BOOL
*
connected
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
connected
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_get_TargetServer
(
ITaskService
*
iface
,
BSTR
*
server
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
server
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_get_ConnectedUser
(
ITaskService
*
iface
,
BSTR
*
user
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
user
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_get_ConnectedDomain
(
ITaskService
*
iface
,
BSTR
*
domain
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
domain
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TaskService_get_HighestVersion
(
ITaskService
*
iface
,
DWORD
*
version
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
version
);
return
E_NOTIMPL
;
}
static
const
ITaskServiceVtbl
TaskService_vtbl
=
{
TaskService_QueryInterface
,
TaskService_AddRef
,
TaskService_Release
,
TaskService_GetTypeInfoCount
,
TaskService_GetTypeInfo
,
TaskService_GetIDsOfNames
,
TaskService_Invoke
,
TaskService_GetFolder
,
TaskService_GetRunningTasks
,
TaskService_NewTask
,
TaskService_Connect
,
TaskService_get_Connected
,
TaskService_get_TargetServer
,
TaskService_get_ConnectedUser
,
TaskService_get_ConnectedDomain
,
TaskService_get_HighestVersion
};
HRESULT
TaskService_create
(
void
**
obj
)
{
TaskService
*
task_svc
;
task_svc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
task_svc
));
if
(
!
task_svc
)
return
E_OUTOFMEMORY
;
task_svc
->
ITaskService_iface
.
lpVtbl
=
&
TaskService_vtbl
;
task_svc
->
ref
=
1
;
*
obj
=
&
task_svc
->
ITaskService_iface
;
TRACE
(
"created %p
\n
"
,
*
obj
);
return
S_OK
;
}
dlls/taskschd/taskschd.c
View file @
b0600964
...
...
@@ -25,6 +25,7 @@
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "wine/debug.h"
...
...
@@ -46,3 +47,34 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
}
return
TRUE
;
}
const
char
*
debugstr_variant
(
const
VARIANT
*
v
)
{
if
(
!
v
)
return
"(null)"
;
switch
(
V_VT
(
v
))
{
case
VT_EMPTY
:
return
"{VT_EMPTY}"
;
case
VT_NULL
:
return
"{VT_NULL}"
;
case
VT_I2
:
return
wine_dbg_sprintf
(
"{VT_I2: %d}"
,
V_I2
(
v
));
case
VT_I4
:
return
wine_dbg_sprintf
(
"{VT_I4: %d}"
,
V_I4
(
v
));
case
VT_R8
:
return
wine_dbg_sprintf
(
"{VT_R8: %lf}"
,
V_R8
(
v
));
case
VT_BSTR
:
return
wine_dbg_sprintf
(
"{VT_BSTR: %s}"
,
debugstr_w
(
V_BSTR
(
v
)));
case
VT_DISPATCH
:
return
wine_dbg_sprintf
(
"{VT_DISPATCH: %p}"
,
V_DISPATCH
(
v
));
case
VT_ERROR
:
return
wine_dbg_sprintf
(
"{VT_ERROR: %08x}"
,
V_ERROR
(
v
));
case
VT_BOOL
:
return
wine_dbg_sprintf
(
"{VT_BOOL: %x}"
,
V_BOOL
(
v
));
case
VT_UINT
:
return
wine_dbg_sprintf
(
"{VT_UINT: %u}"
,
V_UINT
(
v
));
default:
return
wine_dbg_sprintf
(
"{vt %d}"
,
V_VT
(
v
));
}
}
dlls/taskschd/taskschd_private.h
0 → 100644
View file @
b0600964
/*
* Copyright 2013 Dmitry Timoshkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
HRESULT
TaskService_create
(
void
**
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