qmgr: Update to IBackgroundCopyJob4.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9bf8124784
commit
60837d12a7
|
@ -27,7 +27,7 @@ typedef struct
|
|||
{
|
||||
IEnumBackgroundCopyJobs IEnumBackgroundCopyJobs_iface;
|
||||
LONG ref;
|
||||
IBackgroundCopyJob3 **jobs;
|
||||
IBackgroundCopyJob4 **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++)
|
||||
IBackgroundCopyJob3_Release(This->jobs[i]);
|
||||
IBackgroundCopyJob4_Release(This->jobs[i]);
|
||||
HeapFree(GetProcessHeap(), 0, This->jobs);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
@ -89,7 +89,6 @@ static HRESULT WINAPI EnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs *iface
|
|||
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
|
||||
ULONG fetched;
|
||||
ULONG i;
|
||||
IBackgroundCopyJob3 *job;
|
||||
|
||||
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
|
||||
|
||||
|
@ -111,9 +110,8 @@ static HRESULT WINAPI EnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs *iface
|
|||
/* Fill in the array of objects */
|
||||
for (i = 0; i < fetched; ++i)
|
||||
{
|
||||
job = This->jobs[This->indexJobs++];
|
||||
IBackgroundCopyJob3_AddRef(job);
|
||||
rgelt[i] = (IBackgroundCopyJob *)job;
|
||||
rgelt[i] = (IBackgroundCopyJob *)This->jobs[This->indexJobs++];
|
||||
IBackgroundCopyJob_AddRef(rgelt[i]);
|
||||
}
|
||||
|
||||
return fetched == celt ? S_OK : S_FALSE;
|
||||
|
@ -213,8 +211,8 @@ HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCop
|
|||
i = 0;
|
||||
LIST_FOR_EACH_ENTRY(job, &qmgr->jobs, BackgroundCopyJobImpl, entryFromQmgr)
|
||||
{
|
||||
IBackgroundCopyJob3_AddRef(&job->IBackgroundCopyJob3_iface);
|
||||
This->jobs[i++] = &job->IBackgroundCopyJob3_iface;
|
||||
IBackgroundCopyJob4_AddRef(&job->IBackgroundCopyJob4_iface);
|
||||
This->jobs[i++] = &job->IBackgroundCopyJob4_iface;
|
||||
}
|
||||
LeaveCriticalSection(&qmgr->cs);
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ static ULONG WINAPI BackgroundCopyFile_Release(
|
|||
|
||||
if (ref == 0)
|
||||
{
|
||||
IBackgroundCopyJob3_Release(&file->owner->IBackgroundCopyJob3_iface);
|
||||
IBackgroundCopyJob4_Release(&file->owner->IBackgroundCopyJob4_iface);
|
||||
HeapFree(GetProcessHeap(), 0, file->info.LocalName);
|
||||
HeapFree(GetProcessHeap(), 0, file->info.RemoteName);
|
||||
HeapFree(GetProcessHeap(), 0, file);
|
||||
|
@ -195,7 +195,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
|
|||
This->owner = owner;
|
||||
This->read_size = 0;
|
||||
This->tempFileName[0] = 0;
|
||||
IBackgroundCopyJob3_AddRef(&owner->IBackgroundCopyJob3_iface);
|
||||
IBackgroundCopyJob4_AddRef(&owner->IBackgroundCopyJob4_iface);
|
||||
|
||||
*file = This;
|
||||
return S_OK;
|
||||
|
|
629
dlls/qmgr/job.c
629
dlls/qmgr/job.c
File diff suppressed because it is too large
Load Diff
|
@ -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->IBackgroundCopyJob3_iface;
|
||||
*ppJob = (IBackgroundCopyJob *)&job->IBackgroundCopyJob4_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->IBackgroundCopyJob3_iface;
|
||||
IBackgroundCopyJob3_AddRef(&cur->IBackgroundCopyJob3_iface);
|
||||
*job = (IBackgroundCopyJob *)&cur->IBackgroundCopyJob4_iface;
|
||||
IBackgroundCopyJob_AddRef(*job);
|
||||
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);
|
||||
IBackgroundCopyJob3_Release(&job->IBackgroundCopyJob3_iface);
|
||||
IBackgroundCopyJob4_Release(&job->IBackgroundCopyJob4_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);
|
||||
IBackgroundCopyJob3_Release(&job->IBackgroundCopyJob3_iface);
|
||||
IBackgroundCopyJob4_Release(&job->IBackgroundCopyJob4_iface);
|
||||
}
|
||||
else if (job->state == BG_JOB_STATE_QUEUED)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
/* Background copy job vtbl and related data */
|
||||
typedef struct
|
||||
{
|
||||
IBackgroundCopyJob3 IBackgroundCopyJob3_iface;
|
||||
IBackgroundCopyJob4 IBackgroundCopyJob4_iface;
|
||||
IBackgroundCopyJobHttpOptions IBackgroundCopyJobHttpOptions_iface;
|
||||
LONG ref;
|
||||
LPWSTR displayName;
|
||||
|
|
Loading…
Reference in New Issue