[1/2] qmgr: Implement IBackgroundCopyJob_EnumFiles. [take 2]
Dan Hipschman
dsh at linux.ucla.edu
Wed Feb 27 23:04:07 CST 2008
Implement IBackgroundCopyJob_EnumFiles.
From: Roy Shea <roy at cs.hmc.edu>
Date: Thu Dec 20 18:38:31 CST 2007
Sorry, don't know how [take 1] slipped by.
This is exactly the same except it corrects the name of parameter and
should compile this time.
---
dlls/qmgr/job.c | 6 +++---
dlls/qmgr/tests/job.c | 28 ++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c
index 3db3c79..20d72dd 100644
--- a/dlls/qmgr/job.c
+++ b/dlls/qmgr/job.c
@@ -103,10 +103,10 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_AddFile(
static HRESULT WINAPI BITS_IBackgroundCopyJob_EnumFiles(
IBackgroundCopyJob* iface,
- IEnumBackgroundCopyFiles **pEnum)
+ IEnumBackgroundCopyFiles **ppEnum)
{
- FIXME("Not implemented\n");
- return E_NOTIMPL;
+ TRACE("\n");
+ return EnumBackgroundCopyFilesConstructor((LPVOID *) ppEnum, iface);
}
static HRESULT WINAPI BITS_IBackgroundCopyJob_Suspend(
diff --git a/dlls/qmgr/tests/job.c b/dlls/qmgr/tests/job.c
index 7aec1a7..6fcf681 100644
--- a/dlls/qmgr/tests/job.c
+++ b/dlls/qmgr/tests/job.c
@@ -191,6 +191,33 @@ static void test_AddFile(void)
ok(hres == S_OK, "Second call to AddFile failed: 0x%08x\n", hres);
}
+/* Test creation of a job enumerator */
+static void test_EnumFiles(void)
+{
+ HRESULT hres;
+ IEnumBackgroundCopyFiles *enumFiles;
+ ULONG res;
+
+ hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA,
+ test_localPathA);
+ if (hres != S_OK)
+ {
+ skip("Unable to add file to job\n");
+ return;
+ }
+
+ hres = IBackgroundCopyJob_EnumFiles(test_job, &enumFiles);
+ ok(hres == S_OK, "EnumFiles failed: 0x%08x\n", hres);
+ if(hres != S_OK)
+ {
+ skip("Unable to create file enumerator.\n");
+ return;
+ }
+
+ res = IEnumBackgroundCopyFiles_Release(enumFiles);
+ ok(res == 0, "Bad ref count on release: %u\n", res);
+}
+
typedef void (*test_t)(void);
START_TEST(job)
@@ -200,6 +227,7 @@ START_TEST(job)
test_GetType,
test_GetName,
test_AddFile,
+ test_EnumFiles,
0
};
const test_t *test;
More information about the wine-patches
mailing list