Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
49776353
Commit
49776353
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 WsXmlStringEquals.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e86470d4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
1 deletion
+65
-1
reader.c
dlls/webservices/reader.c
+15
-0
reader.c
dlls/webservices/tests/reader.c
+48
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
webservices.h
include/webservices.h
+1
-0
No files found.
dlls/webservices/reader.c
View file @
49776353
...
...
@@ -1564,3 +1564,18 @@ HRESULT WINAPI WsSetInputToBuffer( WS_XML_READER *handle, WS_XML_BUFFER *buffer,
reader
->
read_bufptr
=
reader
->
input_data
;
return
S_OK
;
}
/**************************************************************************
* WsXmlStringEquals [webservices.@]
*/
HRESULT
WINAPI
WsXmlStringEquals
(
const
WS_XML_STRING
*
str1
,
const
WS_XML_STRING
*
str2
,
WS_ERROR
*
error
)
{
TRACE
(
"%s %s %p
\n
"
,
debugstr_xmlstr
(
str1
),
debugstr_xmlstr
(
str2
),
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
str1
||
!
str2
)
return
E_INVALIDARG
;
if
(
str1
->
length
!=
str2
->
length
)
return
S_FALSE
;
if
(
!
memcmp
(
str1
->
bytes
,
str2
->
bytes
,
str1
->
length
))
return
S_OK
;
return
S_FALSE
;
}
dlls/webservices/tests/reader.c
View file @
49776353
...
...
@@ -1406,6 +1406,53 @@ static void test_WsGetXmlAttribute(void)
WsFreeHeap
(
heap
);
}
static
void
test_WsXmlStringEquals
(
void
)
{
BYTE
bom
[]
=
{
0xef
,
0xbb
,
0xbf
};
WS_XML_STRING
str1
=
{
0
,
NULL
},
str2
=
{
0
,
NULL
};
HRESULT
hr
;
hr
=
WsXmlStringEquals
(
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsXmlStringEquals
(
&
str1
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsXmlStringEquals
(
NULL
,
&
str2
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsXmlStringEquals
(
&
str1
,
&
str2
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
str1
.
length
=
1
;
str1
.
bytes
=
(
BYTE
*
)
"a"
;
hr
=
WsXmlStringEquals
(
&
str1
,
&
str1
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
str2
.
length
=
1
;
str2
.
bytes
=
(
BYTE
*
)
"b"
;
hr
=
WsXmlStringEquals
(
&
str1
,
&
str2
,
NULL
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
str2
.
length
=
1
;
str2
.
bytes
=
bom
;
hr
=
WsXmlStringEquals
(
&
str1
,
&
str2
,
NULL
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
str1
.
length
=
3
;
hr
=
WsXmlStringEquals
(
&
str1
,
&
str2
,
NULL
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
str2
.
length
=
3
;
hr
=
WsXmlStringEquals
(
&
str1
,
&
str2
,
NULL
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
str1
.
length
=
3
;
str1
.
bytes
=
bom
;
hr
=
WsXmlStringEquals
(
&
str1
,
&
str2
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
}
START_TEST
(
reader
)
{
test_WsCreateError
();
...
...
@@ -1420,4 +1467,5 @@ START_TEST(reader)
test_WsReadNode
();
test_WsReadType
();
test_WsGetXmlAttribute
();
test_WsXmlStringEquals
();
}
dlls/webservices/webservices.spec
View file @
49776353
...
...
@@ -190,4 +190,4 @@
@ stub WsWriteXmlBuffer
@ stub WsWriteXmlBufferToBytes
@ stub WsWriteXmlnsAttribute
@ st
ub WsXmlStringEquals
@ st
dcall WsXmlStringEquals(ptr ptr ptr)
include/webservices.h
View file @
49776353
...
...
@@ -498,6 +498,7 @@ HRESULT WINAPI WsWriteStartElement(WS_XML_WRITER*, const WS_XML_STRING*, const W
const
WS_XML_STRING
*
,
WS_ERROR
*
);
HRESULT
WINAPI
WsWriteType
(
WS_XML_WRITER
*
,
WS_TYPE_MAPPING
,
WS_TYPE
,
const
void
*
,
WS_WRITE_OPTION
,
const
void
*
,
ULONG
,
WS_ERROR
*
);
HRESULT
WINAPI
WsXmlStringEquals
(
const
WS_XML_STRING
*
,
const
WS_XML_STRING
*
,
WS_ERROR
*
);
#define WS_S_ASYNC 0x003d0000
#define WS_S_END 0x003d0001
...
...
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