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
f40d88a0
Commit
f40d88a0
authored
Jul 12, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Add support for UNIQUE_ID records in the writer.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b85e6800
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
11 deletions
+30
-11
writer.c
dlls/webservices/writer.c
+30
-11
No files found.
dlls/webservices/writer.c
View file @
f40d88a0
...
...
@@ -719,6 +719,9 @@ static enum record_type get_attr_text_record_type( const WS_XML_TEXT *text )
case
WS_XML_TEXT_TYPE_GUID
:
return
RECORD_GUID_TEXT
;
case
WS_XML_TEXT_TYPE_UNIQUE_ID
:
return
RECORD_UNIQUE_ID_TEXT
;
default:
FIXME
(
"unhandled text type %u
\n
"
,
text
->
textType
);
return
0
;
...
...
@@ -861,6 +864,13 @@ static HRESULT write_attribute_value_bin( struct writer *writer, const WS_XML_TE
write_bytes
(
writer
,
(
const
BYTE
*
)
&
text_guid
->
value
,
sizeof
(
text_guid
->
value
)
);
return
S_OK
;
}
case
RECORD_UNIQUE_ID_TEXT
:
{
WS_XML_UNIQUE_ID_TEXT
*
text_unique_id
=
(
WS_XML_UNIQUE_ID_TEXT
*
)
text
;
if
((
hr
=
write_grow_buffer
(
writer
,
sizeof
(
text_unique_id
->
value
)
))
!=
S_OK
)
return
hr
;
write_bytes
(
writer
,
(
const
BYTE
*
)
&
text_unique_id
->
value
,
sizeof
(
text_unique_id
->
value
)
);
return
S_OK
;
}
default:
FIXME
(
"unhandled record type %02x
\n
"
,
type
);
return
E_NOTIMPL
;
...
...
@@ -2494,6 +2504,9 @@ static enum record_type get_text_record_type( const WS_XML_TEXT *text )
case
WS_XML_TEXT_TYPE_GUID
:
return
RECORD_GUID_TEXT_WITH_ENDELEMENT
;
case
WS_XML_TEXT_TYPE_UNIQUE_ID
:
return
RECORD_UNIQUE_ID_TEXT_WITH_ENDELEMENT
;
default:
FIXME
(
"unhandled text type %u
\n
"
,
text
->
textType
);
return
0
;
...
...
@@ -2642,6 +2655,14 @@ static HRESULT write_text_bin( struct writer *writer, const WS_XML_TEXT *text, U
write_bytes
(
writer
,
(
const
BYTE
*
)
&
text_guid
->
value
,
sizeof
(
text_guid
->
value
)
);
return
S_OK
;
}
case
RECORD_UNIQUE_ID_TEXT_WITH_ENDELEMENT
:
{
WS_XML_UNIQUE_ID_TEXT
*
text_unique_id
=
(
WS_XML_UNIQUE_ID_TEXT
*
)
text
;
if
((
hr
=
write_grow_buffer
(
writer
,
1
+
sizeof
(
text_unique_id
->
value
)
))
!=
S_OK
)
return
hr
;
write_char
(
writer
,
type
);
write_bytes
(
writer
,
(
const
BYTE
*
)
&
text_unique_id
->
value
,
sizeof
(
text_unique_id
->
value
)
);
return
S_OK
;
}
default:
FIXME
(
"unhandled record type %02x
\n
"
,
type
);
return
E_NOTIMPL
;
...
...
@@ -3204,9 +3225,8 @@ static HRESULT write_type_unique_id( struct writer *writer, WS_TYPE_MAPPING mapp
const
WS_UNIQUE_ID_DESCRIPTION
*
desc
,
WS_WRITE_OPTION
option
,
const
void
*
value
,
ULONG
size
)
{
WS_XML_UTF8_TEXT
utf8
;
WS_XML_UTF16_TEXT
utf16
;
unsigned
char
buf
[
46
];
/* "urn:uuid:00000000-0000-0000-0000-000000000000" */
WS_XML_UNIQUE_ID_TEXT
text_unique_id
;
WS_XML_UTF16_TEXT
text_utf16
;
const
WS_UNIQUE_ID
*
ptr
;
HRESULT
hr
;
...
...
@@ -3222,16 +3242,15 @@ static HRESULT write_type_unique_id( struct writer *writer, WS_TYPE_MAPPING mapp
if
(
ptr
->
uri
.
length
)
{
utf16
.
text
.
textType
=
WS_XML_TEXT_TYPE_UTF16
;
utf16
.
bytes
=
(
BYTE
*
)
ptr
->
uri
.
chars
;
utf16
.
byteCount
=
ptr
->
uri
.
length
*
sizeof
(
WCHAR
);
return
write_type_text
(
writer
,
mapping
,
&
utf16
.
text
);
text_
utf16
.
text
.
textType
=
WS_XML_TEXT_TYPE_UTF16
;
text_
utf16
.
bytes
=
(
BYTE
*
)
ptr
->
uri
.
chars
;
text_
utf16
.
byteCount
=
ptr
->
uri
.
length
*
sizeof
(
WCHAR
);
return
write_type_text
(
writer
,
mapping
,
&
text_
utf16
.
text
);
}
utf8
.
text
.
textType
=
WS_XML_TEXT_TYPE_UTF8
;
utf8
.
value
.
bytes
=
buf
;
utf8
.
value
.
length
=
format_urn
(
&
ptr
->
guid
,
buf
);
return
write_type_text
(
writer
,
mapping
,
&
utf8
.
text
);
text_unique_id
.
text
.
textType
=
WS_XML_TEXT_TYPE_UNIQUE_ID
;
text_unique_id
.
value
=
ptr
->
guid
;
return
write_type_text
(
writer
,
mapping
,
&
text_unique_id
.
text
);
}
static
HRESULT
write_type_string
(
struct
writer
*
writer
,
WS_TYPE_MAPPING
mapping
,
...
...
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