[5/6] webservices: Implement WsReadStartAttribute.
Hans Leidekker
hans at codeweavers.com
Fri Jan 29 06:27:29 CST 2016
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
dlls/webservices/reader.c | 24 ++++++++++++++++++++++++
dlls/webservices/webservices.spec | 2 +-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c
index 13ca50b..82a3a1a 100644
--- a/dlls/webservices/reader.c
+++ b/dlls/webservices/reader.c
@@ -378,6 +378,7 @@ enum reader_state
READER_STATE_INITIAL,
READER_STATE_BOF,
READER_STATE_STARTELEMENT,
+ READER_STATE_STARTATTRIBUTE,
READER_STATE_STARTENDELEMENT,
READER_STATE_TEXT,
READER_STATE_ENDELEMENT,
@@ -393,6 +394,7 @@ struct reader
enum reader_state state;
struct node *root;
struct node *current;
+ ULONG current_attr;
WS_XML_READER_INPUT_TYPE input_type;
const unsigned char *input_data;
ULONG input_size;
@@ -1341,6 +1343,28 @@ HRESULT WINAPI WsMoveReader( WS_XML_READER *handle, WS_MOVE_TO move, BOOL *found
return read_move_to( reader, move, found );
}
+/**************************************************************************
+ * WsReadStartAttribute [webservices.@]
+ */
+HRESULT WINAPI WsReadStartAttribute( WS_XML_READER *handle, ULONG index, WS_ERROR *error )
+{
+ struct reader *reader = (struct reader *)handle;
+ WS_XML_ELEMENT_NODE *elem;
+
+ TRACE( "%p %u %p\n", handle, index, error );
+ if (error) FIXME( "ignoring error parameter\n" );
+
+ if (!reader) return E_INVALIDARG;
+
+ elem = &reader->current->hdr;
+ if (reader->state != READER_STATE_STARTELEMENT || index >= elem->attributeCount)
+ return WS_E_INVALID_FORMAT;
+
+ reader->current_attr = index;
+ reader->state = READER_STATE_STARTATTRIBUTE;
+ return S_OK;
+}
+
static WCHAR *xmltext_to_widechar( WS_HEAP *heap, const WS_XML_TEXT *text )
{
WCHAR *ret;
diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec
index 6931f77..062af8d 100644
--- a/dlls/webservices/webservices.spec
+++ b/dlls/webservices/webservices.spec
@@ -118,7 +118,7 @@
@ stub WsReadMetadata
@ stdcall WsReadNode(ptr ptr)
@ stub WsReadQualifiedName
-@ stub WsReadStartAttribute
+@ stdcall WsReadStartAttribute(ptr long ptr)
@ stdcall WsReadStartElement(ptr ptr)
@ stdcall WsReadToStartElement(ptr ptr ptr ptr ptr)
@ stdcall WsReadType(ptr long long ptr long ptr ptr long ptr)
--
2.7.0.rc3
More information about the wine-patches
mailing list