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
eb704369
Commit
eb704369
authored
Mar 04, 2008
by
Dan Hipschman
Committed by
Alexandre Julliard
Mar 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Implement IBackgroundCopyJob_Resume.
parent
5637c779
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
4 deletions
+72
-4
job.c
dlls/qmgr/job.c
+28
-4
qmgr.h
dlls/qmgr/qmgr.h
+1
-0
job.c
dlls/qmgr/tests/job.c
+43
-0
No files found.
dlls/qmgr/job.c
View file @
eb704369
...
...
@@ -119,8 +119,25 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_Suspend(
static
HRESULT
WINAPI
BITS_IBackgroundCopyJob_Resume
(
IBackgroundCopyJob
*
iface
)
{
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
BackgroundCopyJobImpl
*
This
=
(
BackgroundCopyJobImpl
*
)
iface
;
if
(
This
->
state
==
BG_JOB_STATE_CANCELLED
||
This
->
state
==
BG_JOB_STATE_ACKNOWLEDGED
)
{
return
BG_E_INVALID_STATE
;
}
if
(
This
->
jobProgress
.
FilesTransferred
==
This
->
jobProgress
.
FilesTotal
)
return
BG_E_EMPTY
;
if
(
This
->
state
==
BG_JOB_STATE_CONNECTING
||
This
->
state
==
BG_JOB_STATE_TRANSFERRING
)
{
return
S_OK
;
}
This
->
state
=
BG_JOB_STATE_QUEUED
;
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IBackgroundCopyJob_Cancel
(
...
...
@@ -188,8 +205,13 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_GetState(
IBackgroundCopyJob
*
iface
,
BG_JOB_STATE
*
pVal
)
{
FIXME
(
"Not implemented
\n
"
);
return
E_NOTIMPL
;
BackgroundCopyJobImpl
*
This
=
(
BackgroundCopyJobImpl
*
)
iface
;
if
(
!
pVal
)
return
E_INVALIDARG
;
*
pVal
=
This
->
state
;
return
S_OK
;
}
static
HRESULT
WINAPI
BITS_IBackgroundCopyJob_GetError
(
...
...
@@ -446,6 +468,8 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type,
This
->
jobProgress
.
FilesTotal
=
0
;
This
->
jobProgress
.
FilesTransferred
=
0
;
This
->
state
=
BG_JOB_STATE_SUSPENDED
;
*
ppObj
=
&
This
->
lpVtbl
;
return
S_OK
;
}
dlls/qmgr/qmgr.h
View file @
eb704369
...
...
@@ -40,6 +40,7 @@ typedef struct
GUID
jobId
;
struct
list
files
;
BG_JOB_PROGRESS
jobProgress
;
BG_JOB_STATE
state
;
struct
list
entryFromQmgr
;
}
BackgroundCopyJobImpl
;
...
...
dlls/qmgr/tests/job.c
View file @
eb704369
...
...
@@ -239,6 +239,47 @@ static void test_GetProgress_preTransfer(void)
ok
(
progress
.
FilesTransferred
==
0
,
"Incorrect FilesTransferred %u
\n
"
,
progress
.
FilesTransferred
);
}
/* Test getting job state */
static
void
test_GetState
(
void
)
{
HRESULT
hres
;
BG_JOB_STATE
state
;
state
=
BG_JOB_STATE_ERROR
;
hres
=
IBackgroundCopyJob_GetState
(
test_job
,
&
state
);
ok
(
hres
==
S_OK
,
"GetState failed: 0x%08x
\n
"
,
hres
);
if
(
hres
!=
S_OK
)
{
skip
(
"Unable to get job state
\n
"
);
return
;
}
ok
(
state
==
BG_JOB_STATE_SUSPENDED
,
"Incorrect job state: %d
\n
"
,
state
);
}
/* Test resuming a job */
static
void
test_ResumeEmpty
(
void
)
{
HRESULT
hres
;
BG_JOB_STATE
state
;
hres
=
IBackgroundCopyJob_Resume
(
test_job
);
ok
(
hres
==
BG_E_EMPTY
,
"Resume failed to return BG_E_EMPTY error: 0x%08x
\n
"
,
hres
);
if
(
hres
!=
BG_E_EMPTY
)
{
skip
(
"Failed calling resume job
\n
"
);
return
;
}
state
=
BG_JOB_STATE_ERROR
;
hres
=
IBackgroundCopyJob_GetState
(
test_job
,
&
state
);
if
(
hres
!=
S_OK
)
{
skip
(
"Unable to get job state
\n
"
);
return
;
}
ok
(
state
==
BG_JOB_STATE_SUSPENDED
,
"Incorrect job state: %d
\n
"
,
state
);
}
typedef
void
(
*
test_t
)(
void
);
START_TEST
(
job
)
...
...
@@ -250,6 +291,8 @@ START_TEST(job)
test_AddFile
,
test_EnumFiles
,
test_GetProgress_preTransfer
,
test_GetState
,
test_ResumeEmpty
,
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