Commit a124e927 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

qmgr: Added missing argument tracing, method naming made more compact.

parent c132ed8d
...@@ -37,10 +37,12 @@ static inline EnumBackgroundCopyFilesImpl *impl_from_IEnumBackgroundCopyFiles(IE ...@@ -37,10 +37,12 @@ static inline EnumBackgroundCopyFilesImpl *impl_from_IEnumBackgroundCopyFiles(IE
return CONTAINING_RECORD(iface, EnumBackgroundCopyFilesImpl, IEnumBackgroundCopyFiles_iface); return CONTAINING_RECORD(iface, EnumBackgroundCopyFilesImpl, IEnumBackgroundCopyFiles_iface);
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_QueryInterface(IEnumBackgroundCopyFiles *iface, static HRESULT WINAPI EnumBackgroundCopyFiles_QueryInterface(IEnumBackgroundCopyFiles *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
TRACE("(%p,%s,%p)\n", iface, debugstr_guid(riid), ppv); EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumBackgroundCopyFiles)) if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumBackgroundCopyFiles))
{ {
...@@ -53,21 +55,23 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_QueryInterface(IEnumBackgrou ...@@ -53,21 +55,23 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_QueryInterface(IEnumBackgrou
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI BITS_IEnumBackgroundCopyFiles_AddRef(IEnumBackgroundCopyFiles *iface) static ULONG WINAPI EnumBackgroundCopyFiles_AddRef(IEnumBackgroundCopyFiles *iface)
{ {
EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface); EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p)->(%d)\n", This, ref);
return ref; return ref;
} }
static ULONG WINAPI BITS_IEnumBackgroundCopyFiles_Release(IEnumBackgroundCopyFiles *iface) static ULONG WINAPI EnumBackgroundCopyFiles_Release(IEnumBackgroundCopyFiles *iface)
{ {
EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface); EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
ULONG i; ULONG i;
TRACE("(%p)->(%d)\n", This, ref);
if (ref == 0) if (ref == 0)
{ {
for(i = 0; i < This->numFiles; i++) for(i = 0; i < This->numFiles; i++)
...@@ -80,7 +84,7 @@ static ULONG WINAPI BITS_IEnumBackgroundCopyFiles_Release(IEnumBackgroundCopyFil ...@@ -80,7 +84,7 @@ static ULONG WINAPI BITS_IEnumBackgroundCopyFiles_Release(IEnumBackgroundCopyFil
} }
/* Return reference to one or more files in the file enumerator */ /* Return reference to one or more files in the file enumerator */
static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Next(IEnumBackgroundCopyFiles *iface, static HRESULT WINAPI EnumBackgroundCopyFiles_Next(IEnumBackgroundCopyFiles *iface,
ULONG celt, IBackgroundCopyFile **rgelt, ULONG *pceltFetched) ULONG celt, IBackgroundCopyFile **rgelt, ULONG *pceltFetched)
{ {
EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface); EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
...@@ -88,6 +92,8 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Next(IEnumBackgroundCopyFile ...@@ -88,6 +92,8 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Next(IEnumBackgroundCopyFile
ULONG i; ULONG i;
IBackgroundCopyFile *file; IBackgroundCopyFile *file;
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
/* Despite documented behavior, Windows (tested on XP) is not verifying /* Despite documented behavior, Windows (tested on XP) is not verifying
that the caller set pceltFetched to zero. No check here. */ that the caller set pceltFetched to zero. No check here. */
...@@ -118,11 +124,13 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Next(IEnumBackgroundCopyFile ...@@ -118,11 +124,13 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Next(IEnumBackgroundCopyFile
} }
/* Skip over one or more files in the file enumerator */ /* Skip over one or more files in the file enumerator */
static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Skip(IEnumBackgroundCopyFiles *iface, static HRESULT WINAPI EnumBackgroundCopyFiles_Skip(IEnumBackgroundCopyFiles *iface,
ULONG celt) ULONG celt)
{ {
EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface); EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
TRACE("(%p)->(%d)\n", This, celt);
if (celt > This->numFiles - This->indexFiles) if (celt > This->numFiles - This->indexFiles)
{ {
This->indexFiles = This->numFiles; This->indexFiles = This->numFiles;
...@@ -133,38 +141,43 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Skip(IEnumBackgroundCopyFile ...@@ -133,38 +141,43 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Skip(IEnumBackgroundCopyFile
return S_OK; return S_OK;
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Reset(IEnumBackgroundCopyFiles *iface) static HRESULT WINAPI EnumBackgroundCopyFiles_Reset(IEnumBackgroundCopyFiles *iface)
{ {
EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface); EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
TRACE("(%p)\n", This);
This->indexFiles = 0; This->indexFiles = 0;
return S_OK; return S_OK;
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_Clone(IEnumBackgroundCopyFiles *iface, static HRESULT WINAPI EnumBackgroundCopyFiles_Clone(IEnumBackgroundCopyFiles *iface,
IEnumBackgroundCopyFiles **ppenum) IEnumBackgroundCopyFiles **ppenum)
{ {
FIXME("Not implemented\n"); EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
FIXME("(%p)->(%p): stub\n", This, ppenum);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyFiles_GetCount(IEnumBackgroundCopyFiles *iface, static HRESULT WINAPI EnumBackgroundCopyFiles_GetCount(IEnumBackgroundCopyFiles *iface,
ULONG *puCount) ULONG *puCount)
{ {
EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface); EnumBackgroundCopyFilesImpl *This = impl_from_IEnumBackgroundCopyFiles(iface);
TRACE("(%p)->(%p)\n", This, puCount);
*puCount = This->numFiles; *puCount = This->numFiles;
return S_OK; return S_OK;
} }
static const IEnumBackgroundCopyFilesVtbl BITS_IEnumBackgroundCopyFiles_Vtbl = static const IEnumBackgroundCopyFilesVtbl EnumBackgroundCopyFilesVtbl =
{ {
BITS_IEnumBackgroundCopyFiles_QueryInterface, EnumBackgroundCopyFiles_QueryInterface,
BITS_IEnumBackgroundCopyFiles_AddRef, EnumBackgroundCopyFiles_AddRef,
BITS_IEnumBackgroundCopyFiles_Release, EnumBackgroundCopyFiles_Release,
BITS_IEnumBackgroundCopyFiles_Next, EnumBackgroundCopyFiles_Next,
BITS_IEnumBackgroundCopyFiles_Skip, EnumBackgroundCopyFiles_Skip,
BITS_IEnumBackgroundCopyFiles_Reset, EnumBackgroundCopyFiles_Reset,
BITS_IEnumBackgroundCopyFiles_Clone, EnumBackgroundCopyFiles_Clone,
BITS_IEnumBackgroundCopyFiles_GetCount EnumBackgroundCopyFiles_GetCount
}; };
HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl *job, IEnumBackgroundCopyFiles **enum_files) HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl *job, IEnumBackgroundCopyFiles **enum_files)
...@@ -179,7 +192,7 @@ HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl *job, IEnumBack ...@@ -179,7 +192,7 @@ HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl *job, IEnumBack
if (!This) if (!This)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
This->IEnumBackgroundCopyFiles_iface.lpVtbl = &BITS_IEnumBackgroundCopyFiles_Vtbl; This->IEnumBackgroundCopyFiles_iface.lpVtbl = &EnumBackgroundCopyFilesVtbl;
This->ref = 1; This->ref = 1;
/* Create array of files */ /* Create array of files */
......
...@@ -37,10 +37,12 @@ static inline EnumBackgroundCopyJobsImpl *impl_from_IEnumBackgroundCopyJobs(IEnu ...@@ -37,10 +37,12 @@ static inline EnumBackgroundCopyJobsImpl *impl_from_IEnumBackgroundCopyJobs(IEnu
return CONTAINING_RECORD(iface, EnumBackgroundCopyJobsImpl, IEnumBackgroundCopyJobs_iface); return CONTAINING_RECORD(iface, EnumBackgroundCopyJobsImpl, IEnumBackgroundCopyJobs_iface);
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_QueryInterface(IEnumBackgroundCopyJobs *iface, static HRESULT WINAPI EnumBackgroundCopyJobs_QueryInterface(IEnumBackgroundCopyJobs *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
TRACE("(%p,%s,%p)\n", iface, debugstr_guid(riid), ppv); EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumBackgroundCopyJobs)) if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumBackgroundCopyJobs))
{ {
...@@ -53,23 +55,23 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_QueryInterface(IEnumBackgroun ...@@ -53,23 +55,23 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_QueryInterface(IEnumBackgroun
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI BITS_IEnumBackgroundCopyJobs_AddRef(IEnumBackgroundCopyJobs *iface) static ULONG WINAPI EnumBackgroundCopyJobs_AddRef(IEnumBackgroundCopyJobs *iface)
{ {
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface); EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p)->(%d)\n", This, ref);
return ref; return ref;
} }
static ULONG WINAPI BITS_IEnumBackgroundCopyJobs_Release(IEnumBackgroundCopyJobs *iface) static ULONG WINAPI EnumBackgroundCopyJobs_Release(IEnumBackgroundCopyJobs *iface)
{ {
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface); EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
ULONG i; ULONG i;
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p)->(%d)\n", This, ref);
if (ref == 0) { if (ref == 0) {
for(i = 0; i < This->numJobs; i++) for(i = 0; i < This->numJobs; i++)
...@@ -81,7 +83,7 @@ static ULONG WINAPI BITS_IEnumBackgroundCopyJobs_Release(IEnumBackgroundCopyJobs ...@@ -81,7 +83,7 @@ static ULONG WINAPI BITS_IEnumBackgroundCopyJobs_Release(IEnumBackgroundCopyJobs
return ref; return ref;
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs *iface, ULONG celt, static HRESULT WINAPI EnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs *iface, ULONG celt,
IBackgroundCopyJob **rgelt, ULONG *pceltFetched) IBackgroundCopyJob **rgelt, ULONG *pceltFetched)
{ {
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface); EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
...@@ -89,6 +91,8 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs ...@@ -89,6 +91,8 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs
ULONG i; ULONG i;
IBackgroundCopyJob *job; IBackgroundCopyJob *job;
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
fetched = min(celt, This->numJobs - This->indexJobs); fetched = min(celt, This->numJobs - This->indexJobs);
if (pceltFetched) if (pceltFetched)
*pceltFetched = fetched; *pceltFetched = fetched;
...@@ -115,10 +119,12 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs ...@@ -115,10 +119,12 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Next(IEnumBackgroundCopyJobs
return fetched == celt ? S_OK : S_FALSE; return fetched == celt ? S_OK : S_FALSE;
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Skip(IEnumBackgroundCopyJobs *iface, ULONG celt) static HRESULT WINAPI EnumBackgroundCopyJobs_Skip(IEnumBackgroundCopyJobs *iface, ULONG celt)
{ {
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface); EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
TRACE("(%p)->(%d)\n", This, celt);
if (This->numJobs - This->indexJobs < celt) if (This->numJobs - This->indexJobs < celt)
{ {
This->indexJobs = This->numJobs; This->indexJobs = This->numJobs;
...@@ -129,38 +135,45 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Skip(IEnumBackgroundCopyJobs ...@@ -129,38 +135,45 @@ static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Skip(IEnumBackgroundCopyJobs
return S_OK; return S_OK;
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Reset(IEnumBackgroundCopyJobs *iface) static HRESULT WINAPI EnumBackgroundCopyJobs_Reset(IEnumBackgroundCopyJobs *iface)
{ {
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface); EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
TRACE("(%p)\n", This);
This->indexJobs = 0; This->indexJobs = 0;
return S_OK; return S_OK;
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_Clone(IEnumBackgroundCopyJobs *iface, static HRESULT WINAPI EnumBackgroundCopyJobs_Clone(IEnumBackgroundCopyJobs *iface,
IEnumBackgroundCopyJobs **ppenum) IEnumBackgroundCopyJobs **ppenum)
{ {
FIXME("Not implemented\n"); EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
FIXME("(%p)->(%p): stub\n", This, ppenum);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI BITS_IEnumBackgroundCopyJobs_GetCount(IEnumBackgroundCopyJobs *iface, static HRESULT WINAPI EnumBackgroundCopyJobs_GetCount(IEnumBackgroundCopyJobs *iface,
ULONG *puCount) ULONG *puCount)
{ {
EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface); EnumBackgroundCopyJobsImpl *This = impl_from_IEnumBackgroundCopyJobs(iface);
TRACE("(%p)->(%p)\n", This, puCount);
*puCount = This->numJobs; *puCount = This->numJobs;
return S_OK; return S_OK;
} }
static const IEnumBackgroundCopyJobsVtbl BITS_IEnumBackgroundCopyJobs_Vtbl = static const IEnumBackgroundCopyJobsVtbl EnumBackgroundCopyJobsVtbl =
{ {
BITS_IEnumBackgroundCopyJobs_QueryInterface, EnumBackgroundCopyJobs_QueryInterface,
BITS_IEnumBackgroundCopyJobs_AddRef, EnumBackgroundCopyJobs_AddRef,
BITS_IEnumBackgroundCopyJobs_Release, EnumBackgroundCopyJobs_Release,
BITS_IEnumBackgroundCopyJobs_Next, EnumBackgroundCopyJobs_Next,
BITS_IEnumBackgroundCopyJobs_Skip, EnumBackgroundCopyJobs_Skip,
BITS_IEnumBackgroundCopyJobs_Reset, EnumBackgroundCopyJobs_Reset,
BITS_IEnumBackgroundCopyJobs_Clone, EnumBackgroundCopyJobs_Clone,
BITS_IEnumBackgroundCopyJobs_GetCount EnumBackgroundCopyJobs_GetCount
}; };
HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCopyJobs **enumjob) HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCopyJobs **enumjob)
...@@ -174,7 +187,7 @@ HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCop ...@@ -174,7 +187,7 @@ HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCop
This = HeapAlloc(GetProcessHeap(), 0, sizeof *This); This = HeapAlloc(GetProcessHeap(), 0, sizeof *This);
if (!This) if (!This)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
This->IEnumBackgroundCopyJobs_iface.lpVtbl = &BITS_IEnumBackgroundCopyJobs_Vtbl; This->IEnumBackgroundCopyJobs_iface.lpVtbl = &EnumBackgroundCopyJobsVtbl;
This->ref = 1; This->ref = 1;
/* Create array of jobs */ /* Create array of jobs */
......
...@@ -40,7 +40,7 @@ static inline BackgroundCopyFileImpl *impl_from_IBackgroundCopyFile(IBackgroundC ...@@ -40,7 +40,7 @@ static inline BackgroundCopyFileImpl *impl_from_IBackgroundCopyFile(IBackgroundC
return CONTAINING_RECORD(iface, BackgroundCopyFileImpl, IBackgroundCopyFile_iface); return CONTAINING_RECORD(iface, BackgroundCopyFileImpl, IBackgroundCopyFile_iface);
} }
static HRESULT WINAPI BITS_IBackgroundCopyFile_QueryInterface( static HRESULT WINAPI BackgroundCopyFile_QueryInterface(
IBackgroundCopyFile* iface, IBackgroundCopyFile* iface,
REFIID riid, REFIID riid,
void **obj) void **obj)
...@@ -61,7 +61,7 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_QueryInterface( ...@@ -61,7 +61,7 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_QueryInterface(
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI BITS_IBackgroundCopyFile_AddRef(IBackgroundCopyFile* iface) static ULONG WINAPI BackgroundCopyFile_AddRef(IBackgroundCopyFile* iface)
{ {
BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
...@@ -69,7 +69,7 @@ static ULONG WINAPI BITS_IBackgroundCopyFile_AddRef(IBackgroundCopyFile* iface) ...@@ -69,7 +69,7 @@ static ULONG WINAPI BITS_IBackgroundCopyFile_AddRef(IBackgroundCopyFile* iface)
return ref; return ref;
} }
static ULONG WINAPI BITS_IBackgroundCopyFile_Release( static ULONG WINAPI BackgroundCopyFile_Release(
IBackgroundCopyFile* iface) IBackgroundCopyFile* iface)
{ {
BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface);
...@@ -89,7 +89,7 @@ static ULONG WINAPI BITS_IBackgroundCopyFile_Release( ...@@ -89,7 +89,7 @@ static ULONG WINAPI BITS_IBackgroundCopyFile_Release(
} }
/* Get the remote name of a background copy file */ /* Get the remote name of a background copy file */
static HRESULT WINAPI BITS_IBackgroundCopyFile_GetRemoteName( static HRESULT WINAPI BackgroundCopyFile_GetRemoteName(
IBackgroundCopyFile* iface, IBackgroundCopyFile* iface,
LPWSTR *pVal) LPWSTR *pVal)
{ {
...@@ -100,7 +100,7 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetRemoteName( ...@@ -100,7 +100,7 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetRemoteName(
return return_strval(This->info.RemoteName, pVal); return return_strval(This->info.RemoteName, pVal);
} }
static HRESULT WINAPI BITS_IBackgroundCopyFile_GetLocalName( static HRESULT WINAPI BackgroundCopyFile_GetLocalName(
IBackgroundCopyFile* iface, IBackgroundCopyFile* iface,
LPWSTR *pVal) LPWSTR *pVal)
{ {
...@@ -111,12 +111,14 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetLocalName( ...@@ -111,12 +111,14 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetLocalName(
return return_strval(This->info.LocalName, pVal); return return_strval(This->info.LocalName, pVal);
} }
static HRESULT WINAPI BITS_IBackgroundCopyFile_GetProgress( static HRESULT WINAPI BackgroundCopyFile_GetProgress(
IBackgroundCopyFile* iface, IBackgroundCopyFile* iface,
BG_FILE_PROGRESS *pVal) BG_FILE_PROGRESS *pVal)
{ {
BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface);
TRACE("(%p)->(%p)\n", This, pVal);
EnterCriticalSection(&This->owner->cs); EnterCriticalSection(&This->owner->cs);
pVal->BytesTotal = This->fileProgress.BytesTotal; pVal->BytesTotal = This->fileProgress.BytesTotal;
pVal->BytesTransferred = This->fileProgress.BytesTransferred; pVal->BytesTransferred = This->fileProgress.BytesTransferred;
...@@ -126,14 +128,14 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetProgress( ...@@ -126,14 +128,14 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetProgress(
return S_OK; return S_OK;
} }
static const IBackgroundCopyFileVtbl BITS_IBackgroundCopyFile_Vtbl = static const IBackgroundCopyFileVtbl BackgroundCopyFileVtbl =
{ {
BITS_IBackgroundCopyFile_QueryInterface, BackgroundCopyFile_QueryInterface,
BITS_IBackgroundCopyFile_AddRef, BackgroundCopyFile_AddRef,
BITS_IBackgroundCopyFile_Release, BackgroundCopyFile_Release,
BITS_IBackgroundCopyFile_GetRemoteName, BackgroundCopyFile_GetRemoteName,
BITS_IBackgroundCopyFile_GetLocalName, BackgroundCopyFile_GetLocalName,
BITS_IBackgroundCopyFile_GetProgress BackgroundCopyFile_GetProgress
}; };
HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner, HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
...@@ -168,7 +170,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner, ...@@ -168,7 +170,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
} }
memcpy(This->info.LocalName, localName, n); memcpy(This->info.LocalName, localName, n);
This->IBackgroundCopyFile_iface.lpVtbl = &BITS_IBackgroundCopyFile_Vtbl; This->IBackgroundCopyFile_iface.lpVtbl = &BackgroundCopyFileVtbl;
This->ref = 1; This->ref = 1;
This->fileProgress.BytesTotal = BG_SIZE_UNKNOWN; This->fileProgress.BytesTotal = BG_SIZE_UNKNOWN;
......
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