qmgr: Implement Get/SetNotifyFlags().
This commit is contained in:
parent
5889f822f1
commit
76c3f0cffb
|
@ -410,8 +410,17 @@ static HRESULT WINAPI BackgroundCopyJob_SetNotifyFlags(
|
||||||
ULONG Val)
|
ULONG Val)
|
||||||
{
|
{
|
||||||
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
|
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
|
||||||
FIXME("(%p)->(%d): stub\n", This, Val);
|
static const ULONG valid_flags = BG_NOTIFY_JOB_TRANSFERRED |
|
||||||
return E_NOTIMPL;
|
BG_NOTIFY_JOB_ERROR |
|
||||||
|
BG_NOTIFY_DISABLE |
|
||||||
|
BG_NOTIFY_JOB_MODIFICATION |
|
||||||
|
BG_NOTIFY_FILE_TRANSFERRED;
|
||||||
|
|
||||||
|
TRACE("(%p)->(0x%x)\n", This, Val);
|
||||||
|
|
||||||
|
if (Val & ~valid_flags) return E_NOTIMPL;
|
||||||
|
This->notify_flags = Val;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI BackgroundCopyJob_GetNotifyFlags(
|
static HRESULT WINAPI BackgroundCopyJob_GetNotifyFlags(
|
||||||
|
@ -419,8 +428,14 @@ static HRESULT WINAPI BackgroundCopyJob_GetNotifyFlags(
|
||||||
ULONG *pVal)
|
ULONG *pVal)
|
||||||
{
|
{
|
||||||
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
|
BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface);
|
||||||
FIXME("(%p)->(%p): stub\n", This, pVal);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%p)\n", This, pVal);
|
||||||
|
|
||||||
|
if (!pVal) return E_INVALIDARG;
|
||||||
|
|
||||||
|
*pVal = This->notify_flags;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface(
|
static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface(
|
||||||
|
@ -689,6 +704,7 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID
|
||||||
|
|
||||||
This->state = BG_JOB_STATE_SUSPENDED;
|
This->state = BG_JOB_STATE_SUSPENDED;
|
||||||
This->description = NULL;
|
This->description = NULL;
|
||||||
|
This->notify_flags = BG_NOTIFY_JOB_ERROR | BG_NOTIFY_JOB_TRANSFERRED;
|
||||||
|
|
||||||
*job = This;
|
*job = This;
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ typedef struct
|
||||||
struct list files;
|
struct list files;
|
||||||
BG_JOB_PROGRESS jobProgress;
|
BG_JOB_PROGRESS jobProgress;
|
||||||
BG_JOB_STATE state;
|
BG_JOB_STATE state;
|
||||||
|
ULONG notify_flags;
|
||||||
/* Protects file list, and progress */
|
/* Protects file list, and progress */
|
||||||
CRITICAL_SECTION cs;
|
CRITICAL_SECTION cs;
|
||||||
struct list entryFromQmgr;
|
struct list entryFromQmgr;
|
||||||
|
|
|
@ -414,6 +414,18 @@ static void test_CompleteLocalURL(void)
|
||||||
HeapFree(GetProcessHeap(), 0, urlB);
|
HeapFree(GetProcessHeap(), 0, urlB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_NotifyFlags(void)
|
||||||
|
{
|
||||||
|
ULONG flags;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
/* check default flags */
|
||||||
|
flags = 0;
|
||||||
|
hr = IBackgroundCopyJob_GetNotifyFlags(test_job, &flags);
|
||||||
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
ok(flags == (BG_NOTIFY_JOB_ERROR | BG_NOTIFY_JOB_TRANSFERRED), "flags 0x%08x\n", flags);
|
||||||
|
}
|
||||||
|
|
||||||
typedef void (*test_t)(void);
|
typedef void (*test_t)(void);
|
||||||
|
|
||||||
START_TEST(job)
|
START_TEST(job)
|
||||||
|
@ -425,6 +437,7 @@ START_TEST(job)
|
||||||
test_GetProgress_preTransfer,
|
test_GetProgress_preTransfer,
|
||||||
test_GetState,
|
test_GetState,
|
||||||
test_ResumeEmpty,
|
test_ResumeEmpty,
|
||||||
|
test_NotifyFlags,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
static const test_t tests_bits20[] = {
|
static const test_t tests_bits20[] = {
|
||||||
|
|
|
@ -29,6 +29,7 @@ cpp_quote("#define BG_NOTIFY_JOB_TRANSFERRED 0x0001")
|
||||||
cpp_quote("#define BG_NOTIFY_JOB_ERROR 0x0002")
|
cpp_quote("#define BG_NOTIFY_JOB_ERROR 0x0002")
|
||||||
cpp_quote("#define BG_NOTIFY_DISABLE 0x0004")
|
cpp_quote("#define BG_NOTIFY_DISABLE 0x0004")
|
||||||
cpp_quote("#define BG_NOTIFY_JOB_MODIFICATION 0x0008")
|
cpp_quote("#define BG_NOTIFY_JOB_MODIFICATION 0x0008")
|
||||||
|
cpp_quote("#define BG_NOTIFY_FILE_TRANSFERRED 0x0010")
|
||||||
|
|
||||||
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
||||||
cpp_quote("#undef EnumJobs")
|
cpp_quote("#undef EnumJobs")
|
||||||
|
|
Loading…
Reference in New Issue