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
c08fb1a2
Commit
c08fb1a2
authored
Nov 11, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsWriteEndElement.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
34964157
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
1 deletion
+70
-1
webservices.spec
dlls/webservices/webservices.spec
+1
-1
writer.c
dlls/webservices/writer.c
+69
-0
No files found.
dlls/webservices/webservices.spec
View file @
c08fb1a2
...
...
@@ -173,7 +173,7 @@
@ stub WsWriteElement
@ stub WsWriteEndAttribute
@ stub WsWriteEndCData
@ st
ub WsWriteEndElement
@ st
dcall WsWriteEndElement(ptr ptr)
@ stub WsWriteEndStartElement
@ stub WsWriteEnvelopeEnd
@ stub WsWriteEnvelopeStart
...
...
dlls/webservices/writer.c
View file @
c08fb1a2
...
...
@@ -520,6 +520,75 @@ static HRESULT write_startelement( struct writer *writer )
return
S_OK
;
}
static
HRESULT
write_endelement
(
struct
writer
*
writer
)
{
WS_XML_ELEMENT_NODE
*
elem
=
(
WS_XML_ELEMENT_NODE
*
)
writer
->
current
;
ULONG
size
;
HRESULT
hr
;
/* '</prefix:localname>' */
size
=
elem
->
localName
->
length
+
3
/* '</>' */
;
if
(
elem
->
prefix
)
size
+=
elem
->
prefix
->
length
+
1
/* ':' */
;
if
((
hr
=
write_grow_buffer
(
writer
,
size
))
!=
S_OK
)
return
hr
;
write_char
(
writer
,
'<'
);
write_char
(
writer
,
'/'
);
if
(
elem
->
prefix
)
{
write_bytes
(
writer
,
elem
->
prefix
->
bytes
,
elem
->
prefix
->
length
);
write_char
(
writer
,
':'
);
}
write_bytes
(
writer
,
elem
->
localName
->
bytes
,
elem
->
localName
->
length
);
write_char
(
writer
,
'>'
);
return
S_OK
;
}
/**************************************************************************
* WsWriteEndElement [webservices.@]
*/
HRESULT
WINAPI
WsWriteEndElement
(
WS_XML_WRITER
*
handle
,
WS_ERROR
*
error
)
{
struct
writer
*
writer
=
(
struct
writer
*
)
handle
;
HRESULT
hr
;
TRACE
(
"%p %p
\n
"
,
handle
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
writer
)
return
E_INVALIDARG
;
if
(
writer
->
state
==
WRITER_STATE_STARTELEMENT
)
{
/* '/>' */
if
((
hr
=
write_startelement
(
writer
))
!=
S_OK
)
return
hr
;
if
((
hr
=
write_grow_buffer
(
writer
,
2
))
!=
S_OK
)
return
hr
;
write_char
(
writer
,
'/'
);
write_char
(
writer
,
'>'
);
writer
->
current
=
writer
->
current
->
parent
;
writer
->
state
=
WRITER_STATE_STARTENDELEMENT
;
return
S_OK
;
}
else
{
struct
node
*
node
=
alloc_node
(
WS_XML_NODE_TYPE_END_ELEMENT
);
if
(
!
node
)
return
E_OUTOFMEMORY
;
/* '</prefix:localname>' */
if
((
hr
=
write_endelement
(
writer
))
!=
S_OK
)
{
free_node
(
node
);
return
hr
;
}
write_insert_node
(
writer
,
node
);
writer
->
current
=
node
->
parent
;
writer
->
state
=
WRITER_STATE_ENDELEMENT
;
return
S_OK
;
}
return
WS_E_INVALID_OPERATION
;
}
/**************************************************************************
* WsWriteStartElement [webservices.@]
*/
...
...
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