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
49e6d411
Commit
49e6d411
authored
Dec 05, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: COM cleanup for the IEnumBackgroundCopyFiles iface.
parent
da715453
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
50 deletions
+44
-50
enum_files.c
dlls/qmgr/enum_files.c
+44
-40
qmgr.h
dlls/qmgr/qmgr.h
+0
-10
No files found.
dlls/qmgr/enum_files.c
View file @
49e6d411
...
...
@@ -23,6 +23,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
qmgr
);
typedef
struct
{
IEnumBackgroundCopyFiles
IEnumBackgroundCopyFiles_iface
;
LONG
ref
;
IBackgroundCopyFile
**
files
;
ULONG
numFiles
;
ULONG
indexFiles
;
}
EnumBackgroundCopyFilesImpl
;
static
void
EnumBackgroundCopyFilesDestructor
(
EnumBackgroundCopyFilesImpl
*
This
)
{
ULONG
i
;
...
...
@@ -34,37 +43,39 @@ static void EnumBackgroundCopyFilesDestructor(EnumBackgroundCopyFilesImpl *This)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
ULONG
WINAPI
BITS_IEnumBackgroundCopyFiles_AddRef
(
IEnumBackgroundCopyFiles
*
iface
)
static
inline
EnumBackgroundCopyFilesImpl
*
impl_from_IEnumBackgroundCopyFiles
(
IEnumBackgroundCopyFiles
*
iface
)
{
EnumBackgroundCopyFilesImpl
*
This
=
(
EnumBackgroundCopyFilesImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
return
CONTAINING_RECORD
(
iface
,
EnumBackgroundCopyFilesImpl
,
IEnumBackgroundCopyFiles_iface
);
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_QueryInterface
(
IEnumBackgroundCopyFiles
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_QueryInterface
(
IEnumBackgroundCopyFiles
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
EnumBackgroundCopyFilesImpl
*
This
=
(
EnumBackgroundCopyFilesImpl
*
)
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_IEnumBackgroundCopyFiles
))
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IEnumBackgroundCopyFiles
))
{
*
ppv
Object
=
&
This
->
lpVtbl
;
BITS_
IEnumBackgroundCopyFiles_AddRef
(
iface
);
*
ppv
=
iface
;
IEnumBackgroundCopyFiles_AddRef
(
iface
);
return
S_OK
;
}
*
ppv
Object
=
NULL
;
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
BITS_IEnumBackgroundCopyFiles_Release
(
IEnumBackgroundCopyFiles
*
iface
)
static
ULONG
WINAPI
BITS_IEnumBackgroundCopyFiles_AddRef
(
IEnumBackgroundCopyFiles
*
iface
)
{
EnumBackgroundCopyFilesImpl
*
This
=
impl_from_IEnumBackgroundCopyFiles
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
BITS_IEnumBackgroundCopyFiles_Release
(
IEnumBackgroundCopyFiles
*
iface
)
{
EnumBackgroundCopyFilesImpl
*
This
=
(
EnumBackgroundCopyFilesImpl
*
)
iface
;
EnumBackgroundCopyFilesImpl
*
This
=
impl_from_IEnumBackgroundCopyFiles
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
...
...
@@ -74,13 +85,10 @@ static ULONG WINAPI BITS_IEnumBackgroundCopyFiles_Release(
}
/* Return reference to one or more files in the file enumerator */
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_Next
(
IEnumBackgroundCopyFiles
*
iface
,
ULONG
celt
,
IBackgroundCopyFile
**
rgelt
,
ULONG
*
pceltFetched
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_Next
(
IEnumBackgroundCopyFiles
*
iface
,
ULONG
celt
,
IBackgroundCopyFile
**
rgelt
,
ULONG
*
pceltFetched
)
{
EnumBackgroundCopyFilesImpl
*
This
=
(
EnumBackgroundCopyFilesImpl
*
)
iface
;
EnumBackgroundCopyFilesImpl
*
This
=
impl_from_IEnumBackgroundCopyFiles
(
iface
)
;
ULONG
fetched
;
ULONG
i
;
IBackgroundCopyFile
*
file
;
...
...
@@ -115,11 +123,10 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Next(
}
/* Skip over one or more files in the file enumerator */
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_Skip
(
IEnumBackgroundCopyFiles
*
iface
,
ULONG
celt
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_Skip
(
IEnumBackgroundCopyFiles
*
iface
,
ULONG
celt
)
{
EnumBackgroundCopyFilesImpl
*
This
=
(
EnumBackgroundCopyFilesImpl
*
)
iface
;
EnumBackgroundCopyFilesImpl
*
This
=
impl_from_IEnumBackgroundCopyFiles
(
iface
)
;
if
(
celt
>
This
->
numFiles
-
This
->
indexFiles
)
{
...
...
@@ -131,27 +138,24 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Skip(
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_Reset
(
IEnumBackgroundCopyFiles
*
iface
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_Reset
(
IEnumBackgroundCopyFiles
*
iface
)
{
EnumBackgroundCopyFilesImpl
*
This
=
(
EnumBackgroundCopyFilesImpl
*
)
iface
;
EnumBackgroundCopyFilesImpl
*
This
=
impl_from_IEnumBackgroundCopyFiles
(
iface
)
;
This
->
indexFiles
=
0
;
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_Clone
(
IEnumBackgroundCopyFiles
*
iface
,
IEnumBackgroundCopyFiles
**
ppenum
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_Clone
(
IEnumBackgroundCopyFiles
*
iface
,
IEnumBackgroundCopyFiles
**
ppenum
)
{
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_GetCount
(
IEnumBackgroundCopyFiles
*
iface
,
ULONG
*
puCount
)
static
HRESULT
WINAPI
BITS_IEnumBackgroundCopyFiles_GetCount
(
IEnumBackgroundCopyFiles
*
iface
,
ULONG
*
puCount
)
{
EnumBackgroundCopyFilesImpl
*
This
=
(
EnumBackgroundCopyFilesImpl
*
)
iface
;
EnumBackgroundCopyFilesImpl
*
This
=
impl_from_IEnumBackgroundCopyFiles
(
iface
)
;
*
puCount
=
This
->
numFiles
;
return
S_OK
;
}
...
...
@@ -181,7 +185,7 @@ HRESULT EnumBackgroundCopyFilesConstructor(LPVOID *ppObj, IBackgroundCopyJob2 *i
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
BITS_IEnumBackgroundCopyFiles_Vtbl
;
This
->
IEnumBackgroundCopyFiles_iface
.
lpVtbl
=
&
BITS_IEnumBackgroundCopyFiles_Vtbl
;
This
->
ref
=
1
;
/* Create array of files */
...
...
@@ -210,6 +214,6 @@ HRESULT EnumBackgroundCopyFilesConstructor(LPVOID *ppObj, IBackgroundCopyJob2 *i
}
LeaveCriticalSection
(
&
job
->
cs
);
*
ppObj
=
&
This
->
lpVtbl
;
*
ppObj
=
&
This
->
IEnumBackgroundCopyFiles_iface
;
return
S_OK
;
}
dlls/qmgr/qmgr.h
View file @
49e6d411
...
...
@@ -46,16 +46,6 @@ typedef struct
struct
list
entryFromQmgr
;
}
BackgroundCopyJobImpl
;
/* Enum background copy files vtbl and related data */
typedef
struct
{
const
IEnumBackgroundCopyFilesVtbl
*
lpVtbl
;
LONG
ref
;
IBackgroundCopyFile
**
files
;
ULONG
numFiles
;
ULONG
indexFiles
;
}
EnumBackgroundCopyFilesImpl
;
/* Background copy file 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