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
f01a209e
Commit
f01a209e
authored
Jul 04, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsSetReaderPosition.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5ad00660
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
1 deletion
+66
-1
reader.c
dlls/webservices/reader.c
+17
-0
reader.c
dlls/webservices/tests/reader.c
+48
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
No files found.
dlls/webservices/reader.c
View file @
f01a209e
...
...
@@ -3979,3 +3979,20 @@ HRESULT WINAPI WsGetReaderPosition( WS_XML_READER *handle, WS_XML_NODE_POSITION
pos
->
node
=
reader
->
current
;
return
S_OK
;
}
/**************************************************************************
* WsSetReaderPosition [webservices.@]
*/
HRESULT
WINAPI
WsSetReaderPosition
(
WS_XML_READER
*
handle
,
const
WS_XML_NODE_POSITION
*
pos
,
WS_ERROR
*
error
)
{
struct
reader
*
reader
=
(
struct
reader
*
)
handle
;
TRACE
(
"%p %p %p
\n
"
,
handle
,
pos
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
reader
||
!
pos
||
(
struct
xmlbuf
*
)
pos
->
buffer
!=
reader
->
input_buf
)
return
E_INVALIDARG
;
if
(
!
reader
->
input_buf
)
return
WS_E_INVALID_OPERATION
;
reader
->
current
=
pos
->
node
;
return
S_OK
;
}
dlls/webservices/tests/reader.c
View file @
f01a209e
...
...
@@ -3495,6 +3495,53 @@ static void test_WsGetReaderPosition(void)
WsFreeHeap
(
heap
);
}
static
void
test_WsSetReaderPosition
(
void
)
{
WS_HEAP
*
heap
;
WS_XML_READER
*
reader
;
WS_XML_BUFFER
*
buf1
,
*
buf2
;
WS_XML_NODE_POSITION
pos
;
HRESULT
hr
;
hr
=
WsCreateHeap
(
1
<<
16
,
0
,
NULL
,
0
,
&
heap
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsSetReaderPosition
(
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateReader
(
NULL
,
0
,
&
reader
,
NULL
)
;
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateXmlBuffer
(
heap
,
NULL
,
0
,
&
buf1
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsSetInputToBuffer
(
reader
,
buf1
,
NULL
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsSetReaderPosition
(
reader
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
pos
.
buffer
=
pos
.
node
=
NULL
;
hr
=
WsGetReaderPosition
(
reader
,
&
pos
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
pos
.
buffer
==
buf1
,
"wrong buffer
\n
"
);
ok
(
pos
.
node
!=
NULL
,
"node not set
\n
"
);
hr
=
WsSetReaderPosition
(
reader
,
&
pos
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
/* different buffer */
hr
=
WsCreateXmlBuffer
(
heap
,
NULL
,
0
,
&
buf2
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
pos
.
buffer
=
buf2
;
hr
=
WsSetReaderPosition
(
reader
,
&
pos
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
WsFreeReader
(
reader
);
WsFreeHeap
(
heap
);
}
START_TEST
(
reader
)
{
test_WsCreateError
();
...
...
@@ -3528,4 +3575,5 @@ START_TEST(reader)
test_WsReadValue
();
test_WsResetError
();
test_WsGetReaderPosition
();
test_WsSetReaderPosition
();
}
dlls/webservices/webservices.spec
View file @
f01a209e
...
...
@@ -156,7 +156,7 @@
@ stdcall WsSetMessageProperty(ptr long ptr long ptr)
@ stdcall WsSetOutput(ptr ptr ptr ptr long ptr)
@ stdcall WsSetOutputToBuffer(ptr ptr ptr long ptr)
@ st
ub WsSetReaderPosition
@ st
dcall WsSetReaderPosition(ptr ptr ptr)
@ stdcall WsSetWriterPosition(ptr ptr ptr)
@ stub WsShutdownSessionChannel
@ stub WsSkipNode
...
...
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