Dan Hipschman : qmgr: Implement IBackgroundCopyJob_AddFileSet.
Alexandre Julliard
julliard at winehq.org
Sat Mar 15 05:53:50 CDT 2008
Module: wine
Branch: master
Commit: 136a4ebbb2237994c1289b35685d62666c50a66a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=136a4ebbb2237994c1289b35685d62666c50a66a
Author: Dan Hipschman <dsh at linux.ucla.edu>
Date: Fri Mar 14 15:51:40 2008 -0700
qmgr: Implement IBackgroundCopyJob_AddFileSet.
---
dlls/qmgr/job.c | 11 +++++++++--
dlls/qmgr/tests/job.c | 14 ++++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c
index eb337c0..e8cd839 100644
--- a/dlls/qmgr/job.c
+++ b/dlls/qmgr/job.c
@@ -77,8 +77,15 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_AddFileSet(
ULONG cFileCount,
BG_FILE_INFO *pFileSet)
{
- FIXME("Not implemented\n");
- return E_NOTIMPL;
+ ULONG i;
+ for (i = 0; i < cFileCount; ++i)
+ {
+ HRESULT hr = IBackgroundCopyJob_AddFile(iface, pFileSet[i].RemoteName,
+ pFileSet[i].LocalName);
+ if (!SUCCEEDED(hr))
+ return hr;
+ }
+ return S_OK;
}
static HRESULT WINAPI BITS_IBackgroundCopyJob_AddFile(
diff --git a/dlls/qmgr/tests/job.c b/dlls/qmgr/tests/job.c
index f06a619..cc64b0c 100644
--- a/dlls/qmgr/tests/job.c
+++ b/dlls/qmgr/tests/job.c
@@ -191,6 +191,19 @@ static void test_AddFile(void)
ok(hres == S_OK, "Second call to AddFile failed: 0x%08x\n", hres);
}
+/* Test adding a set of files */
+static void test_AddFileSet(void)
+{
+ HRESULT hres;
+ BG_FILE_INFO files[2] =
+ {
+ {test_remotePathA, test_localPathA},
+ {test_remotePathB, test_localPathB}
+ };
+ hres = IBackgroundCopyJob_AddFileSet(test_job, 2, files);
+ ok(hres == S_OK, "AddFileSet failed: 0x%08x\n", hres);
+}
+
/* Test creation of a job enumerator */
static void test_EnumFiles(void)
{
@@ -466,6 +479,7 @@ START_TEST(job)
test_GetType,
test_GetName,
test_AddFile,
+ test_AddFileSet,
test_EnumFiles,
test_GetProgress_preTransfer,
test_GetState,
More information about the wine-cvs
mailing list