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
e6cbde10
Commit
e6cbde10
authored
Feb 28, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Feb 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Implement IBackgroundCopyFile_GetProgress.
parent
4866d1bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
file.c
dlls/qmgr/file.c
+11
-2
qmgr.h
dlls/qmgr/qmgr.h
+1
-0
file.c
dlls/qmgr/tests/file.c
+19
-0
No files found.
dlls/qmgr/file.c
View file @
e6cbde10
...
...
@@ -103,8 +103,13 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetProgress(
IBackgroundCopyFile
*
iface
,
BG_FILE_PROGRESS
*
pVal
)
{
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
BackgroundCopyFileImpl
*
This
=
(
BackgroundCopyFileImpl
*
)
iface
;
pVal
->
BytesTotal
=
This
->
fileProgress
.
BytesTotal
;
pVal
->
BytesTransferred
=
This
->
fileProgress
.
BytesTransferred
;
pVal
->
Completed
=
This
->
fileProgress
.
Completed
;
return
S_OK
;
}
static
const
IBackgroundCopyFileVtbl
BITS_IBackgroundCopyFile_Vtbl
=
...
...
@@ -152,6 +157,10 @@ HRESULT BackgroundCopyFileConstructor(LPCWSTR remoteName,
This
->
lpVtbl
=
&
BITS_IBackgroundCopyFile_Vtbl
;
This
->
ref
=
1
;
This
->
fileProgress
.
BytesTotal
=
BG_SIZE_UNKNOWN
;
This
->
fileProgress
.
BytesTransferred
=
0
;
This
->
fileProgress
.
Completed
=
FALSE
;
*
ppObj
=
&
This
->
lpVtbl
;
return
S_OK
;
}
dlls/qmgr/qmgr.h
View file @
e6cbde10
...
...
@@ -65,6 +65,7 @@ typedef struct
const
IBackgroundCopyFileVtbl
*
lpVtbl
;
LONG
ref
;
BG_FILE_INFO
info
;
BG_FILE_PROGRESS
fileProgress
;
struct
list
entryFromJob
;
}
BackgroundCopyFileImpl
;
...
...
dlls/qmgr/tests/file.c
View file @
e6cbde10
...
...
@@ -145,6 +145,24 @@ static void test_GetLocalName(void)
CoTaskMemFree
(
name
);
}
/* Test getting the progress of a file*/
static
void
test_GetProgress_PreTransfer
(
void
)
{
HRESULT
hres
;
BG_FILE_PROGRESS
progress
;
hres
=
IBackgroundCopyFile_GetProgress
(
test_file
,
&
progress
);
ok
(
hres
==
S_OK
,
"GetProgress failed: %08x
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
{
skip
(
"Unable to get progress of test_file.
\n
"
);
return
;
}
ok
(
progress
.
BytesTotal
==
BG_SIZE_UNKNOWN
,
"Got incorrect total size: %llu
\n
"
,
progress
.
BytesTotal
);
ok
(
progress
.
BytesTransferred
==
0
,
"Got incorrect number of transfered bytes: %llu
\n
"
,
progress
.
BytesTransferred
);
ok
(
progress
.
Completed
==
FALSE
,
"Got incorret completion status
\n
"
);
}
typedef
void
(
*
test_t
)(
void
);
START_TEST
(
file
)
...
...
@@ -152,6 +170,7 @@ START_TEST(file)
static
const
test_t
tests
[]
=
{
test_GetRemoteName
,
test_GetLocalName
,
test_GetProgress_PreTransfer
,
0
};
const
test_t
*
test
;
...
...
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