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
a3fdfa22
Commit
a3fdfa22
authored
Dec 04, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: COM cleanup for the IBackgroundCopyManager iface.
parent
cd465edb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
47 deletions
+27
-47
qmgr.c
dlls/qmgr/qmgr.c
+26
-46
qmgr.h
dlls/qmgr/qmgr.h
+1
-1
No files found.
dlls/qmgr/qmgr.c
View file @
a3fdfa22
...
@@ -23,52 +23,39 @@
...
@@ -23,52 +23,39 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
qmgr
);
WINE_DEFAULT_DEBUG_CHANNEL
(
qmgr
);
/* Add a reference to the iface pointer */
BackgroundCopyManagerImpl
globalMgr
;
static
ULONG
WINAPI
BITS_IBackgroundCopyManager_AddRef
(
IBackgroundCopyManager
*
iface
)
{
return
2
;
}
/* Attempt to provide a new interface to interact with iface */
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_QueryInterface
(
IBackgroundCopyManager
*
iface
,
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_QueryInterface
(
REFIID
riid
,
void
**
ppv
)
IBackgroundCopyManager
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObject
)
{
{
BackgroundCopyManagerImpl
*
This
=
(
BackgroundCopyManagerImpl
*
)
iface
;
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"IID: %s
\n
"
,
debugstr_guid
(
riid
));
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IBackgroundCopyManager
))
IsEqualGUID
(
riid
,
&
IID_IBackgroundCopyManager
))
{
{
*
ppv
Object
=
&
This
->
lpVtbl
;
*
ppv
=
iface
;
BITS_
IBackgroundCopyManager_AddRef
(
iface
);
IBackgroundCopyManager_AddRef
(
iface
);
return
S_OK
;
return
S_OK
;
}
}
*
ppv
Object
=
NULL
;
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
/* Release an interface to iface */
static
ULONG
WINAPI
BITS_IBackgroundCopyManager_AddRef
(
IBackgroundCopyManager
*
iface
)
static
ULONG
WINAPI
BITS_IBackgroundCopyManager_Release
(
{
IBackgroundCopyManager
*
iface
)
return
2
;
}
static
ULONG
WINAPI
BITS_IBackgroundCopyManager_Release
(
IBackgroundCopyManager
*
iface
)
{
{
return
1
;
return
1
;
}
}
/*** IBackgroundCopyManager interface methods ***/
/*** IBackgroundCopyManager interface methods ***/
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_CreateJob
(
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_CreateJob
(
IBackgroundCopyManager
*
iface
,
IBackgroundCopyManager
*
iface
,
LPCWSTR
DisplayName
,
BG_JOB_TYPE
Type
,
GUID
*
pJobId
,
IBackgroundCopyJob
**
ppJob
)
LPCWSTR
DisplayName
,
BG_JOB_TYPE
Type
,
GUID
*
pJobId
,
IBackgroundCopyJob
**
ppJob
)
{
{
BackgroundCopyManagerImpl
*
This
=
(
BackgroundCopyManagerImpl
*
)
iface
;
BackgroundCopyJobImpl
*
job
;
BackgroundCopyJobImpl
*
job
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
...
@@ -81,35 +68,28 @@ static HRESULT WINAPI BITS_IBackgroundCopyManager_CreateJob(
...
@@ -81,35 +68,28 @@ static HRESULT WINAPI BITS_IBackgroundCopyManager_CreateJob(
/* Add a reference to the job to job list */
/* Add a reference to the job to job list */
IBackgroundCopyJob_AddRef
(
*
ppJob
);
IBackgroundCopyJob_AddRef
(
*
ppJob
);
job
=
(
BackgroundCopyJobImpl
*
)
*
ppJob
;
job
=
(
BackgroundCopyJobImpl
*
)
*
ppJob
;
EnterCriticalSection
(
&
This
->
cs
);
EnterCriticalSection
(
&
globalMgr
.
cs
);
list_add_head
(
&
This
->
jobs
,
&
job
->
entryFromQmgr
);
list_add_head
(
&
globalMgr
.
jobs
,
&
job
->
entryFromQmgr
);
LeaveCriticalSection
(
&
This
->
cs
);
LeaveCriticalSection
(
&
globalMgr
.
cs
);
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_GetJob
(
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_GetJob
(
IBackgroundCopyManager
*
iface
,
IBackgroundCopyManager
*
iface
,
REFGUID
jobID
,
IBackgroundCopyJob
**
ppJob
)
REFGUID
jobID
,
IBackgroundCopyJob
**
ppJob
)
{
{
FIXME
(
"Not implemented
\n
"
);
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_EnumJobs
(
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_EnumJobs
(
IBackgroundCopyManager
*
iface
,
IBackgroundCopyManager
*
iface
,
DWORD
dwFlags
,
IEnumBackgroundCopyJobs
**
ppEnum
)
DWORD
dwFlags
,
IEnumBackgroundCopyJobs
**
ppEnum
)
{
{
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
return
EnumBackgroundCopyJobsConstructor
((
LPVOID
*
)
ppEnum
,
iface
);
return
EnumBackgroundCopyJobsConstructor
((
LPVOID
*
)
ppEnum
,
iface
);
}
}
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_GetErrorDescription
(
static
HRESULT
WINAPI
BITS_IBackgroundCopyManager_GetErrorDescription
(
IBackgroundCopyManager
*
iface
,
IBackgroundCopyManager
*
iface
,
HRESULT
hResult
,
DWORD
LanguageId
,
LPWSTR
*
pErrorDescription
)
HRESULT
hResult
,
DWORD
LanguageId
,
LPWSTR
*
pErrorDescription
)
{
{
FIXME
(
"Not implemented
\n
"
);
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
...
@@ -128,7 +108,7 @@ static const IBackgroundCopyManagerVtbl BITS_IBackgroundCopyManager_Vtbl =
...
@@ -128,7 +108,7 @@ static const IBackgroundCopyManagerVtbl BITS_IBackgroundCopyManager_Vtbl =
};
};
BackgroundCopyManagerImpl
globalMgr
=
{
BackgroundCopyManagerImpl
globalMgr
=
{
&
BITS_IBackgroundCopyManager_Vtbl
,
{
&
BITS_IBackgroundCopyManager_Vtbl
}
,
{
NULL
,
-
1
,
0
,
0
,
0
,
0
},
{
NULL
,
-
1
,
0
,
0
,
0
,
0
},
NULL
,
NULL
,
LIST_INIT
(
globalMgr
.
jobs
)
LIST_INIT
(
globalMgr
.
jobs
)
...
...
dlls/qmgr/qmgr.h
View file @
a3fdfa22
...
@@ -81,7 +81,7 @@ typedef struct
...
@@ -81,7 +81,7 @@ typedef struct
/* Background copy manager vtbl and related data */
/* Background copy manager vtbl and related data */
typedef
struct
typedef
struct
{
{
const
IBackgroundCopyManagerVtbl
*
lpVtbl
;
IBackgroundCopyManager
IBackgroundCopyManager_iface
;
/* Protects job list, job states, and jobEvent */
/* Protects job list, job states, and jobEvent */
CRITICAL_SECTION
cs
;
CRITICAL_SECTION
cs
;
HANDLE
jobEvent
;
HANDLE
jobEvent
;
...
...
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