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
9eee37f5
Commit
9eee37f5
authored
Oct 22, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Add a stub implementation of WsGetXmlAttribute.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ce71c50f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
1 deletion
+71
-1
reader.c
dlls/webservices/reader.c
+10
-0
reader.c
dlls/webservices/tests/reader.c
+60
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
No files found.
dlls/webservices/reader.c
View file @
9eee37f5
...
...
@@ -565,6 +565,16 @@ HRESULT WINAPI WsGetReaderProperty( WS_XML_READER *handle, WS_XML_READER_PROPERT
return
get_reader_prop
(
reader
,
id
,
buf
,
size
);
}
/**************************************************************************
* WsGetXmlAttribute [webservices.@]
*/
HRESULT
WINAPI
WsGetXmlAttribute
(
WS_XML_READER
*
handle
,
const
WS_XML_STRING
*
attr
,
WS_HEAP
*
heap
,
WCHAR
**
str
,
ULONG
*
len
,
WS_ERROR
*
error
)
{
FIXME
(
"%p %p %p %p %p %p: stub
\n
"
,
handle
,
debugstr_xmlstr
(
attr
),
heap
,
str
,
len
,
error
);
return
E_NOTIMPL
;
}
static
WS_XML_STRING
*
alloc_xml_string
(
const
char
*
data
,
ULONG
len
)
{
WS_XML_STRING
*
ret
;
...
...
dlls/webservices/tests/reader.c
View file @
9eee37f5
...
...
@@ -58,6 +58,9 @@ static const char data7[] =
static
const
char
data8
[]
=
"<node1><node2>test</node2></node1>"
;
static
const
char
data9
[]
=
"<text xml:attr=
\"
value
\"
>test</text>"
;
static
void
test_WsCreateError
(
void
)
{
HRESULT
hr
;
...
...
@@ -1286,6 +1289,62 @@ static void test_WsReadType(void)
WsFreeHeap
(
heap
);
}
static
void
test_WsGetXmlAttribute
(
void
)
{
static
const
WCHAR
valueW
[]
=
{
'v'
,
'a'
,
'l'
,
'u'
,
'e'
,
0
};
HRESULT
hr
;
WS_XML_READER
*
reader
;
WS_XML_STRING
xmlstr
;
WS_HEAP
*
heap
;
WCHAR
*
str
;
ULONG
count
;
int
found
;
hr
=
WsCreateHeap
(
1
<<
16
,
0
,
NULL
,
0
,
&
heap
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateReader
(
NULL
,
0
,
&
reader
,
NULL
)
;
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
set_input
(
reader
,
data9
,
sizeof
(
data9
)
-
1
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsFillReader
(
reader
,
sizeof
(
data9
)
-
1
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
found
=
-
1
;
hr
=
WsReadToStartElement
(
reader
,
NULL
,
NULL
,
&
found
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
found
==
TRUE
,
"got %d
\n
"
,
found
);
xmlstr
.
bytes
=
(
BYTE
*
)
"attr"
;
xmlstr
.
length
=
sizeof
(
"attr"
)
-
1
;
xmlstr
.
dictionary
=
NULL
;
xmlstr
.
id
=
0
;
str
=
NULL
;
count
=
0
;
hr
=
WsGetXmlAttribute
(
reader
,
&
xmlstr
,
heap
,
&
str
,
&
count
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
str
!=
NULL
,
"str not set
\n
"
);
todo_wine
ok
(
count
==
5
,
"got %u
\n
"
,
count
);
/* string is not null-terminated */
if
(
str
)
ok
(
!
memcmp
(
str
,
valueW
,
count
*
sizeof
(
WCHAR
)
),
"wrong data
\n
"
);
xmlstr
.
bytes
=
(
BYTE
*
)
"none"
;
xmlstr
.
length
=
sizeof
(
"none"
)
-
1
;
xmlstr
.
dictionary
=
NULL
;
xmlstr
.
id
=
0
;
str
=
(
WCHAR
*
)
0xdeadbeef
;
count
=
0xdeadbeef
;
hr
=
WsGetXmlAttribute
(
reader
,
&
xmlstr
,
heap
,
&
str
,
&
count
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
str
==
NULL
,
"str not set
\n
"
);
todo_wine
ok
(
!
count
,
"got %u
\n
"
,
count
);
WsFreeReader
(
reader
);
WsFreeHeap
(
heap
);
}
START_TEST
(
reader
)
{
test_WsCreateError
();
...
...
@@ -1298,4 +1357,5 @@ START_TEST(reader)
test_WsReadEndElement
();
test_WsReadNode
();
test_WsReadType
();
test_WsGetXmlAttribute
();
}
dlls/webservices/webservices.spec
View file @
9eee37f5
...
...
@@ -89,7 +89,7 @@
@ stub WsGetServiceProxyProperty
@ stub WsGetWriterPosition
@ stdcall WsGetWriterProperty(ptr long ptr long ptr)
@ st
ub WsGetXmlAttribute
@ st
dcall WsGetXmlAttribute(ptr ptr ptr ptr ptr ptr)
@ stub WsInitializeMessage
@ stub WsMarkHeaderAsUnderstood
@ stub WsMatchPolicyAlternative
...
...
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