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
04f3c2bb
Commit
04f3c2bb
authored
Jun 05, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Update to IBackgroundCopyFile2.
parent
e1f9b916
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
69 deletions
+87
-69
enum_files.c
dlls/qmgr/enum_files.c
+7
-7
factory.c
dlls/qmgr/factory.c
+0
-2
file.c
dlls/qmgr/file.c
+73
-49
job.c
dlls/qmgr/job.c
+0
-1
qmgr.h
dlls/qmgr/qmgr.h
+4
-4
qmgr_local.idl
dlls/qmgr/qmgr_local.idl
+2
-0
qmgr_main.c
dlls/qmgr/qmgr_main.c
+1
-3
service.c
dlls/qmgr/service.c
+0
-3
No files found.
dlls/qmgr/enum_files.c
View file @
04f3c2bb
...
...
@@ -27,7 +27,7 @@ typedef struct
{
IEnumBackgroundCopyFiles
IEnumBackgroundCopyFiles_iface
;
LONG
ref
;
IBackgroundCopyFile
**
files
;
IBackgroundCopyFile
2
**
files
;
ULONG
numFiles
;
ULONG
indexFiles
;
}
EnumBackgroundCopyFilesImpl
;
...
...
@@ -75,7 +75,7 @@ static ULONG WINAPI EnumBackgroundCopyFiles_Release(IEnumBackgroundCopyFiles *if
if
(
ref
==
0
)
{
for
(
i
=
0
;
i
<
This
->
numFiles
;
i
++
)
IBackgroundCopyFile_Release
(
This
->
files
[
i
]);
IBackgroundCopyFile
2
_Release
(
This
->
files
[
i
]);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
files
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -90,7 +90,7 @@ static HRESULT WINAPI EnumBackgroundCopyFiles_Next(IEnumBackgroundCopyFiles *ifa
EnumBackgroundCopyFilesImpl
*
This
=
impl_from_IEnumBackgroundCopyFiles
(
iface
);
ULONG
fetched
;
ULONG
i
;
IBackgroundCopyFile
*
file
;
IBackgroundCopyFile
2
*
file
;
TRACE
(
"(%p)->(%d %p %p)
\n
"
,
This
,
celt
,
rgelt
,
pceltFetched
);
...
...
@@ -116,8 +116,8 @@ static HRESULT WINAPI EnumBackgroundCopyFiles_Next(IEnumBackgroundCopyFiles *ifa
for
(
i
=
0
;
i
<
fetched
;
i
++
)
{
file
=
This
->
files
[
This
->
indexFiles
++
];
IBackgroundCopyFile_AddRef
(
file
);
rgelt
[
i
]
=
file
;
IBackgroundCopyFile
2
_AddRef
(
file
);
rgelt
[
i
]
=
(
IBackgroundCopyFile
*
)
file
;
}
return
fetched
==
celt
?
S_OK
:
S_FALSE
;
...
...
@@ -215,8 +215,8 @@ HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl *job, IEnumBack
i
=
0
;
LIST_FOR_EACH_ENTRY
(
file
,
&
job
->
files
,
BackgroundCopyFileImpl
,
entryFromJob
)
{
IBackgroundCopyFile
_AddRef
(
&
file
->
IBackgroundCopyFile
_iface
);
This
->
files
[
i
]
=
&
file
->
IBackgroundCopyFile_iface
;
IBackgroundCopyFile
2_AddRef
(
&
file
->
IBackgroundCopyFile2
_iface
);
This
->
files
[
i
]
=
&
file
->
IBackgroundCopyFile
2
_iface
;
++
i
;
}
LeaveCriticalSection
(
&
job
->
cs
);
...
...
dlls/qmgr/factory.c
View file @
04f3c2bb
...
...
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "qmgr.h"
#include "wine/debug.h"
...
...
dlls/qmgr/file.c
View file @
04f3c2bb
...
...
@@ -20,69 +20,72 @@
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "ole2.h"
#include "urlmon.h"
#include "wininet.h"
#define COBJMACROS
#include "urlmon.h"
#include "qmgr.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
qmgr
);
static
inline
BackgroundCopyFileImpl
*
impl_from_IBackgroundCopyFile
(
IBackgroundCopyFile
*
iface
)
static
inline
BackgroundCopyFileImpl
*
impl_from_IBackgroundCopyFile2
(
IBackgroundCopyFile2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
BackgroundCopyFileImpl
,
IBackgroundCopyFile_iface
);
return
CONTAINING_RECORD
(
iface
,
BackgroundCopyFileImpl
,
IBackgroundCopyFile
2
_iface
);
}
static
HRESULT
WINAPI
BackgroundCopyFile_QueryInterface
(
IBackgroundCopyFile
*
iface
,
IBackgroundCopyFile
2
*
iface
,
REFIID
riid
,
void
**
obj
)
{
BackgroundCopyFileImpl
*
This
=
impl_from_IBackgroundCopyFile
(
iface
);
BackgroundCopyFileImpl
*
file
=
impl_from_IBackgroundCopyFile2
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
file
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IBackgroundCopyFile
))
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IBackgroundCopyFile
)
||
IsEqualGUID
(
riid
,
&
IID_IBackgroundCopyFile2
))
{
*
obj
=
iface
;
IBackgroundCopyFile_AddRef
(
iface
);
return
S_OK
;
}
else
{
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
*
obj
=
NULL
;
return
E_NOINTERFACE
;
IBackgroundCopyFile2_AddRef
(
iface
)
;
return
S_OK
;
}
static
ULONG
WINAPI
BackgroundCopyFile_AddRef
(
IBackgroundCopyFile
*
iface
)
static
ULONG
WINAPI
BackgroundCopyFile_AddRef
(
IBackgroundCopyFile2
*
iface
)
{
BackgroundCopyFileImpl
*
This
=
impl_from_IBackgroundCopyFile
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
BackgroundCopyFileImpl
*
file
=
impl_from_IBackgroundCopyFile2
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
file
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
file
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
BackgroundCopyFile_Release
(
IBackgroundCopyFile
*
iface
)
IBackgroundCopyFile
2
*
iface
)
{
BackgroundCopyFileImpl
*
This
=
impl_from_IBackgroundCopyFile
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
BackgroundCopyFileImpl
*
file
=
impl_from_IBackgroundCopyFile2
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
file
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
file
,
ref
);
if
(
ref
==
0
)
{
IBackgroundCopyJob2_Release
(
&
This
->
owner
->
IBackgroundCopyJob2_iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
info
.
LocalName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
info
.
RemoteName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
IBackgroundCopyJob2_Release
(
&
file
->
owner
->
IBackgroundCopyJob2_iface
);
HeapFree
(
GetProcessHeap
(),
0
,
file
->
info
.
LocalName
);
HeapFree
(
GetProcessHeap
(),
0
,
file
->
info
.
RemoteName
);
HeapFree
(
GetProcessHeap
(),
0
,
file
);
}
return
ref
;
...
...
@@ -90,52 +93,73 @@ static ULONG WINAPI BackgroundCopyFile_Release(
/* Get the remote name of a background copy file */
static
HRESULT
WINAPI
BackgroundCopyFile_GetRemoteName
(
IBackgroundCopyFile
*
iface
,
IBackgroundCopyFile
2
*
iface
,
LPWSTR
*
pVal
)
{
BackgroundCopyFileImpl
*
This
=
impl_from_IBackgroundCopyFile
(
iface
);
BackgroundCopyFileImpl
*
file
=
impl_from_IBackgroundCopyFile2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pVal
);
TRACE
(
"(%p)->(%p)
\n
"
,
file
,
pVal
);
return
return_strval
(
This
->
info
.
RemoteName
,
pVal
);
return
return_strval
(
file
->
info
.
RemoteName
,
pVal
);
}
static
HRESULT
WINAPI
BackgroundCopyFile_GetLocalName
(
IBackgroundCopyFile
*
iface
,
IBackgroundCopyFile
2
*
iface
,
LPWSTR
*
pVal
)
{
BackgroundCopyFileImpl
*
This
=
impl_from_IBackgroundCopyFile
(
iface
);
BackgroundCopyFileImpl
*
file
=
impl_from_IBackgroundCopyFile2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pVal
);
TRACE
(
"(%p)->(%p)
\n
"
,
file
,
pVal
);
return
return_strval
(
This
->
info
.
LocalName
,
pVal
);
return
return_strval
(
file
->
info
.
LocalName
,
pVal
);
}
static
HRESULT
WINAPI
BackgroundCopyFile_GetProgress
(
IBackgroundCopyFile
*
iface
,
IBackgroundCopyFile
2
*
iface
,
BG_FILE_PROGRESS
*
pVal
)
{
BackgroundCopyFileImpl
*
This
=
impl_from_IBackgroundCopyFile
(
iface
);
BackgroundCopyFileImpl
*
file
=
impl_from_IBackgroundCopyFile2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pVal
);
TRACE
(
"(%p)->(%p)
\n
"
,
file
,
pVal
);
EnterCriticalSection
(
&
This
->
owner
->
cs
);
pVal
->
BytesTotal
=
This
->
fileProgress
.
BytesTotal
;
pVal
->
BytesTransferred
=
This
->
fileProgress
.
BytesTransferred
;
pVal
->
Completed
=
This
->
fileProgress
.
Completed
;
LeaveCriticalSection
(
&
This
->
owner
->
cs
);
EnterCriticalSection
(
&
file
->
owner
->
cs
);
pVal
->
BytesTotal
=
file
->
fileProgress
.
BytesTotal
;
pVal
->
BytesTransferred
=
file
->
fileProgress
.
BytesTransferred
;
pVal
->
Completed
=
file
->
fileProgress
.
Completed
;
LeaveCriticalSection
(
&
file
->
owner
->
cs
);
return
S_OK
;
}
static
const
IBackgroundCopyFileVtbl
BackgroundCopyFileVtbl
=
static
HRESULT
WINAPI
BackgroundCopyFile_GetFileRanges
(
IBackgroundCopyFile2
*
iface
,
DWORD
*
RangeCount
,
BG_FILE_RANGE
**
Ranges
)
{
BackgroundCopyFileImpl
*
file
=
impl_from_IBackgroundCopyFile2
(
iface
);
FIXME
(
"(%p)->(%p %p)
\n
"
,
file
,
RangeCount
,
Ranges
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BackgroundCopyFile_SetRemoteName
(
IBackgroundCopyFile2
*
iface
,
LPCWSTR
Val
)
{
BackgroundCopyFileImpl
*
file
=
impl_from_IBackgroundCopyFile2
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
file
,
debugstr_w
(
Val
));
return
E_NOTIMPL
;
}
static
const
IBackgroundCopyFile2Vtbl
BackgroundCopyFile2Vtbl
=
{
BackgroundCopyFile_QueryInterface
,
BackgroundCopyFile_AddRef
,
BackgroundCopyFile_Release
,
BackgroundCopyFile_GetRemoteName
,
BackgroundCopyFile_GetLocalName
,
BackgroundCopyFile_GetProgress
BackgroundCopyFile_GetProgress
,
BackgroundCopyFile_GetFileRanges
,
BackgroundCopyFile_SetRemoteName
};
HRESULT
BackgroundCopyFileConstructor
(
BackgroundCopyJobImpl
*
owner
,
...
...
@@ -170,7 +194,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
}
memcpy
(
This
->
info
.
LocalName
,
localName
,
n
);
This
->
IBackgroundCopyFile
_iface
.
lpVtbl
=
&
BackgroundCopyFile
Vtbl
;
This
->
IBackgroundCopyFile
2_iface
.
lpVtbl
=
&
BackgroundCopyFile2
Vtbl
;
This
->
ref
=
1
;
This
->
fileProgress
.
BytesTotal
=
BG_SIZE_UNKNOWN
;
...
...
@@ -255,7 +279,7 @@ static ULONG WINAPI DLBindStatusCallback_Release(IBindStatusCallback *iface)
if
(
ref
==
0
)
{
IBackgroundCopyFile
_Release
(
&
This
->
file
->
IBackgroundCopyFile
_iface
);
IBackgroundCopyFile
2_Release
(
&
This
->
file
->
IBackgroundCopyFile2
_iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -365,7 +389,7 @@ static DLBindStatusCallback *DLBindStatusCallbackConstructor(
return
NULL
;
This
->
IBindStatusCallback_iface
.
lpVtbl
=
&
DLBindStatusCallback_Vtbl
;
IBackgroundCopyFile
_AddRef
(
&
file
->
IBackgroundCopyFile
_iface
);
IBackgroundCopyFile
2_AddRef
(
&
file
->
IBackgroundCopyFile2
_iface
);
This
->
file
=
file
;
This
->
ref
=
1
;
return
This
;
...
...
dlls/qmgr/job.c
View file @
04f3c2bb
...
...
@@ -22,7 +22,6 @@
#include "windef.h"
#include "winbase.h"
#include "qmgr.h"
#include "wine/debug.h"
...
...
dlls/qmgr/qmgr.h
View file @
04f3c2bb
...
...
@@ -22,11 +22,11 @@
#define __QMGR_H__
#include "windef.h"
#define COBJMACROS
#include "objbase.h"
#include "bits.h"
#include "bits1_5.h"
#include "bits2_0.h"
#include "bits2_5.h"
#include "bits3_0.h"
#include <string.h>
...
...
@@ -56,7 +56,7 @@ typedef struct
/* Background copy file vtbl and related data */
typedef
struct
{
IBackgroundCopyFile
IBackgroundCopyFile
_iface
;
IBackgroundCopyFile
2
IBackgroundCopyFile2
_iface
;
LONG
ref
;
BG_FILE_INFO
info
;
BG_FILE_PROGRESS
fileProgress
;
...
...
dlls/qmgr/qmgr_local.idl
View file @
04f3c2bb
...
...
@@ -22,4 +22,6 @@
#
define
DO_NO_IMPORTS
#
include
"bits1_5.idl"
#
include
"bits2_0.idl"
#
include
"bits2_5.idl"
#
include
"bits3_0.idl"
dlls/qmgr/qmgr_main.c
View file @
04f3c2bb
...
...
@@ -23,6 +23,7 @@
#include <stdio.h>
#define COBJMACROS
#include "objbase.h"
#include "winuser.h"
#include "winreg.h"
...
...
@@ -30,10 +31,7 @@
#include "olectl.h"
#include "rpcproxy.h"
#include "winsvc.h"
#include "bits.h"
#include "qmgr.h"
#include "initguid.h"
#include "wine/debug.h"
...
...
dlls/qmgr/service.c
View file @
04f3c2bb
...
...
@@ -19,10 +19,7 @@
*/
#include "windef.h"
#include "objbase.h"
#include "winsvc.h"
#include "bits.h"
#include "qmgr.h"
#include "wine/debug.h"
...
...
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