Commit 72103ab7 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

qmgr: Update to IBackgroundCopyJob3.

parent 04f3c2bb
......@@ -27,7 +27,7 @@ typedef struct
{
IEnumBackgroundCopyJobs IEnumBackgroundCopyJobs_iface;
LONG ref;
IBackgroundCopyJob **jobs;
IBackgroundCopyJob3 **jobs;
ULONG numJobs;
ULONG indexJobs;
} EnumBackgroundCopyJobsImpl;
......@@ -75,7 +75,7 @@ static ULONG WINAPI EnumBackgroundCopyJobs_Release(IEnumBackgroundCopyJobs *ifac
if (ref == 0) {
for(i = 0; i < This->numJobs; i++)
IBackgroundCopyJob_Release(This->jobs[i]);
IBackgroundCopyJob3_Release(This->jobs[i]);
HeapFree(GetProcessHeap(), 0, This->jobs);
HeapFree(GetProcessHeap(), 0, This);
}
......@@ -89,7 +89,7 @@ static HRESULT WINAPI EnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs *iface
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
ULONG fetched;
ULONG i;
IBackgroundCopyJob *job;
IBackgroundCopyJob3 *job;
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
......@@ -112,8 +112,8 @@ static HRESULT WINAPI EnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs *iface
for (i = 0; i < fetched; ++i)
{
job = This->jobs[This->indexJobs++];
IBackgroundCopyJob_AddRef(job);
rgelt[i] = job;
IBackgroundCopyJob3_AddRef(job);
rgelt[i] = (IBackgroundCopyJob *)job;
}
return fetched == celt ? S_OK : S_FALSE;
......@@ -213,9 +213,8 @@ HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCop
i = 0;
LIST_FOR_EACH_ENTRY(job, &qmgr->jobs, BackgroundCopyJobImpl, entryFromQmgr)
{
IBackgroundCopyJob *job_iface = (IBackgroundCopyJob*)&job->IBackgroundCopyJob2_iface;
IBackgroundCopyJob_AddRef(job_iface);
This->jobs[i++] = job_iface;
IBackgroundCopyJob3_AddRef(&job->IBackgroundCopyJob3_iface);
This->jobs[i++] = &job->IBackgroundCopyJob3_iface;
}
LeaveCriticalSection(&qmgr->cs);
......
......@@ -82,7 +82,7 @@ static ULONG WINAPI BackgroundCopyFile_Release(
if (ref == 0)
{
IBackgroundCopyJob2_Release(&file->owner->IBackgroundCopyJob2_iface);
IBackgroundCopyJob3_Release(&file->owner->IBackgroundCopyJob3_iface);
HeapFree(GetProcessHeap(), 0, file->info.LocalName);
HeapFree(GetProcessHeap(), 0, file->info.RemoteName);
HeapFree(GetProcessHeap(), 0, file);
......@@ -201,7 +201,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
This->fileProgress.BytesTransferred = 0;
This->fileProgress.Completed = FALSE;
This->owner = owner;
IBackgroundCopyJob2_AddRef(&owner->IBackgroundCopyJob2_iface);
IBackgroundCopyJob3_AddRef(&owner->IBackgroundCopyJob3_iface);
*file = This;
return S_OK;
......
......@@ -66,7 +66,7 @@ static HRESULT WINAPI BackgroundCopyManager_CreateJob(IBackgroundCopyManager *if
return hres;
/* Add a reference to the job to job list */
*ppJob = (IBackgroundCopyJob*)&job->IBackgroundCopyJob2_iface;
*ppJob = (IBackgroundCopyJob *)&job->IBackgroundCopyJob3_iface;
IBackgroundCopyJob_AddRef(*ppJob);
EnterCriticalSection(&globalMgr.cs);
list_add_head(&globalMgr.jobs, &job->entryFromQmgr);
......@@ -93,8 +93,8 @@ static HRESULT WINAPI BackgroundCopyManager_GetJob(IBackgroundCopyManager *iface
{
if (IsEqualGUID(&cur->jobId, jobID))
{
*job = (IBackgroundCopyJob*)&cur->IBackgroundCopyJob2_iface;
IBackgroundCopyJob2_AddRef(&cur->IBackgroundCopyJob2_iface);
*job = (IBackgroundCopyJob *)&cur->IBackgroundCopyJob3_iface;
IBackgroundCopyJob3_AddRef(&cur->IBackgroundCopyJob3_iface);
hr = S_OK;
break;
}
......@@ -164,7 +164,7 @@ DWORD WINAPI fileTransfer(void *param)
LIST_FOR_EACH_ENTRY_SAFE(job, jobCur, &qmgr->jobs, BackgroundCopyJobImpl, entryFromQmgr)
{
list_remove(&job->entryFromQmgr);
IBackgroundCopyJob2_Release(&job->IBackgroundCopyJob2_iface);
IBackgroundCopyJob3_Release(&job->IBackgroundCopyJob3_iface);
}
return 0;
}
......@@ -179,7 +179,7 @@ DWORD WINAPI fileTransfer(void *param)
if (job->state == BG_JOB_STATE_ACKNOWLEDGED || job->state == BG_JOB_STATE_CANCELLED)
{
list_remove(&job->entryFromQmgr);
IBackgroundCopyJob2_Release(&job->IBackgroundCopyJob2_iface);
IBackgroundCopyJob3_Release(&job->IBackgroundCopyJob3_iface);
}
else if (job->state == BG_JOB_STATE_QUEUED)
{
......
......@@ -36,7 +36,7 @@
/* Background copy job vtbl and related data */
typedef struct
{
IBackgroundCopyJob2 IBackgroundCopyJob2_iface;
IBackgroundCopyJob3 IBackgroundCopyJob3_iface;
LONG ref;
LPWSTR displayName;
LPWSTR description;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment