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
4373eb30
Commit
4373eb30
authored
Jun 26, 2017
by
Owen Rudge
Committed by
Alexandre Julliard
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsdapi: Implement Get/SetRetransmitParams.
Signed-off-by:
Owen Rudge
<
orudge@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b3024a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
24 deletions
+54
-24
msgparams.c
dlls/wsdapi/msgparams.c
+30
-4
msgparams.c
dlls/wsdapi/tests/msgparams.c
+24
-20
No files found.
dlls/wsdapi/msgparams.c
View file @
4373eb30
...
...
@@ -38,6 +38,7 @@ typedef struct IWSDMessageParametersImpl {
typedef
struct
IWSDUdpMessageParametersImpl
{
IWSDMessageParametersImpl
base
;
WSDUdpRetransmitParams
retransmitParams
;
}
IWSDUdpMessageParametersImpl
;
static
inline
IWSDMessageParametersImpl
*
impl_from_IWSDMessageParameters
(
IWSDMessageParameters
*
iface
)
...
...
@@ -248,14 +249,32 @@ static HRESULT WINAPI IWSDUdpMessageParametersImpl_GetLowerParameters(IWSDUdpMes
static
HRESULT
WINAPI
IWSDUdpMessageParametersImpl_SetRetransmitParams
(
IWSDUdpMessageParameters
*
This
,
const
WSDUdpRetransmitParams
*
pParams
)
{
FIXME
(
"(%p, %p)
\n
"
,
This
,
pParams
);
return
E_NOTIMPL
;
IWSDUdpMessageParametersImpl
*
impl
=
impl_from_IWSDUdpMessageParameters
(
This
);
TRACE
(
"(%p, %p)
\n
"
,
impl
,
pParams
);
if
(
pParams
==
NULL
)
{
return
E_INVALIDARG
;
}
impl
->
retransmitParams
=
*
pParams
;
return
S_OK
;
}
static
HRESULT
WINAPI
IWSDUdpMessageParametersImpl_GetRetransmitParams
(
IWSDUdpMessageParameters
*
This
,
WSDUdpRetransmitParams
*
pParams
)
{
FIXME
(
"(%p, %p)
\n
"
,
This
,
pParams
);
return
E_NOTIMPL
;
IWSDUdpMessageParametersImpl
*
impl
=
impl_from_IWSDUdpMessageParameters
(
This
);
TRACE
(
"(%p, %p)
\n
"
,
impl
,
pParams
);
if
(
pParams
==
NULL
)
{
return
E_POINTER
;
}
*
pParams
=
impl
->
retransmitParams
;
return
S_OK
;
}
static
const
IWSDUdpMessageParametersVtbl
udpMsgParamsVtbl
=
...
...
@@ -297,6 +316,13 @@ HRESULT WINAPI WSDCreateUdpMessageParameters(IWSDUdpMessageParameters **ppTxPara
obj
->
base
.
IWSDMessageParameters_iface
.
lpVtbl
=
(
IWSDMessageParametersVtbl
*
)
&
udpMsgParamsVtbl
;
obj
->
base
.
ref
=
1
;
/* Populate default retransmit parameters */
obj
->
retransmitParams
.
ulSendDelay
=
0
;
obj
->
retransmitParams
.
ulRepeat
=
1
;
obj
->
retransmitParams
.
ulRepeatMinDelay
=
50
;
obj
->
retransmitParams
.
ulRepeatMaxDelay
=
250
;
obj
->
retransmitParams
.
ulRepeatUpperDelay
=
450
;
*
ppTxParams
=
(
IWSDUdpMessageParameters
*
)
&
obj
->
base
.
IWSDMessageParameters_iface
;
TRACE
(
"Returning iface %p
\n
"
,
*
ppTxParams
);
...
...
dlls/wsdapi/tests/msgparams.c
View file @
4373eb30
...
...
@@ -197,17 +197,17 @@ static void RetransmitParams_tests(void)
ok
(
udpMessageParams
!=
NULL
,
"WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: udpMessageParams == NULL
\n
"
);
rc
=
IWSDUdpMessageParameters_GetRetransmitParams
(
udpMessageParams
,
NULL
);
todo_wine
ok
(
rc
==
E_POINTER
,
"GetRetransmitParams returned unexpected result: %08x
\n
"
,
rc
);
ok
(
rc
==
E_POINTER
,
"GetRetransmitParams returned unexpected result: %08x
\n
"
,
rc
);
/* Check if the default values are returned */
rc
=
IWSDUdpMessageParameters_GetRetransmitParams
(
udpMessageParams
,
&
returnedParams
);
todo_wine
ok
(
rc
==
S_OK
,
"GetRetransmitParams failed: %08x
\n
"
,
rc
);
ok
(
rc
==
S_OK
,
"GetRetransmitParams failed: %08x
\n
"
,
rc
);
ok
(
returnedParams
.
ulSendDelay
==
0
,
"ulSendDelay = %d
\n
"
,
returnedParams
.
ulSendDelay
);
todo_wine
ok
(
returnedParams
.
ulRepeat
==
1
,
"ulRepeat = %d
\n
"
,
returnedParams
.
ulRepeat
);
todo_wine
ok
(
returnedParams
.
ulRepeatMinDelay
==
50
,
"ulRepeatMinDelay = %d
\n
"
,
returnedParams
.
ulRepeatMinDelay
);
todo_wine
ok
(
returnedParams
.
ulRepeatMaxDelay
==
250
,
"ulRepeatMaxDelay = %d
\n
"
,
returnedParams
.
ulRepeatMaxDelay
);
todo_wine
ok
(
returnedParams
.
ulRepeatUpperDelay
==
450
,
"ulRepeatUpperDelay = %d
\n
"
,
returnedParams
.
ulRepeatUpperDelay
);
ok
(
returnedParams
.
ulRepeat
==
1
,
"ulRepeat = %d
\n
"
,
returnedParams
.
ulRepeat
);
ok
(
returnedParams
.
ulRepeatMinDelay
==
50
,
"ulRepeatMinDelay = %d
\n
"
,
returnedParams
.
ulRepeatMinDelay
);
ok
(
returnedParams
.
ulRepeatMaxDelay
==
250
,
"ulRepeatMaxDelay = %d
\n
"
,
returnedParams
.
ulRepeatMaxDelay
);
ok
(
returnedParams
.
ulRepeatUpperDelay
==
450
,
"ulRepeatUpperDelay = %d
\n
"
,
returnedParams
.
ulRepeatUpperDelay
);
/* Now try setting some custom parameters */
origParams
.
ulSendDelay
=
100
;
...
...
@@ -217,18 +217,22 @@ static void RetransmitParams_tests(void)
origParams
.
ulRepeatUpperDelay
=
500
;
rc
=
IWSDUdpMessageParameters_SetRetransmitParams
(
udpMessageParams
,
&
origParams
);
todo_wine
ok
(
rc
==
S_OK
,
"SetRetransmitParams failed: %08x
\n
"
,
rc
);
ok
(
rc
==
S_OK
,
"SetRetransmitParams failed: %08x
\n
"
,
rc
);
ZeroMemory
(
&
returnedParams
,
sizeof
(
WSDUdpRetransmitParams
));
rc
=
IWSDUdpMessageParameters_GetRetransmitParams
(
udpMessageParams
,
&
returnedParams
);
todo_wine
ok
(
rc
==
S_OK
,
"GetRetransmitParams failed: %08x
\n
"
,
rc
);
ok
(
rc
==
S_OK
,
"GetRetransmitParams failed: %08x
\n
"
,
rc
);
todo_wine
ok
(
origParams
.
ulSendDelay
==
returnedParams
.
ulSendDelay
,
"ulSendDelay = %d
\n
"
,
returnedParams
.
ulSendDelay
);
todo_wine
ok
(
origParams
.
ulRepeat
==
returnedParams
.
ulRepeat
,
"ulRepeat = %d
\n
"
,
returnedParams
.
ulRepeat
);
todo_wine
ok
(
origParams
.
ulRepeatMinDelay
==
returnedParams
.
ulRepeatMinDelay
,
"ulRepeatMinDelay = %d
\n
"
,
returnedParams
.
ulRepeatMinDelay
);
todo_wine
ok
(
origParams
.
ulRepeatMaxDelay
==
returnedParams
.
ulRepeatMaxDelay
,
"ulRepeatMaxDelay = %d
\n
"
,
returnedParams
.
ulRepeatMaxDelay
);
todo_wine
ok
(
origParams
.
ulRepeatUpperDelay
==
returnedParams
.
ulRepeatUpperDelay
,
"ulRepeatUpperDelay = %d
\n
"
,
returnedParams
.
ulRepeatUpperDelay
);
ok
(
origParams
.
ulSendDelay
==
returnedParams
.
ulSendDelay
,
"ulSendDelay = %d
\n
"
,
returnedParams
.
ulSendDelay
);
ok
(
origParams
.
ulRepeat
==
returnedParams
.
ulRepeat
,
"ulRepeat = %d
\n
"
,
returnedParams
.
ulRepeat
);
ok
(
origParams
.
ulRepeatMinDelay
==
returnedParams
.
ulRepeatMinDelay
,
"ulRepeatMinDelay = %d
\n
"
,
returnedParams
.
ulRepeatMinDelay
);
ok
(
origParams
.
ulRepeatMaxDelay
==
returnedParams
.
ulRepeatMaxDelay
,
"ulRepeatMaxDelay = %d
\n
"
,
returnedParams
.
ulRepeatMaxDelay
);
ok
(
origParams
.
ulRepeatUpperDelay
==
returnedParams
.
ulRepeatUpperDelay
,
"ulRepeatUpperDelay = %d
\n
"
,
returnedParams
.
ulRepeatUpperDelay
);
/* Try setting a null parameter */
rc
=
IWSDUdpMessageParameters_SetRetransmitParams
(
udpMessageParams
,
NULL
);
ok
(
rc
==
E_INVALIDARG
,
"SetRetransmitParams returned unexpected result: %08x
\n
"
,
rc
);
/* Now attempt to set some invalid parameters - these appear to be accepted */
origParams
.
ulSendDelay
=
INFINITE
;
...
...
@@ -238,18 +242,18 @@ static void RetransmitParams_tests(void)
origParams
.
ulRepeatUpperDelay
=
100
;
rc
=
IWSDUdpMessageParameters_SetRetransmitParams
(
udpMessageParams
,
&
origParams
);
todo_wine
ok
(
rc
==
S_OK
,
"SetRetransmitParams failed: %08x
\n
"
,
rc
);
ok
(
rc
==
S_OK
,
"SetRetransmitParams failed: %08x
\n
"
,
rc
);
ZeroMemory
(
&
returnedParams
,
sizeof
(
WSDUdpRetransmitParams
));
rc
=
IWSDUdpMessageParameters_GetRetransmitParams
(
udpMessageParams
,
&
returnedParams
);
todo_wine
ok
(
rc
==
S_OK
,
"GetRetransmitParams failed: %08x
\n
"
,
rc
);
ok
(
rc
==
S_OK
,
"GetRetransmitParams failed: %08x
\n
"
,
rc
);
todo_wine
ok
(
origParams
.
ulSendDelay
==
returnedParams
.
ulSendDelay
,
"ulSendDelay = %d
\n
"
,
returnedParams
.
ulSendDelay
);
todo_wine
ok
(
origParams
.
ulRepeat
==
returnedParams
.
ulRepeat
,
"ulRepeat = %d
\n
"
,
returnedParams
.
ulRepeat
);
todo_wine
ok
(
origParams
.
ulRepeatMinDelay
==
returnedParams
.
ulRepeatMinDelay
,
"ulRepeatMinDelay = %d
\n
"
,
returnedParams
.
ulRepeatMinDelay
);
todo_wine
ok
(
origParams
.
ulRepeatMaxDelay
==
returnedParams
.
ulRepeatMaxDelay
,
"ulRepeatMaxDelay = %d
\n
"
,
returnedParams
.
ulRepeatMaxDelay
);
todo_wine
ok
(
origParams
.
ulRepeatUpperDelay
==
returnedParams
.
ulRepeatUpperDelay
,
"ulRepeatUpperDelay = %d
\n
"
,
returnedParams
.
ulRepeatUpperDelay
);
ok
(
origParams
.
ulSendDelay
==
returnedParams
.
ulSendDelay
,
"ulSendDelay = %d
\n
"
,
returnedParams
.
ulSendDelay
);
ok
(
origParams
.
ulRepeat
==
returnedParams
.
ulRepeat
,
"ulRepeat = %d
\n
"
,
returnedParams
.
ulRepeat
);
ok
(
origParams
.
ulRepeatMinDelay
==
returnedParams
.
ulRepeatMinDelay
,
"ulRepeatMinDelay = %d
\n
"
,
returnedParams
.
ulRepeatMinDelay
);
ok
(
origParams
.
ulRepeatMaxDelay
==
returnedParams
.
ulRepeatMaxDelay
,
"ulRepeatMaxDelay = %d
\n
"
,
returnedParams
.
ulRepeatMaxDelay
);
ok
(
origParams
.
ulRepeatUpperDelay
==
returnedParams
.
ulRepeatUpperDelay
,
"ulRepeatUpperDelay = %d
\n
"
,
returnedParams
.
ulRepeatUpperDelay
);
ret
=
IWSDUdpMessageParameters_Release
(
udpMessageParams
);
ok
(
ret
==
0
,
"IWSDUdpMessageParameters_Release() has %d references, should have 0
\n
"
,
ret
);
...
...
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