Hans Leidekker : webservices: Implement WsReadEndElement.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 9 09:55:20 CDT 2015
Module: wine
Branch: master
Commit: 45ded33bc96d5981c182ea7bf01652e3b79b0d1e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=45ded33bc96d5981c182ea7bf01652e3b79b0d1e
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri Oct 9 10:19:30 2015 +0200
webservices: Implement WsReadEndElement.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 e4a377b..e48a8f2 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, "</", 2 )) return WS_E_INVALID_FORMAT;
+ read_skip( reader, 2 );
+
+ for (;;)
+ {
+ if (!(ch = read_utf8_char( reader, &skip ))) return WS_E_INVALID_FORMAT;
+ if (ch == '>')
+ {
+ 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 4dce639..4a587e7 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
More information about the wine-cvs
mailing list