From 45ded33bc96d5981c182ea7bf01652e3b79b0d1e Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 9 Oct 2015 10:19:30 +0200 Subject: [PATCH] webservices: Implement WsReadEndElement. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/webservices/reader.c | 43 +++++++++++++++++++++++++++++++ dlls/webservices/webservices.spec | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index e4a377b669c..e48a8f2ad75 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -833,6 +833,49 @@ static HRESULT read_to_startelement( struct reader *reader, BOOL *found ) return hr; } +static HRESULT read_endelement( struct reader *reader ) +{ + struct node *node; + unsigned int ch, skip; + + if (reader->state != READER_STATE_TEXT) return WS_E_INVALID_FORMAT; + + if (read_cmp( reader, "') + { + read_skip( reader, 1 ); + break; + } + if (!read_isnamechar( ch )) return WS_E_INVALID_FORMAT; + read_skip( reader, skip ); + } + + if (!(node = alloc_node( WS_XML_NODE_TYPE_END_ELEMENT ))) return E_OUTOFMEMORY; + list_add_after( &reader->current->entry, &node->entry ); + reader->current = node; + reader->state = READER_STATE_ENDELEMENT; + return S_OK; +} + +/************************************************************************** + * WsReadEndElement [webservices.@] + */ +HRESULT WINAPI WsReadEndElement( WS_XML_READER *handle, WS_ERROR *error ) +{ + struct reader *reader = (struct reader *)handle; + + TRACE( "%p %p\n", handle, error ); + if (error) FIXME( "ignoring error parameter\n" ); + + if (!reader) return E_INVALIDARG; + return read_endelement( reader ); +} + /************************************************************************** * WsReadStartElement [webservices.@] */ diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 4dce6393b0c..4a587e78743 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -109,7 +109,7 @@ @ stub WsReadCharsUtf8 @ stub WsReadElement @ stub WsReadEndAttribute -@ stub WsReadEndElement +@ stdcall WsReadEndElement(ptr ptr) @ stub WsReadEndpointAddressExtension @ stub WsReadEnvelopeEnd @ stub WsReadEnvelopeStart