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
600e2e53
Commit
600e2e53
authored
Jun 21, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsGetWriterPosition.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
76819779
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
1 deletion
+66
-1
writer.c
dlls/webservices/tests/writer.c
+47
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
writer.c
dlls/webservices/writer.c
+18
-0
No files found.
dlls/webservices/tests/writer.c
View file @
600e2e53
...
...
@@ -1486,6 +1486,52 @@ static void test_WsMoveWriter(void)
WsFreeHeap
(
heap
);
}
static
void
test_WsGetWriterPosition
(
void
)
{
WS_HEAP
*
heap
;
WS_XML_WRITER
*
writer
;
WS_XML_BUFFER
*
buffer
;
WS_XML_NODE_POSITION
pos
;
HRESULT
hr
;
hr
=
WsGetWriterPosition
(
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateHeap
(
1
<<
16
,
0
,
NULL
,
0
,
&
heap
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateWriter
(
NULL
,
0
,
&
writer
,
NULL
)
;
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetWriterPosition
(
writer
,
&
pos
,
NULL
);
ok
(
hr
==
WS_E_INVALID_OPERATION
,
"got %08x
\n
"
,
hr
);
hr
=
set_output
(
writer
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
/* writer must be set to an XML buffer */
hr
=
WsGetWriterPosition
(
writer
,
&
pos
,
NULL
);
todo_wine
ok
(
hr
==
WS_E_INVALID_OPERATION
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateXmlBuffer
(
heap
,
NULL
,
0
,
&
buffer
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsSetOutputToBuffer
(
writer
,
buffer
,
NULL
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetWriterPosition
(
writer
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
pos
.
buffer
=
pos
.
node
=
NULL
;
hr
=
WsGetWriterPosition
(
writer
,
&
pos
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
pos
.
buffer
!=
NULL
,
"buffer not set
\n
"
);
ok
(
pos
.
node
!=
NULL
,
"node not set
\n
"
);
WsFreeWriter
(
writer
);
WsFreeHeap
(
heap
);
}
START_TEST
(
writer
)
{
test_WsCreateWriter
();
...
...
@@ -1505,4 +1551,5 @@ START_TEST(writer)
test_WsGetPrefixFromNamespace
();
test_complex_struct_type
();
test_WsMoveWriter
();
test_WsGetWriterPosition
();
}
dlls/webservices/webservices.spec
View file @
600e2e53
...
...
@@ -87,7 +87,7 @@
@ stub WsGetSecurityTokenProperty
@ stub WsGetServiceHostProperty
@ stdcall WsGetServiceProxyProperty(ptr long ptr long ptr)
@ st
ub WsGetWriterPosition
@ st
dcall WsGetWriterPosition(ptr ptr ptr)
@ stdcall WsGetWriterProperty(ptr long ptr long ptr)
@ stdcall WsGetXmlAttribute(ptr ptr ptr ptr ptr ptr)
@ stub WsInitializeMessage
...
...
dlls/webservices/writer.c
View file @
600e2e53
...
...
@@ -1801,3 +1801,21 @@ HRESULT WINAPI WsMoveWriter( WS_XML_WRITER *handle, WS_MOVE_TO move, BOOL *found
return
write_move_to
(
writer
,
move
,
found
);
}
/**************************************************************************
* WsGetWriterPosition [webservices.@]
*/
HRESULT
WINAPI
WsGetWriterPosition
(
WS_XML_WRITER
*
handle
,
WS_XML_NODE_POSITION
*
pos
,
WS_ERROR
*
error
)
{
struct
writer
*
writer
=
(
struct
writer
*
)
handle
;
TRACE
(
"%p %p %p
\n
"
,
handle
,
pos
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
writer
||
!
pos
)
return
E_INVALIDARG
;
if
(
!
writer
->
output_type
)
return
WS_E_INVALID_OPERATION
;
pos
->
buffer
=
(
WS_XML_BUFFER
*
)
writer
->
output_buf
;
pos
->
node
=
writer
->
current
;
return
S_OK
;
}
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