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
919b1b5f
Commit
919b1b5f
authored
Nov 11, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsWriteStartAttribute.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
08c32f4e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
3 deletions
+48
-3
reader.c
dlls/webservices/reader.c
+2
-2
webservices.spec
dlls/webservices/webservices.spec
+1
-1
webservices_private.h
dlls/webservices/webservices_private.h
+2
-0
writer.c
dlls/webservices/writer.c
+43
-0
No files found.
dlls/webservices/reader.c
View file @
919b1b5f
...
...
@@ -284,7 +284,7 @@ struct node *alloc_node( WS_XML_NODE_TYPE type )
return
ret
;
}
static
void
free_attribute
(
WS_XML_ATTRIBUTE
*
attr
)
void
free_attribute
(
WS_XML_ATTRIBUTE
*
attr
)
{
if
(
!
attr
)
return
;
heap_free
(
attr
->
prefix
);
...
...
@@ -807,7 +807,7 @@ static HRESULT read_xmldecl( struct reader *reader )
return
S_OK
;
}
static
HRESULT
append_attribute
(
WS_XML_ELEMENT_NODE
*
elem
,
WS_XML_ATTRIBUTE
*
attr
)
HRESULT
append_attribute
(
WS_XML_ELEMENT_NODE
*
elem
,
WS_XML_ATTRIBUTE
*
attr
)
{
if
(
elem
->
attributeCount
)
{
...
...
dlls/webservices/webservices.spec
View file @
919b1b5f
...
...
@@ -181,7 +181,7 @@
@ stub WsWriteMessageStart
@ stub WsWriteNode
@ stub WsWriteQualifiedName
@ st
ub WsWriteStartAttribute
@ st
dcall WsWriteStartAttribute(ptr ptr ptr ptr long ptr)
@ stub WsWriteStartCData
@ stdcall WsWriteStartElement(ptr ptr ptr ptr ptr)
@ stub WsWriteText
...
...
dlls/webservices/webservices_private.h
View file @
919b1b5f
...
...
@@ -29,6 +29,8 @@ void *ws_realloc( WS_HEAP *, void *, SIZE_T ) DECLSPEC_HIDDEN;
void
ws_free
(
WS_HEAP
*
,
void
*
)
DECLSPEC_HIDDEN
;
const
char
*
debugstr_xmlstr
(
const
WS_XML_STRING
*
)
DECLSPEC_HIDDEN
;
WS_XML_STRING
*
alloc_xml_string
(
const
char
*
,
ULONG
)
DECLSPEC_HIDDEN
;
HRESULT
append_attribute
(
WS_XML_ELEMENT_NODE
*
,
WS_XML_ATTRIBUTE
*
)
DECLSPEC_HIDDEN
;
void
free_attribute
(
WS_XML_ATTRIBUTE
*
)
DECLSPEC_HIDDEN
;
struct
node
{
...
...
dlls/webservices/writer.c
View file @
919b1b5f
...
...
@@ -633,6 +633,49 @@ HRESULT WINAPI WsWriteEndStartElement( WS_XML_WRITER *handle, WS_ERROR *error )
}
/**************************************************************************
* WsWriteStartAttribute [webservices.@]
*/
HRESULT
WINAPI
WsWriteStartAttribute
(
WS_XML_WRITER
*
handle
,
const
WS_XML_STRING
*
prefix
,
const
WS_XML_STRING
*
localname
,
const
WS_XML_STRING
*
ns
,
BOOL
single
,
WS_ERROR
*
error
)
{
struct
writer
*
writer
=
(
struct
writer
*
)
handle
;
WS_XML_ELEMENT_NODE
*
elem
;
WS_XML_ATTRIBUTE
*
attr
;
HRESULT
hr
=
E_OUTOFMEMORY
;
TRACE
(
"%p %s %s %s %d %p
\n
"
,
handle
,
debugstr_xmlstr
(
prefix
),
debugstr_xmlstr
(
localname
),
debugstr_xmlstr
(
ns
),
single
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
writer
||
!
localname
||
!
ns
)
return
E_INVALIDARG
;
if
(
writer
->
state
!=
WRITER_STATE_STARTELEMENT
)
return
WS_E_INVALID_OPERATION
;
elem
=
(
WS_XML_ELEMENT_NODE
*
)
writer
->
current
;
if
(
!
(
attr
=
heap_alloc_zero
(
sizeof
(
*
attr
)
)))
return
E_OUTOFMEMORY
;
attr
->
singleQuote
=
!!
single
;
if
(
prefix
&&
!
(
attr
->
prefix
=
alloc_xml_string
(
(
const
char
*
)
prefix
->
bytes
,
prefix
->
length
)))
goto
error
;
if
(
!
(
attr
->
localName
=
alloc_xml_string
(
(
const
char
*
)
localname
->
bytes
,
localname
->
length
)))
goto
error
;
if
(
!
(
attr
->
ns
=
alloc_xml_string
(
(
const
char
*
)
ns
->
bytes
,
ns
->
length
)))
goto
error
;
if
((
hr
=
append_attribute
(
elem
,
attr
))
!=
S_OK
)
goto
error
;
writer
->
state
=
WRITER_STATE_STARTATTRIBUTE
;
return
S_OK
;
error:
free_attribute
(
attr
);
return
hr
;
}
/**************************************************************************
* WsWriteStartElement [webservices.@]
*/
HRESULT
WINAPI
WsWriteStartElement
(
WS_XML_WRITER
*
handle
,
const
WS_XML_STRING
*
prefix
,
...
...
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