qmgr: Update to IBackgroundCopyJob3.

This commit is contained in:
Hans Leidekker 2015-06-05 10:34:21 +02:00 committed by Alexandre Julliard
parent 04f3c2bbb0
commit 72103ab7d1
5 changed files with 162 additions and 115 deletions

View File

@ -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);

View File

@ -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;

View File

@ -32,42 +32,46 @@ static inline BOOL is_job_done(const BackgroundCopyJobImpl *job)
return job->state == BG_JOB_STATE_CANCELLED || job->state == BG_JOB_STATE_ACKNOWLEDGED;
}
static inline BackgroundCopyJobImpl *impl_from_IBackgroundCopyJob2(IBackgroundCopyJob2 *iface)
static inline BackgroundCopyJobImpl *impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
{
return CONTAINING_RECORD(iface, BackgroundCopyJobImpl, IBackgroundCopyJob2_iface);
return CONTAINING_RECORD(iface, BackgroundCopyJobImpl, IBackgroundCopyJob3_iface);
}
static HRESULT WINAPI BackgroundCopyJob_QueryInterface(
IBackgroundCopyJob2 *iface, REFIID riid, void **obj)
IBackgroundCopyJob3 *iface, REFIID riid, void **obj)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IBackgroundCopyJob)
|| IsEqualGUID(riid, &IID_IBackgroundCopyJob2))
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IBackgroundCopyJob) ||
IsEqualGUID(riid, &IID_IBackgroundCopyJob2) ||
IsEqualGUID(riid, &IID_IBackgroundCopyJob3))
{
*obj = iface;
IBackgroundCopyJob2_AddRef(iface);
return S_OK;
*obj = &This->IBackgroundCopyJob3_iface;
}
else
{
*obj = NULL;
return E_NOINTERFACE;
}
*obj = NULL;
return E_NOINTERFACE;
IBackgroundCopyJob3_AddRef(iface);
return S_OK;
}
static ULONG WINAPI BackgroundCopyJob_AddRef(IBackgroundCopyJob2 *iface)
static ULONG WINAPI BackgroundCopyJob_AddRef(IBackgroundCopyJob3 *iface)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(%d)\n", This, ref);
return ref;
}
static ULONG WINAPI BackgroundCopyJob_Release(IBackgroundCopyJob2 *iface)
static ULONG WINAPI BackgroundCopyJob_Release(IBackgroundCopyJob3 *iface)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(%d)\n", This, ref);
@ -89,11 +93,11 @@ static ULONG WINAPI BackgroundCopyJob_Release(IBackgroundCopyJob2 *iface)
/*** IBackgroundCopyJob methods ***/
static HRESULT WINAPI BackgroundCopyJob_AddFileSet(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
ULONG cFileCount,
BG_FILE_INFO *pFileSet)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
HRESULT hr = S_OK;
ULONG i;
@ -123,41 +127,41 @@ static HRESULT WINAPI BackgroundCopyJob_AddFileSet(
}
static HRESULT WINAPI BackgroundCopyJob_AddFile(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPCWSTR RemoteUrl,
LPCWSTR LocalName)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
BG_FILE_INFO file;
TRACE("(%p)->(%s %s)\n", This, debugstr_w(RemoteUrl), debugstr_w(LocalName));
file.RemoteName = (LPWSTR)RemoteUrl;
file.LocalName = (LPWSTR)LocalName;
return IBackgroundCopyJob2_AddFileSet(iface, 1, &file);
return IBackgroundCopyJob3_AddFileSet(iface, 1, &file);
}
static HRESULT WINAPI BackgroundCopyJob_EnumFiles(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
IEnumBackgroundCopyFiles **enum_files)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, enum_files);
return EnumBackgroundCopyFilesConstructor(This, enum_files);
}
static HRESULT WINAPI BackgroundCopyJob_Suspend(
IBackgroundCopyJob2 *iface)
IBackgroundCopyJob3 *iface)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p): stub\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_Resume(
IBackgroundCopyJob2 *iface)
IBackgroundCopyJob3 *iface)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
HRESULT rv = S_OK;
TRACE("(%p)\n", This);
@ -183,17 +187,17 @@ static HRESULT WINAPI BackgroundCopyJob_Resume(
}
static HRESULT WINAPI BackgroundCopyJob_Cancel(
IBackgroundCopyJob2 *iface)
IBackgroundCopyJob3 *iface)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p): stub\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_Complete(
IBackgroundCopyJob2 *iface)
IBackgroundCopyJob3 *iface)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
HRESULT rv = S_OK;
TRACE("(%p)\n", This);
@ -234,20 +238,20 @@ static HRESULT WINAPI BackgroundCopyJob_Complete(
}
static HRESULT WINAPI BackgroundCopyJob_GetId(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
GUID *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, pVal);
*pVal = This->jobId;
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_GetType(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_TYPE *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, pVal);
@ -259,10 +263,10 @@ static HRESULT WINAPI BackgroundCopyJob_GetType(
}
static HRESULT WINAPI BackgroundCopyJob_GetProgress(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_PROGRESS *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, pVal);
@ -280,19 +284,19 @@ static HRESULT WINAPI BackgroundCopyJob_GetProgress(
}
static HRESULT WINAPI BackgroundCopyJob_GetTimes(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_TIMES *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, pVal);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_GetState(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_STATE *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, pVal);
@ -305,37 +309,37 @@ static HRESULT WINAPI BackgroundCopyJob_GetState(
}
static HRESULT WINAPI BackgroundCopyJob_GetError(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
IBackgroundCopyError **ppError)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, ppError);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_GetOwner(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPWSTR *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, pVal);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_SetDisplayName(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPCWSTR Val)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%s): stub\n", This, debugstr_w(Val));
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_GetDisplayName(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPWSTR *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, pVal);
@ -343,10 +347,10 @@ static HRESULT WINAPI BackgroundCopyJob_GetDisplayName(
}
static HRESULT WINAPI BackgroundCopyJob_SetDescription(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPCWSTR Val)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
static const int max_description_len = 1024;
HRESULT hr = S_OK;
int len;
@ -379,10 +383,10 @@ static HRESULT WINAPI BackgroundCopyJob_SetDescription(
}
static HRESULT WINAPI BackgroundCopyJob_GetDescription(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPWSTR *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, pVal);
@ -390,28 +394,28 @@ static HRESULT WINAPI BackgroundCopyJob_GetDescription(
}
static HRESULT WINAPI BackgroundCopyJob_SetPriority(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_PRIORITY Val)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%d): stub\n", This, Val);
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_GetPriority(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_PRIORITY *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, pVal);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_SetNotifyFlags(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
ULONG Val)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
static const ULONG valid_flags = BG_NOTIFY_JOB_TRANSFERRED |
BG_NOTIFY_JOB_ERROR |
BG_NOTIFY_DISABLE |
@ -427,10 +431,10 @@ static HRESULT WINAPI BackgroundCopyJob_SetNotifyFlags(
}
static HRESULT WINAPI BackgroundCopyJob_GetNotifyFlags(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
ULONG *pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, pVal);
@ -442,10 +446,10 @@ static HRESULT WINAPI BackgroundCopyJob_GetNotifyFlags(
}
static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
IUnknown *Val)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
HRESULT hr = S_OK;
TRACE("(%p)->(%p)\n", This, Val);
@ -472,10 +476,10 @@ static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface(
}
static HRESULT WINAPI BackgroundCopyJob_GetNotifyInterface(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
IUnknown **pVal)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
TRACE("(%p)->(%p)\n", This, pVal);
@ -489,7 +493,7 @@ static HRESULT WINAPI BackgroundCopyJob_GetNotifyInterface(
}
static HRESULT WINAPI BackgroundCopyJob_SetMinimumRetryDelay(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
ULONG Seconds)
{
FIXME("%u\n", Seconds);
@ -497,150 +501,190 @@ static HRESULT WINAPI BackgroundCopyJob_SetMinimumRetryDelay(
}
static HRESULT WINAPI BackgroundCopyJob_GetMinimumRetryDelay(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
ULONG *Seconds)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, Seconds);
*Seconds = 30;
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_SetNoProgressTimeout(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
ULONG Seconds)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%d): stub\n", This, Seconds);
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_GetNoProgressTimeout(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
ULONG *Seconds)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, Seconds);
*Seconds = 900;
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_GetErrorCount(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
ULONG *Errors)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, Errors);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_SetProxySettings(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_PROXY_USAGE ProxyUsage,
const WCHAR *ProxyList,
const WCHAR *ProxyBypassList)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%d %s %s): stub\n", This, ProxyUsage, debugstr_w(ProxyList), debugstr_w(ProxyBypassList));
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_GetProxySettings(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_PROXY_USAGE *pProxyUsage,
LPWSTR *pProxyList,
LPWSTR *pProxyBypassList)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p %p %p): stub\n", This, pProxyUsage, pProxyList, pProxyBypassList);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_TakeOwnership(
IBackgroundCopyJob2 *iface)
IBackgroundCopyJob3 *iface)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p): stub\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_SetNotifyCmdLine(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPCWSTR prog,
LPCWSTR params)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(prog), debugstr_w(params));
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_GetNotifyCmdLine(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPWSTR *prog,
LPWSTR *params)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p %p): stub\n", This, prog, params);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_GetReplyProgress(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_JOB_REPLY_PROGRESS *progress)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, progress);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_GetReplyData(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
byte **pBuffer,
UINT64 *pLength)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p %p): stub\n", This, pBuffer, pLength);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_SetReplyFileName(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPCWSTR filename)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%s): stub\n", This, debugstr_w(filename));
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_GetReplyFileName(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
LPWSTR *pFilename)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, pFilename);
return E_NOTIMPL;
}
static HRESULT WINAPI BackgroundCopyJob_SetCredentials(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_AUTH_CREDENTIALS *cred)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, cred);
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_RemoveCredentials(
IBackgroundCopyJob2 *iface,
IBackgroundCopyJob3 *iface,
BG_AUTH_TARGET target,
BG_AUTH_SCHEME scheme)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%d %d): stub\n", This, target, scheme);
return S_OK;
}
static const IBackgroundCopyJob2Vtbl BackgroundCopyJobVtbl =
static HRESULT WINAPI BackgroundCopyJob_ReplaceRemotePrefix(
IBackgroundCopyJob3 *iface,
LPCWSTR OldPrefix,
LPCWSTR NewPrefix)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(OldPrefix), debugstr_w(NewPrefix));
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_AddFileWithRanges(
IBackgroundCopyJob3 *iface,
LPCWSTR RemoteUrl,
LPCWSTR LocalName,
DWORD RangeCount,
BG_FILE_RANGE Ranges[])
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%s %s %u %p): stub\n", This, debugstr_w(RemoteUrl), debugstr_w(LocalName), RangeCount, Ranges);
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_SetFileACLFlags(
IBackgroundCopyJob3 *iface,
DWORD Flags)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%x): stub\n", This, Flags);
return S_OK;
}
static HRESULT WINAPI BackgroundCopyJob_GetFileACLFlags(
IBackgroundCopyJob3 *iface,
DWORD *Flags)
{
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob3(iface);
FIXME("(%p)->(%p): stub\n", This, Flags);
return S_OK;
}
static const IBackgroundCopyJob3Vtbl BackgroundCopyJob3Vtbl =
{
BackgroundCopyJob_QueryInterface,
BackgroundCopyJob_AddRef,
@ -684,7 +728,11 @@ static const IBackgroundCopyJob2Vtbl BackgroundCopyJobVtbl =
BackgroundCopyJob_SetReplyFileName,
BackgroundCopyJob_GetReplyFileName,
BackgroundCopyJob_SetCredentials,
BackgroundCopyJob_RemoveCredentials
BackgroundCopyJob_RemoveCredentials,
BackgroundCopyJob_ReplaceRemotePrefix,
BackgroundCopyJob_AddFileWithRanges,
BackgroundCopyJob_SetFileACLFlags,
BackgroundCopyJob_GetFileACLFlags
};
HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID *job_id, BackgroundCopyJobImpl **job)
@ -699,7 +747,7 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID
if (!This)
return E_OUTOFMEMORY;
This->IBackgroundCopyJob2_iface.lpVtbl = &BackgroundCopyJobVtbl;
This->IBackgroundCopyJob3_iface.lpVtbl = &BackgroundCopyJob3Vtbl;
InitializeCriticalSection(&This->cs);
This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BackgroundCopyJobImpl.cs");

View File

@ -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)
{

View File

@ -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;