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
e0622812
Commit
e0622812
authored
Sep 04, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opcservices: Implement IOpcPart::GetRelationshipSet().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
42792e2f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
package.c
dlls/opcservices/package.c
+16
-2
opcservices.c
dlls/opcservices/tests/opcservices.c
+9
-0
No files found.
dlls/opcservices/package.c
View file @
e0622812
...
@@ -46,6 +46,7 @@ struct opc_part
...
@@ -46,6 +46,7 @@ struct opc_part
IOpcPartUri
*
name
;
IOpcPartUri
*
name
;
WCHAR
*
content_type
;
WCHAR
*
content_type
;
DWORD
compression_options
;
DWORD
compression_options
;
IOpcRelationshipSet
*
relationship_set
;
};
};
struct
opc_part_set
struct
opc_part_set
...
@@ -91,6 +92,8 @@ static inline struct opc_relationship *impl_from_IOpcRelationship(IOpcRelationsh
...
@@ -91,6 +92,8 @@ static inline struct opc_relationship *impl_from_IOpcRelationship(IOpcRelationsh
return
CONTAINING_RECORD
(
iface
,
struct
opc_relationship
,
IOpcRelationship_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
opc_relationship
,
IOpcRelationship_iface
);
}
}
static
HRESULT
opc_relationship_set_create
(
IOpcRelationshipSet
**
relationship_set
);
static
WCHAR
*
opc_strdupW
(
const
WCHAR
*
str
)
static
WCHAR
*
opc_strdupW
(
const
WCHAR
*
str
)
{
{
WCHAR
*
ret
=
NULL
;
WCHAR
*
ret
=
NULL
;
...
@@ -143,6 +146,8 @@ static ULONG WINAPI opc_part_Release(IOpcPart *iface)
...
@@ -143,6 +146,8 @@ static ULONG WINAPI opc_part_Release(IOpcPart *iface)
if
(
!
refcount
)
if
(
!
refcount
)
{
{
if
(
part
->
relationship_set
)
IOpcRelationshipSet_Release
(
part
->
relationship_set
);
IOpcPartUri_Release
(
part
->
name
);
IOpcPartUri_Release
(
part
->
name
);
CoTaskMemFree
(
part
->
content_type
);
CoTaskMemFree
(
part
->
content_type
);
heap_free
(
part
);
heap_free
(
part
);
...
@@ -153,9 +158,18 @@ static ULONG WINAPI opc_part_Release(IOpcPart *iface)
...
@@ -153,9 +158,18 @@ static ULONG WINAPI opc_part_Release(IOpcPart *iface)
static
HRESULT
WINAPI
opc_part_GetRelationshipSet
(
IOpcPart
*
iface
,
IOpcRelationshipSet
**
relationship_set
)
static
HRESULT
WINAPI
opc_part_GetRelationshipSet
(
IOpcPart
*
iface
,
IOpcRelationshipSet
**
relationship_set
)
{
{
FIXME
(
"iface %p, relationship_set %p stub!
\n
"
,
iface
,
relationship_set
);
struct
opc_part
*
part
=
impl_from_IOpcPart
(
iface
);
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, relationship_set %p.
\n
"
,
iface
,
relationship_set
);
if
(
!
part
->
relationship_set
&&
FAILED
(
hr
=
opc_relationship_set_create
(
&
part
->
relationship_set
)))
return
hr
;
*
relationship_set
=
part
->
relationship_set
;
IOpcRelationshipSet_AddRef
(
*
relationship_set
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
opc_part_GetContentStream
(
IOpcPart
*
iface
,
IStream
**
stream
)
static
HRESULT
WINAPI
opc_part_GetContentStream
(
IOpcPart
*
iface
,
IStream
**
stream
)
...
...
dlls/opcservices/tests/opcservices.c
View file @
e0622812
...
@@ -74,6 +74,15 @@ static void test_package(void)
...
@@ -74,6 +74,15 @@ static void test_package(void)
hr
=
IOpcPartSet_CreatePart
(
partset
,
part_uri
,
typeW
,
OPC_COMPRESSION_NONE
,
&
part
);
hr
=
IOpcPartSet_CreatePart
(
partset
,
part_uri
,
typeW
,
OPC_COMPRESSION_NONE
,
&
part
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a part, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a part, hr %#x.
\n
"
,
hr
);
hr
=
IOpcPart_GetRelationshipSet
(
part
,
&
relset
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get relationship set, hr %#x.
\n
"
,
hr
);
hr
=
IOpcPart_GetRelationshipSet
(
part
,
&
relset2
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get relationship set, hr %#x.
\n
"
,
hr
);
ok
(
relset
==
relset2
,
"Expected same part set instance.
\n
"
);
IOpcRelationshipSet_Release
(
relset
);
IOpcRelationshipSet_Release
(
relset2
);
ret
=
FALSE
;
ret
=
FALSE
;
hr
=
IOpcPartSet_PartExists
(
partset
,
part_uri
,
&
ret
);
hr
=
IOpcPartSet_PartExists
(
partset
,
part_uri
,
&
ret
);
todo_wine
{
todo_wine
{
...
...
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