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
efff59a2
Commit
efff59a2
authored
Dec 04, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: COM cleanup for the IEnumBackgroundCopyJobs iface.
parent
2f7885d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
52 deletions
+48
-52
enum_jobs.c
dlls/qmgr/enum_jobs.c
+48
-42
qmgr.h
dlls/qmgr/qmgr.h
+0
-10
No files found.
dlls/qmgr/enum_jobs.c
View file @
efff59a2
...
...
@@ -23,6 +23,20 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
qmgr
);
typedef
struct
{
IEnumBackgroundCopyJobs
IEnumBackgroundCopyJobs_iface
;
LONG
ref
;
IBackgroundCopyJob
**
jobs
;
ULONG
numJobs
;
ULONG
indexJobs
;
}
EnumBackgroundCopyJobsImpl
;
static
inline
EnumBackgroundCopyJobsImpl
*
impl_from_IEnumBackgroundCopyJobs
(
IEnumBackgroundCopyJobs
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
EnumBackgroundCopyJobsImpl
,
IEnumBackgroundCopyJobs_iface
);
}
static
void
EnumBackgroundCopyJobsDestructor
(
EnumBackgroundCopyJobsImpl
*
This
)
{
ULONG
i
;
...
...
@@ -34,52 +48,49 @@ static void EnumBackgroundCopyJobsDestructor(EnumBackgroundCopyJobsImpl *This)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
ULONG
WINAPI
BITS_IEnumBackgroundCopyJobs_AddRef
(
IEnumBackgroundCopyJobs
*
iface
)
{
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_QueryInterface
(
IEnumBackgroundCopyJobs
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_QueryInterface
(
IEnumBackgroundCopyJobs
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
TRACE
(
"IID: %s
\n
"
,
debugstr_guid
(
riid
));
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IEnumBackgroundCopyJobs
))
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IEnumBackgroundCopyJobs
))
{
*
ppv
Object
=
&
This
->
lpVtbl
;
BITS_
IEnumBackgroundCopyJobs_AddRef
(
iface
);
*
ppv
=
iface
;
IEnumBackgroundCopyJobs_AddRef
(
iface
);
return
S_OK
;
}
*
ppv
Object
=
NULL
;
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
BITS_IEnumBackgroundCopyJobs_Release
(
IEnumBackgroundCopyJobs
*
iface
)
static
ULONG
WINAPI
BITS_IEnumBackgroundCopyJobs_AddRef
(
IEnumBackgroundCopyJobs
*
iface
)
{
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
EnumBackgroundCopyJobsImpl
*
This
=
impl_from_IEnumBackgroundCopyJobs
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
BITS_IEnumBackgroundCopyJobs_Release
(
IEnumBackgroundCopyJobs
*
iface
)
{
EnumBackgroundCopyJobsImpl
*
This
=
impl_from_IEnumBackgroundCopyJobs
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
EnumBackgroundCopyJobsDestructor
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Next
(
IEnumBackgroundCopyJobs
*
iface
,
ULONG
celt
,
IBackgroundCopyJob
**
rgelt
,
ULONG
*
pceltFetched
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Next
(
IEnumBackgroundCopyJobs
*
iface
,
ULONG
celt
,
IBackgroundCopyJob
**
rgelt
,
ULONG
*
pceltFetched
)
{
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
EnumBackgroundCopyJobsImpl
*
This
=
impl_from_IEnumBackgroundCopyJobs
(
iface
)
;
ULONG
fetched
;
ULONG
i
;
IBackgroundCopyJob
*
job
;
...
...
@@ -110,11 +121,9 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Next(
return
fetched
==
celt
?
S_OK
:
S_FALSE
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Skip
(
IEnumBackgroundCopyJobs
*
iface
,
ULONG
celt
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Skip
(
IEnumBackgroundCopyJobs
*
iface
,
ULONG
celt
)
{
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
EnumBackgroundCopyJobsImpl
*
This
=
impl_from_IEnumBackgroundCopyJobs
(
iface
)
;
if
(
This
->
numJobs
-
This
->
indexJobs
<
celt
)
{
...
...
@@ -126,27 +135,24 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Skip(
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Reset
(
IEnumBackgroundCopyJobs
*
iface
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Reset
(
IEnumBackgroundCopyJobs
*
iface
)
{
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
EnumBackgroundCopyJobsImpl
*
This
=
impl_from_IEnumBackgroundCopyJobs
(
iface
)
;
This
->
indexJobs
=
0
;
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Clone
(
IEnumBackgroundCopyJobs
*
iface
,
IEnumBackgroundCopyJobs
**
ppenum
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_Clone
(
IEnumBackgroundCopyJobs
*
iface
,
IEnumBackgroundCopyJobs
**
ppenum
)
{
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_GetCount
(
IEnumBackgroundCopyJobs
*
iface
,
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyJobs_GetCount
(
IEnumBackgroundCopyJobs
*
iface
,
ULONG
*
puCount
)
{
EnumBackgroundCopyJobsImpl
*
This
=
(
EnumBackgroundCopyJobsImpl
*
)
iface
;
EnumBackgroundCopyJobsImpl
*
This
=
impl_from_IEnumBackgroundCopyJobs
(
iface
)
;
*
puCount
=
This
->
numJobs
;
return
S_OK
;
}
...
...
@@ -174,7 +180,7 @@ HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCop
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
*
This
);
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
BITS_IEnumBackgroundCopyJobs_Vtbl
;
This
->
IEnumBackgroundCopyJobs_iface
.
lpVtbl
=
&
BITS_IEnumBackgroundCopyJobs_Vtbl
;
This
->
ref
=
1
;
/* Create array of jobs */
...
...
@@ -206,6 +212,6 @@ HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCop
}
LeaveCriticalSection
(
&
qmgr
->
cs
);
*
enumjob
=
(
IEnumBackgroundCopyJobs
*
)
&
This
->
lpVtbl
;
*
enumjob
=
&
This
->
IEnumBackgroundCopyJobs_iface
;
return
S_OK
;
}
dlls/qmgr/qmgr.h
View file @
efff59a2
...
...
@@ -46,16 +46,6 @@ typedef struct
struct
list
entryFromQmgr
;
}
BackgroundCopyJobImpl
;
/* Enum background copy jobs vtbl and related data */
typedef
struct
{
const
IEnumBackgroundCopyJobsVtbl
*
lpVtbl
;
LONG
ref
;
IBackgroundCopyJob
**
jobs
;
ULONG
numJobs
;
ULONG
indexJobs
;
}
EnumBackgroundCopyJobsImpl
;
/* Enum background copy files vtbl and related data */
typedef
struct
{
...
...
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