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
9f63253d
Commit
9f63253d
authored
Feb 25, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Feb 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Implement IBackgroundCopyManager_EnumJobs with test.
parent
00a3dceb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
2 deletions
+66
-2
enum_jobs.c
dlls/qmgr/enum_jobs.c
+17
-0
qmgr.c
dlls/qmgr/qmgr.c
+2
-2
qmgr.c
dlls/qmgr/tests/qmgr.c
+47
-0
No files found.
dlls/qmgr/enum_jobs.c
View file @
9f63253d
...
...
@@ -120,3 +120,20 @@ static const IEnumBackgroundCopyJobsVtbl BITS_IEnumBackgroundCopyJobs_Vtbl =
BITS_IEnumBackgroundCopyJobs_Clone
,
BITS_IEnumBackgroundCopyJobs_GetCount
};
HRESULT
EnumBackgroundCopyJobsConstructor
(
LPVOID
*
ppObj
,
IBackgroundCopyManager
*
copyManager
)
{
EnumBackgroundCopyJobsImpl
*
This
;
TRACE
(
"%p, %p)
\n
"
,
ppObj
,
copyManager
);
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
BITS_IEnumBackgroundCopyJobs_Vtbl
;
This
->
ref
=
1
;
*
ppObj
=
&
This
->
lpVtbl
;
return
S_OK
;
}
dlls/qmgr/qmgr.c
View file @
9f63253d
...
...
@@ -110,8 +110,8 @@ static HRESULT WINAPI BITS_IBackgroundCopyManager_EnumJobs(
DWORD
dwFlags
,
IEnumBackgroundCopyJobs
**
ppEnum
)
{
FIXME
(
"Not implemented
\n
"
);
return
E
_NOTIMPL
;
TRACE
(
"
\n
"
);
return
E
numBackgroundCopyJobsConstructor
((
LPVOID
*
)
ppEnum
,
iface
)
;
}
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_GetErrorDescription
(
...
...
dlls/qmgr/tests/qmgr.c
View file @
9f63253d
...
...
@@ -84,10 +84,57 @@ static void test_CreateJob(void)
IBackgroundCopyManager_Release
(
manager
);
}
static
void
test_EnumJobs
(
void
)
{
/* Job Enumerator */
IEnumBackgroundCopyJobs
*
enumJobs
;
static
const
WCHAR
copyNameW
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
0
};
IBackgroundCopyManager
*
manager
=
NULL
;
IBackgroundCopyJob
*
job
=
NULL
;
HRESULT
hres
;
GUID
tmpId
;
ULONG
res
;
/* Setup */
hres
=
CoCreateInstance
(
&
CLSID_BackgroundCopyManager
,
NULL
,
CLSCTX_LOCAL_SERVER
,
&
IID_IBackgroundCopyManager
,
(
void
**
)
&
manager
);
if
(
hres
!=
S_OK
)
{
skip
(
"Unable to create bits instance required for test.
\n
"
);
return
;
}
hres
=
IBackgroundCopyManager_CreateJob
(
manager
,
copyNameW
,
BG_JOB_TYPE_DOWNLOAD
,
&
tmpId
,
&
job
);
if
(
hres
!=
S_OK
)
{
skip
(
"Unable to create bits job.
\n
"
);
IBackgroundCopyManager_Release
(
manager
);
return
;
}
hres
=
IBackgroundCopyManager_EnumJobs
(
manager
,
0
,
&
enumJobs
);
ok
(
hres
==
S_OK
,
"EnumJobs failed: %08x
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
skip
(
"Unable to create job enumerator.
\n
"
);
else
{
res
=
IEnumBackgroundCopyJobs_Release
(
enumJobs
);
ok
(
res
==
0
,
"Bad ref count on release: %u
\n
"
,
res
);
}
/* Tear down */
IBackgroundCopyJob_Release
(
job
);
IBackgroundCopyManager_Release
(
manager
);
}
START_TEST
(
qmgr
)
{
CoInitialize
(
NULL
);
test_CreateInstance
();
test_CreateJob
();
test_EnumJobs
();
CoUninitialize
();
}
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