mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
qmgr: Implement IBackgroundCopyJob_GetProgress.
This commit is contained in:
parent
a0fd05f09e
commit
dc484a9b93
@ -163,8 +163,17 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_GetProgress(
|
||||
IBackgroundCopyJob* iface,
|
||||
BG_JOB_PROGRESS *pVal)
|
||||
{
|
||||
FIXME("Not implemented\n");
|
||||
return E_NOTIMPL;
|
||||
BackgroundCopyJobImpl *This = (BackgroundCopyJobImpl *) iface;
|
||||
|
||||
if (!pVal)
|
||||
return E_INVALIDARG;
|
||||
|
||||
pVal->BytesTotal = This->jobProgress.BytesTotal;
|
||||
pVal->BytesTransferred = This->jobProgress.BytesTransferred;
|
||||
pVal->FilesTotal = This->jobProgress.FilesTotal;
|
||||
pVal->FilesTransferred = This->jobProgress.FilesTransferred;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BITS_IBackgroundCopyJob_GetTimes(
|
||||
@ -432,7 +441,7 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type,
|
||||
memcpy(pJobId, &This->jobId, sizeof(GUID));
|
||||
|
||||
list_init(&This->files);
|
||||
This->jobProgress.BytesTotal = BG_SIZE_UNKNOWN;
|
||||
This->jobProgress.BytesTotal = 0;
|
||||
This->jobProgress.BytesTransferred = 0;
|
||||
This->jobProgress.FilesTotal = 0;
|
||||
This->jobProgress.FilesTransferred = 0;
|
||||
|
@ -218,6 +218,27 @@ static void test_EnumFiles(void)
|
||||
ok(res == 0, "Bad ref count on release: %u\n", res);
|
||||
}
|
||||
|
||||
/* Test getting job progress */
|
||||
static void test_GetProgress_preTransfer(void)
|
||||
{
|
||||
HRESULT hres;
|
||||
BG_JOB_PROGRESS progress;
|
||||
|
||||
hres = IBackgroundCopyJob_GetProgress(test_job, &progress);
|
||||
ok(hres == S_OK, "GetProgress failed: 0x%08x\n", hres);
|
||||
if (hres != S_OK)
|
||||
{
|
||||
skip("Unable to get job progress\n");
|
||||
teardown();
|
||||
return;
|
||||
}
|
||||
|
||||
ok(progress.BytesTotal == 0, "Incorrect BytesTotal: %llu\n", progress.BytesTotal);
|
||||
ok(progress.BytesTransferred == 0, "Incorrect BytesTransferred: %llu\n", progress.BytesTransferred);
|
||||
ok(progress.FilesTotal == 0, "Incorrect FilesTotal: %u\n", progress.FilesTotal);
|
||||
ok(progress.FilesTransferred == 0, "Incorrect FilesTransferred %u\n", progress.FilesTransferred);
|
||||
}
|
||||
|
||||
typedef void (*test_t)(void);
|
||||
|
||||
START_TEST(job)
|
||||
@ -228,6 +249,7 @@ START_TEST(job)
|
||||
test_GetName,
|
||||
test_AddFile,
|
||||
test_EnumFiles,
|
||||
test_GetProgress_preTransfer,
|
||||
0
|
||||
};
|
||||
const test_t *test;
|
||||
|
Loading…
Reference in New Issue
Block a user