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
5cbd28aa
Commit
5cbd28aa
authored
Dec 03, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Implement AddFile() with AddFileSet().
parent
5092ecf6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
job.c
dlls/qmgr/job.c
+23
-21
No files found.
dlls/qmgr/job.c
View file @
5cbd28aa
...
@@ -95,46 +95,48 @@ static HRESULT WINAPI BackgroundCopyJob_AddFileSet(
...
@@ -95,46 +95,48 @@ static HRESULT WINAPI BackgroundCopyJob_AddFileSet(
BG_FILE_INFO
*
pFileSet
)
BG_FILE_INFO
*
pFileSet
)
{
{
BackgroundCopyJobImpl
*
This
=
impl_from_IBackgroundCopyJob2
(
iface
);
BackgroundCopyJobImpl
*
This
=
impl_from_IBackgroundCopyJob2
(
iface
);
HRESULT
hr
=
S_OK
;
ULONG
i
;
ULONG
i
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
cFileCount
,
pFileSet
);
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
cFileCount
,
pFileSet
);
EnterCriticalSection
(
&
This
->
cs
);
for
(
i
=
0
;
i
<
cFileCount
;
++
i
)
for
(
i
=
0
;
i
<
cFileCount
;
++
i
)
{
{
HRESULT
hr
=
IBackgroundCopyJob2_AddFile
(
iface
,
pFileSet
[
i
].
RemoteName
,
pFileSet
[
i
].
LocalName
);
if
(
FAILED
(
hr
))
return
hr
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
BackgroundCopyJob_AddFile
(
IBackgroundCopyJob2
*
iface
,
LPCWSTR
RemoteUrl
,
LPCWSTR
LocalName
)
{
BackgroundCopyJobImpl
*
This
=
impl_from_IBackgroundCopyJob2
(
iface
);
BackgroundCopyFileImpl
*
file
;
BackgroundCopyFileImpl
*
file
;
HRESULT
res
;
TRACE
(
"(%p)->(%s %s)
\n
"
,
This
,
debugstr_w
(
RemoteUrl
),
debugstr_w
(
LocalName
));
/* We should return E_INVALIDARG in these cases. */
/* We should return E_INVALIDARG in these cases. */
FIXME
(
"Check for valid filenames and supported protocols
\n
"
);
FIXME
(
"Check for valid filenames and supported protocols
\n
"
);
res
=
BackgroundCopyFileConstructor
(
This
,
RemoteUrl
,
LocalName
,
&
file
);
hr
=
BackgroundCopyFileConstructor
(
This
,
pFileSet
[
i
].
RemoteName
,
pFileSet
[
i
].
LocalName
,
&
file
);
if
(
res
!=
S_OK
)
if
(
hr
!=
S_OK
)
break
;
return
res
;
/* Add a reference to the file to file list */
/* Add a reference to the file to file list */
IBackgroundCopyFile_AddRef
(
&
file
->
IBackgroundCopyFile_iface
);
IBackgroundCopyFile_AddRef
(
&
file
->
IBackgroundCopyFile_iface
);
EnterCriticalSection
(
&
This
->
cs
);
list_add_head
(
&
This
->
files
,
&
file
->
entryFromJob
);
list_add_head
(
&
This
->
files
,
&
file
->
entryFromJob
);
This
->
jobProgress
.
BytesTotal
=
BG_SIZE_UNKNOWN
;
This
->
jobProgress
.
BytesTotal
=
BG_SIZE_UNKNOWN
;
++
This
->
jobProgress
.
FilesTotal
;
++
This
->
jobProgress
.
FilesTotal
;
}
LeaveCriticalSection
(
&
This
->
cs
);
LeaveCriticalSection
(
&
This
->
cs
);
return
S_OK
;
return
hr
;
}
static
HRESULT
WINAPI
BackgroundCopyJob_AddFile
(
IBackgroundCopyJob2
*
iface
,
LPCWSTR
RemoteUrl
,
LPCWSTR
LocalName
)
{
BackgroundCopyJobImpl
*
This
=
impl_from_IBackgroundCopyJob2
(
iface
);
BG_FILE_INFO
file
;
TRACE
(
"(%p)->(%s %s)
\n
"
,
This
,
debugstr_w
(
RemoteUrl
),
debugstr_w
(
LocalName
));
file
.
RemoteName
=
(
LPWSTR
)
RemoteUrl
;
file
.
LocalName
=
(
LPWSTR
)
LocalName
;
return
IBackgroundCopyJob2_AddFileSet
(
iface
,
1
,
&
file
);
}
}
static
HRESULT
WINAPI
BackgroundCopyJob_EnumFiles
(
static
HRESULT
WINAPI
BackgroundCopyJob_EnumFiles
(
...
...
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