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
2bfcd98c
Commit
2bfcd98c
authored
Nov 10, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsMoveReader.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
29b1c115
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
1 deletion
+88
-1
reader.c
dlls/webservices/reader.c
+87
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
No files found.
dlls/webservices/reader.c
View file @
2bfcd98c
...
...
@@ -1218,6 +1218,93 @@ HRESULT WINAPI WsReadToStartElement( WS_XML_READER *handle, const WS_XML_STRING
return
read_to_startelement
(
reader
,
found
);
}
static
HRESULT
read_move_to
(
struct
reader
*
reader
,
WS_MOVE_TO
move
,
BOOL
*
found
)
{
struct
list
*
ptr
;
BOOL
success
=
FALSE
;
HRESULT
hr
=
S_OK
;
if
(
!
read_end_of_data
(
reader
))
{
while
(
reader
->
state
!=
READER_STATE_EOF
&&
(
hr
=
read_node
(
reader
))
==
S_OK
)
{
/* nothing */
};
if
(
hr
!=
S_OK
)
return
hr
;
}
switch
(
move
)
{
case
WS_MOVE_TO_FIRST_NODE
:
if
((
ptr
=
list_head
(
&
reader
->
current
->
parent
->
children
)))
{
reader
->
current
=
LIST_ENTRY
(
ptr
,
struct
node
,
entry
);
success
=
TRUE
;
}
break
;
case
WS_MOVE_TO_NEXT_NODE
:
if
((
ptr
=
list_next
(
&
reader
->
current
->
parent
->
children
,
&
reader
->
current
->
entry
)))
{
reader
->
current
=
LIST_ENTRY
(
ptr
,
struct
node
,
entry
);
success
=
TRUE
;
}
break
;
case
WS_MOVE_TO_PREVIOUS_NODE
:
if
((
ptr
=
list_prev
(
&
reader
->
current
->
parent
->
children
,
&
reader
->
current
->
entry
)))
{
reader
->
current
=
LIST_ENTRY
(
ptr
,
struct
node
,
entry
);
success
=
TRUE
;
}
break
;
case
WS_MOVE_TO_CHILD_NODE
:
if
((
ptr
=
list_head
(
&
reader
->
current
->
children
)))
{
reader
->
current
=
LIST_ENTRY
(
ptr
,
struct
node
,
entry
);
success
=
TRUE
;
}
break
;
case
WS_MOVE_TO_BOF
:
reader
->
current
=
reader
->
root
;
success
=
TRUE
;
break
;
case
WS_MOVE_TO_EOF
:
if
((
ptr
=
list_tail
(
&
reader
->
root
->
children
)))
{
reader
->
current
=
LIST_ENTRY
(
ptr
,
struct
node
,
entry
);
success
=
TRUE
;
}
break
;
default:
FIXME
(
"unhandled move %u
\n
"
,
move
);
return
E_NOTIMPL
;
}
if
(
found
)
{
*
found
=
success
;
return
S_OK
;
}
return
success
?
S_OK
:
WS_E_INVALID_FORMAT
;
}
/**************************************************************************
* WsMoveReader [webservices.@]
*/
HRESULT
WINAPI
WsMoveReader
(
WS_XML_READER
*
handle
,
WS_MOVE_TO
move
,
BOOL
*
found
,
WS_ERROR
*
error
)
{
struct
reader
*
reader
=
(
struct
reader
*
)
handle
;
TRACE
(
"%p %u %p %p
\n
"
,
handle
,
move
,
found
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
reader
)
return
E_INVALIDARG
;
if
(
!
reader
->
input_type
)
return
WS_E_INVALID_OPERATION
;
return
read_move_to
(
reader
,
move
,
found
);
}
static
WCHAR
*
xmltext_to_widechar
(
WS_HEAP
*
heap
,
const
WS_XML_TEXT
*
text
)
{
WCHAR
*
ret
;
...
...
dlls/webservices/webservices.spec
View file @
2bfcd98c
...
...
@@ -93,7 +93,7 @@
@ stub WsInitializeMessage
@ stub WsMarkHeaderAsUnderstood
@ stub WsMatchPolicyAlternative
@ st
ub WsMoveReader
@ st
dcall WsMoveReader(ptr long ptr ptr)
@ stub WsMoveWriter
@ stub WsOpenChannel
@ stub WsOpenListener
...
...
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