Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f2e98544
Commit
f2e98544
authored
Nov 28, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Implement Get/SetNotifyInterface().
parent
fb3c5890
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
5 deletions
+56
-5
job.c
dlls/qmgr/job.c
+38
-4
qmgr.h
dlls/qmgr/qmgr.h
+5
-1
qmgr_local.idl
dlls/qmgr/qmgr_local.idl
+1
-0
job.c
dlls/qmgr/tests/job.c
+12
-0
No files found.
dlls/qmgr/job.c
View file @
f2e98544
...
@@ -77,6 +77,8 @@ static ULONG WINAPI BackgroundCopyJob_Release(IBackgroundCopyJob2 *iface)
...
@@ -77,6 +77,8 @@ static ULONG WINAPI BackgroundCopyJob_Release(IBackgroundCopyJob2 *iface)
{
{
This
->
cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
This
->
cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
cs
);
DeleteCriticalSection
(
&
This
->
cs
);
if
(
This
->
callback
)
IBackgroundCopyCallback2_Release
(
This
->
callback
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
displayName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
displayName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
description
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
description
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
@@ -418,6 +420,7 @@ static HRESULT WINAPI BackgroundCopyJob_SetNotifyFlags(
...
@@ -418,6 +420,7 @@ static HRESULT WINAPI BackgroundCopyJob_SetNotifyFlags(
TRACE
(
"(%p)->(0x%x)
\n
"
,
This
,
Val
);
TRACE
(
"(%p)->(0x%x)
\n
"
,
This
,
Val
);
if
(
is_job_done
(
This
))
return
BG_E_INVALID_STATE
;
if
(
Val
&
~
valid_flags
)
return
E_NOTIMPL
;
if
(
Val
&
~
valid_flags
)
return
E_NOTIMPL
;
This
->
notify_flags
=
Val
;
This
->
notify_flags
=
Val
;
return
S_OK
;
return
S_OK
;
...
@@ -443,8 +446,29 @@ static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface(
...
@@ -443,8 +446,29 @@ static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface(
IUnknown
*
Val
)
IUnknown
*
Val
)
{
{
BackgroundCopyJobImpl
*
This
=
impl_from_IBackgroundCopyJob2
(
iface
);
BackgroundCopyJobImpl
*
This
=
impl_from_IBackgroundCopyJob2
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
Val
);
HRESULT
hr
=
S_OK
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
Val
);
if
(
is_job_done
(
This
))
return
BG_E_INVALID_STATE
;
if
(
This
->
callback
)
{
IBackgroundCopyCallback2_Release
(
This
->
callback
);
This
->
callback
=
NULL
;
This
->
callback2
=
FALSE
;
}
if
(
Val
)
{
hr
=
IUnknown_QueryInterface
(
Val
,
&
IID_IBackgroundCopyCallback2
,
(
void
**
)
&
This
->
callback
);
if
(
FAILED
(
hr
))
hr
=
IUnknown_QueryInterface
(
Val
,
&
IID_IBackgroundCopyCallback
,
(
void
**
)
&
This
->
callback
);
else
This
->
callback2
=
TRUE
;
}
return
hr
;
}
}
static
HRESULT
WINAPI
BackgroundCopyJob_GetNotifyInterface
(
static
HRESULT
WINAPI
BackgroundCopyJob_GetNotifyInterface
(
...
@@ -452,8 +476,16 @@ static HRESULT WINAPI BackgroundCopyJob_GetNotifyInterface(
...
@@ -452,8 +476,16 @@ static HRESULT WINAPI BackgroundCopyJob_GetNotifyInterface(
IUnknown
**
pVal
)
IUnknown
**
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
=
(
IUnknown
*
)
This
->
callback
;
if
(
*
pVal
)
IUnknown_AddRef
(
*
pVal
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
BackgroundCopyJob_SetMinimumRetryDelay
(
static
HRESULT
WINAPI
BackgroundCopyJob_SetMinimumRetryDelay
(
...
@@ -705,6 +737,8 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID
...
@@ -705,6 +737,8 @@ 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
;
This
->
notify_flags
=
BG_NOTIFY_JOB_ERROR
|
BG_NOTIFY_JOB_TRANSFERRED
;
This
->
callback
=
NULL
;
This
->
callback2
=
FALSE
;
*
job
=
This
;
*
job
=
This
;
...
...
dlls/qmgr/qmgr.h
View file @
f2e98544
...
@@ -22,10 +22,12 @@
...
@@ -22,10 +22,12 @@
#define __QMGR_H__
#define __QMGR_H__
#include "windef.h"
#include "windef.h"
#include "objbase.h"
#define COBJMACROS
#define COBJMACROS
#include "objbase.h"
#include "bits1_5.h"
#include "bits1_5.h"
#include "bits3_0.h"
#include <string.h>
#include <string.h>
#include "wine/list.h"
#include "wine/list.h"
...
@@ -44,6 +46,8 @@ typedef struct
...
@@ -44,6 +46,8 @@ typedef struct
BG_JOB_PROGRESS
jobProgress
;
BG_JOB_PROGRESS
jobProgress
;
BG_JOB_STATE
state
;
BG_JOB_STATE
state
;
ULONG
notify_flags
;
ULONG
notify_flags
;
IBackgroundCopyCallback2
*
callback
;
BOOL
callback2
;
/* IBackgroundCopyCallback2 is supported in addition to IBackgroundCopyCallback */
/* Protects file list, and progress */
/* Protects file list, and progress */
CRITICAL_SECTION
cs
;
CRITICAL_SECTION
cs
;
struct
list
entryFromQmgr
;
struct
list
entryFromQmgr
;
...
...
dlls/qmgr/qmgr_local.idl
View file @
f2e98544
...
@@ -22,3 +22,4 @@
...
@@ -22,3 +22,4 @@
#
define
DO_NO_IMPORTS
#
define
DO_NO_IMPORTS
#
include
"bits1_5.idl"
#
include
"bits1_5.idl"
#
include
"bits3_0.idl"
dlls/qmgr/tests/job.c
View file @
f2e98544
...
@@ -446,6 +446,17 @@ static void test_NotifyFlags(void)
...
@@ -446,6 +446,17 @@ static void test_NotifyFlags(void)
ok
(
flags
==
(
BG_NOTIFY_JOB_ERROR
|
BG_NOTIFY_JOB_TRANSFERRED
),
"flags 0x%08x
\n
"
,
flags
);
ok
(
flags
==
(
BG_NOTIFY_JOB_ERROR
|
BG_NOTIFY_JOB_TRANSFERRED
),
"flags 0x%08x
\n
"
,
flags
);
}
}
static
void
test_NotifyInterface
(
void
)
{
HRESULT
hr
;
IUnknown
*
unk
;
unk
=
(
IUnknown
*
)
0xdeadbeef
;
hr
=
IBackgroundCopyJob_GetNotifyInterface
(
test_job
,
&
unk
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
unk
==
NULL
,
"got %p
\n
"
,
unk
);
}
typedef
void
(
*
test_t
)(
void
);
typedef
void
(
*
test_t
)(
void
);
START_TEST
(
job
)
START_TEST
(
job
)
...
@@ -458,6 +469,7 @@ START_TEST(job)
...
@@ -458,6 +469,7 @@ START_TEST(job)
test_GetState
,
test_GetState
,
test_ResumeEmpty
,
test_ResumeEmpty
,
test_NotifyFlags
,
test_NotifyFlags
,
test_NotifyInterface
,
0
0
};
};
static
const
test_t
tests_bits20
[]
=
{
static
const
test_t
tests_bits20
[]
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment