Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
95dd6a87
Commit
95dd6a87
authored
Aug 17, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsRemoveMappedHeader.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ecd1fa8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
1 deletion
+65
-1
msg.c
dlls/webservices/msg.c
+29
-0
msg.c
dlls/webservices/tests/msg.c
+35
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
No files found.
dlls/webservices/msg.c
View file @
95dd6a87
...
...
@@ -778,3 +778,32 @@ HRESULT WINAPI WsAddMappedHeader( WS_MESSAGE *handle, const WS_XML_STRING *name,
msg
->
header
[
i
]
=
header
;
return
S_OK
;
}
/**************************************************************************
* WsRemoveMappedHeader [webservices.@]
*/
HRESULT
WINAPI
WsRemoveMappedHeader
(
WS_MESSAGE
*
handle
,
const
WS_XML_STRING
*
name
,
WS_ERROR
*
error
)
{
struct
msg
*
msg
=
(
struct
msg
*
)
handle
;
ULONG
i
;
TRACE
(
"%p %s %p
\n
"
,
handle
,
debugstr_xmlstr
(
name
),
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
handle
||
!
name
)
return
E_INVALIDARG
;
if
(
msg
->
state
<
WS_MESSAGE_STATE_INITIALIZED
)
return
WS_E_INVALID_OPERATION
;
for
(
i
=
0
;
i
<
msg
->
header_count
;
i
++
)
{
if
(
msg
->
header
[
i
]
->
type
||
!
msg
->
header
[
i
]
->
mapped
)
continue
;
if
(
WsXmlStringEquals
(
name
,
&
msg
->
header
[
i
]
->
name
,
NULL
)
==
S_OK
)
{
free_header
(
msg
->
header
[
i
]
);
memmove
(
&
msg
->
header
[
i
],
&
msg
->
header
[
i
+
1
],
(
msg
->
header_count
-
i
)
*
sizeof
(
struct
header
*
)
);
msg
->
header_count
--
;
break
;
}
}
return
S_OK
;
}
dlls/webservices/tests/msg.c
View file @
95dd6a87
...
...
@@ -703,6 +703,40 @@ static void test_WsAddMappedHeader(void)
WsFreeMessage
(
msg
);
}
static
void
test_WsRemoveMappedHeader
(
void
)
{
static
const
WS_XML_STRING
header
=
{
6
,
(
BYTE
*
)
"Header"
},
value
=
{
5
,
(
BYTE
*
)
"value"
};
WS_MESSAGE
*
msg
;
HRESULT
hr
;
hr
=
WsRemoveMappedHeader
(
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateMessage
(
WS_ADDRESSING_VERSION_1_0
,
WS_ENVELOPE_VERSION_SOAP_1_2
,
NULL
,
0
,
&
msg
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsRemoveMappedHeader
(
msg
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsRemoveMappedHeader
(
msg
,
&
header
,
NULL
);
ok
(
hr
==
WS_E_INVALID_OPERATION
,
"got %08x
\n
"
,
hr
);
hr
=
WsInitializeMessage
(
msg
,
WS_REQUEST_MESSAGE
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsAddMappedHeader
(
msg
,
&
header
,
WS_XML_STRING_TYPE
,
WS_WRITE_REQUIRED_VALUE
,
&
value
,
sizeof
(
value
),
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsRemoveMappedHeader
(
msg
,
&
header
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
/* again */
hr
=
WsRemoveMappedHeader
(
msg
,
&
header
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
WsFreeMessage
(
msg
);
}
START_TEST
(
msg
)
{
test_WsCreateMessage
();
...
...
@@ -715,4 +749,5 @@ START_TEST(msg)
test_WsSetHeader
();
test_WsRemoveHeader
();
test_WsAddMappedHeader
();
test_WsRemoveMappedHeader
();
}
dlls/webservices/webservices.spec
View file @
95dd6a87
...
...
@@ -129,7 +129,7 @@
@ stub WsRegisterOperationForCancel
@ stub WsRemoveCustomHeader
@ stdcall WsRemoveHeader(ptr long ptr)
@ st
ub WsRemoveMappedHeader
@ st
dcall WsRemoveMappedHeader(ptr ptr ptr)
@ stub WsRemoveNode
@ stub WsRequestReply
@ stub WsRequestSecurityToken
...
...
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