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
419604e1
Commit
419604e1
authored
May 30, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
May 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsGetDictionary.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8214fcfa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
2 deletions
+59
-2
reader.c
dlls/webservices/reader.c
+18
-0
reader.c
dlls/webservices/tests/reader.c
+40
-1
webservices.spec
dlls/webservices/webservices.spec
+1
-1
No files found.
dlls/webservices/reader.c
View file @
419604e1
...
...
@@ -86,6 +86,24 @@ static WS_XML_DICTIONARY dict_builtin =
{
0x82704485
,
0x222a
,
0x4f7c
,{
0xb9
,
0x7b
,
0xe9
,
0xa4
,
0x62
,
0xa9
,
0x66
,
0x2b
}}
};
/**************************************************************************
* WsGetDictionary [webservices.@]
*/
HRESULT
WINAPI
WsGetDictionary
(
WS_ENCODING
encoding
,
WS_XML_DICTIONARY
**
dict
,
WS_ERROR
*
error
)
{
TRACE
(
"%u %p %p
\n
"
,
encoding
,
dict
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
dict
)
return
E_INVALIDARG
;
if
(
encoding
==
WS_ENCODING_XML_BINARY_1
||
encoding
==
WS_ENCODING_XML_BINARY_SESSION_1
)
*
dict
=
&
dict_builtin
;
else
*
dict
=
NULL
;
return
S_OK
;
}
static
inline
int
cmp_string
(
const
unsigned
char
*
str
,
ULONG
len
,
const
unsigned
char
*
str2
,
ULONG
len2
)
{
if
(
len
<
len2
)
return
-
1
;
...
...
dlls/webservices/tests/reader.c
View file @
419604e1
...
...
@@ -1183,6 +1183,7 @@ static void test_WsReadNode(void)
static
const
char
str17
[]
=
"<!--comment-->"
;
HRESULT
hr
;
WS_XML_READER
*
reader
;
WS_XML_DICTIONARY
*
dict
;
const
WS_XML_NODE
*
node
;
unsigned
int
i
;
int
found
;
...
...
@@ -1334,6 +1335,21 @@ static void test_WsReadNode(void)
ok
(
!
memcmp
(
comment
->
value
.
bytes
,
" comment "
,
9
),
"wrong data
\n
"
);
}
dict
=
(
WS_XML_DICTIONARY
*
)
0xdeadbeef
;
hr
=
WsGetDictionary
(
WS_ENCODING_XML_UTF8
,
&
dict
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dict
==
NULL
,
"got %p
\n
"
,
dict
);
dict
=
(
WS_XML_DICTIONARY
*
)
0xdeadbeef
;
hr
=
WsGetDictionary
(
WS_ENCODING_XML_BINARY_1
,
&
dict
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dict
!=
NULL
,
"dict not set
\n
"
);
dict
=
(
WS_XML_DICTIONARY
*
)
0xdeadbeef
;
hr
=
WsGetDictionary
(
WS_ENCODING_XML_BINARY_SESSION_1
,
&
dict
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dict
!=
NULL
,
"dict not set
\n
"
);
WsFreeReader
(
reader
);
}
...
...
@@ -4898,7 +4914,7 @@ static void test_dictionary(void)
const
WS_XML_ATTRIBUTE
*
attr
;
const
WS_XML_UTF8_TEXT
*
utf8
;
WS_XML_STRING
strings
[
6
];
WS_XML_DICTIONARY
dict
;
WS_XML_DICTIONARY
dict
,
*
dict2
;
WS_XML_READER
*
reader
;
HRESULT
hr
;
...
...
@@ -5163,6 +5179,29 @@ static void test_dictionary(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
node
->
nodeType
==
WS_XML_NODE_TYPE_END_ELEMENT
,
"got %u
\n
"
,
node
->
nodeType
);
hr
=
WsGetDictionary
(
0
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetDictionary
(
WS_ENCODING_XML_UTF8
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
dict2
=
(
WS_XML_DICTIONARY
*
)
0xdeadbeef
;
hr
=
WsGetDictionary
(
WS_ENCODING_XML_UTF8
,
&
dict2
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dict2
==
NULL
,
"got %p
\n
"
,
dict2
);
dict2
=
(
WS_XML_DICTIONARY
*
)
0xdeadbeef
;
hr
=
WsGetDictionary
(
WS_ENCODING_XML_BINARY_1
,
&
dict2
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dict2
!=
NULL
,
"dict2 not set
\n
"
);
ok
(
dict2
!=
&
dict
,
"got %p
\n
"
,
dict2
);
dict2
=
(
WS_XML_DICTIONARY
*
)
0xdeadbeef
;
hr
=
WsGetDictionary
(
WS_ENCODING_XML_BINARY_SESSION_1
,
&
dict2
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dict2
!=
NULL
,
"dict2 not set
\n
"
);
ok
(
dict2
!=
&
dict
,
"got %p
\n
"
,
dict2
);
WsFreeReader
(
reader
);
}
...
...
dlls/webservices/webservices.spec
View file @
419604e1
...
...
@@ -61,7 +61,7 @@
@ stdcall WsFreeWriter(ptr)
@ stdcall WsGetChannelProperty(ptr long ptr long ptr)
@ stub WsGetCustomHeader
@ st
ub WsGetDictionary
@ st
dcall WsGetDictionary(long ptr ptr)
@ stdcall WsGetErrorProperty(ptr long ptr long)
@ stdcall WsGetErrorString(ptr long ptr)
@ stub WsGetFaultErrorDetail
...
...
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