Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ec0cae49
Commit
ec0cae49
authored
May 18, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
May 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsReadElement.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
524fa657
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
1 deletion
+60
-1
reader.c
dlls/webservices/reader.c
+18
-0
reader.c
dlls/webservices/tests/reader.c
+38
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
webservices.h
include/webservices.h
+3
-0
No files found.
dlls/webservices/reader.c
View file @
ec0cae49
...
...
@@ -3598,6 +3598,24 @@ HRESULT WINAPI WsReadType( WS_XML_READER *handle, WS_TYPE_MAPPING mapping, WS_TY
}
/**************************************************************************
* WsReadElement [webservices.@]
*/
HRESULT
WINAPI
WsReadElement
(
WS_XML_READER
*
handle
,
const
WS_ELEMENT_DESCRIPTION
*
desc
,
WS_READ_OPTION
option
,
WS_HEAP
*
heap
,
void
*
value
,
ULONG
size
,
WS_ERROR
*
error
)
{
struct
reader
*
reader
=
(
struct
reader
*
)
handle
;
TRACE
(
"%p %p %u %p %p %u %p
\n
"
,
handle
,
desc
,
option
,
heap
,
value
,
size
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
reader
||
!
desc
||
!
value
)
return
E_INVALIDARG
;
return
read_type
(
reader
,
WS_ELEMENT_TYPE_MAPPING
,
desc
->
type
,
desc
->
elementLocalName
,
desc
->
elementNs
,
desc
->
typeDescription
,
option
,
heap
,
value
,
size
);
}
/**************************************************************************
* WsSetErrorProperty [webservices.@]
*/
HRESULT
WINAPI
WsSetErrorProperty
(
WS_ERROR
*
handle
,
WS_ERROR_PROPERTY_ID
id
,
const
void
*
value
,
...
...
dlls/webservices/tests/reader.c
View file @
ec0cae49
...
...
@@ -3271,6 +3271,43 @@ static void test_double(void)
WsFreeHeap
(
heap
);
}
static
void
test_WsReadElement
(
void
)
{
WS_XML_STRING
localname
=
{
1
,
(
BYTE
*
)
"t"
},
ns
=
{
0
,
NULL
};
HRESULT
hr
;
WS_XML_READER
*
reader
;
WS_ELEMENT_DESCRIPTION
desc
;
UINT32
val
;
hr
=
WsCreateReader
(
NULL
,
0
,
&
reader
,
NULL
)
;
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
desc
.
elementLocalName
=
&
localname
;
desc
.
elementNs
=
&
ns
;
desc
.
type
=
WS_UINT32_TYPE
;
desc
.
typeDescription
=
NULL
;
prepare_struct_type_test
(
reader
,
"<t>1</t>"
);
hr
=
WsReadElement
(
NULL
,
&
desc
,
WS_READ_REQUIRED_VALUE
,
NULL
,
&
val
,
sizeof
(
val
),
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
prepare_struct_type_test
(
reader
,
"<t>1</t>"
);
hr
=
WsReadElement
(
reader
,
NULL
,
WS_READ_REQUIRED_VALUE
,
NULL
,
&
val
,
sizeof
(
val
),
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
prepare_struct_type_test
(
reader
,
"<t>1</t>"
);
hr
=
WsReadElement
(
reader
,
&
desc
,
WS_READ_REQUIRED_VALUE
,
NULL
,
NULL
,
sizeof
(
val
),
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
prepare_struct_type_test
(
reader
,
"<t>1</t>"
);
val
=
0xdeadbeef
;
hr
=
WsReadElement
(
reader
,
&
desc
,
WS_READ_REQUIRED_VALUE
,
NULL
,
&
val
,
sizeof
(
val
),
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
val
==
1
,
"got %u
\n
"
,
val
);
WsFreeReader
(
reader
);
}
START_TEST
(
reader
)
{
test_WsCreateError
();
...
...
@@ -3300,4 +3337,5 @@ START_TEST(reader)
test_WsDateTimeToFileTime
();
test_WsFileTimeToDateTime
();
test_double
();
test_WsReadElement
();
}
dlls/webservices/webservices.spec
View file @
ec0cae49
...
...
@@ -107,7 +107,7 @@
@ stub WsReadBytes
@ stub WsReadChars
@ stub WsReadCharsUtf8
@ st
ub WsReadElement
@ st
dcall WsReadElement(ptr ptr long ptr ptr long ptr)
@ stdcall WsReadEndAttribute(ptr ptr)
@ stdcall WsReadEndElement(ptr ptr)
@ stub WsReadEndpointAddressExtension
...
...
include/webservices.h
View file @
ec0cae49
...
...
@@ -1069,6 +1069,8 @@ HRESULT WINAPI WsOpenServiceProxy(WS_SERVICE_PROXY*, const WS_ENDPOINT_ADDRESS*,
WS_ERROR
*
);
HRESULT
WINAPI
WsReadAttribute
(
WS_XML_READER
*
,
const
WS_ATTRIBUTE_DESCRIPTION
*
,
WS_READ_OPTION
,
WS_HEAP
*
,
void
*
,
ULONG
,
WS_ERROR
*
);
HRESULT
WINAPI
WsReadElement
(
WS_XML_READER
*
,
const
WS_ELEMENT_DESCRIPTION
*
,
WS_READ_OPTION
,
WS_HEAP
*
,
void
*
,
ULONG
,
WS_ERROR
*
);
HRESULT
WINAPI
WsReadEndAttribute
(
WS_XML_READER
*
,
WS_ERROR
*
);
HRESULT
WINAPI
WsReadEndElement
(
WS_XML_READER
*
,
WS_ERROR
*
);
HRESULT
WINAPI
WsReadNode
(
WS_XML_READER
*
,
WS_ERROR
*
);
...
...
@@ -1078,6 +1080,7 @@ HRESULT WINAPI WsReadToStartElement(WS_XML_READER*, const WS_XML_STRING*, const
BOOL
*
,
WS_ERROR
*
);
HRESULT
WINAPI
WsReadType
(
WS_XML_READER
*
,
WS_TYPE_MAPPING
,
WS_TYPE
,
const
void
*
,
WS_READ_OPTION
,
WS_HEAP
*
,
void
*
,
ULONG
,
WS_ERROR
*
);
HRESULT
WINAPI
WsReadValue
(
WS_XML_READER
*
,
WS_VALUE_TYPE
,
void
*
,
ULONG
,
WS_ERROR
*
);
HRESULT
WINAPI
WsResetHeap
(
WS_HEAP
*
,
WS_ERROR
*
);
HRESULT
WINAPI
WsSendMessage
(
WS_CHANNEL
*
,
WS_MESSAGE
*
,
const
WS_MESSAGE_DESCRIPTION
*
,
WS_WRITE_OPTION
,
const
void
*
,
ULONG
,
const
WS_ASYNC_CONTEXT
*
,
WS_ERROR
*
);
...
...
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