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
a2e8bd8f
Commit
a2e8bd8f
authored
Sep 05, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opcservices: Keep relationship type string.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
40e276f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
package.c
dlls/opcservices/package.c
+16
-10
No files found.
dlls/opcservices/package.c
View file @
a2e8bd8f
...
...
@@ -66,6 +66,7 @@ struct opc_relationship
LONG
refcount
;
WCHAR
*
id
;
WCHAR
*
type
;
IUri
*
target
;
OPC_URI_TARGET_MODE
target_mode
;
};
...
...
@@ -399,6 +400,7 @@ static ULONG WINAPI opc_relationship_Release(IOpcRelationship *iface)
if
(
!
refcount
)
{
CoTaskMemFree
(
relationship
->
id
);
CoTaskMemFree
(
relationship
->
type
);
IUri_Release
(
relationship
->
target
);
heap_free
(
relationship
);
}
...
...
@@ -418,9 +420,12 @@ static HRESULT WINAPI opc_relationship_GetId(IOpcRelationship *iface, WCHAR **id
static
HRESULT
WINAPI
opc_relationship_GetRelationshipType
(
IOpcRelationship
*
iface
,
WCHAR
**
type
)
{
FIXME
(
"iface %p, type %p stub!
\n
"
,
iface
,
typ
e
);
struct
opc_relationship
*
relationship
=
impl_from_IOpcRelationship
(
ifac
e
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, type %p.
\n
"
,
iface
,
type
);
*
type
=
opc_strdupW
(
relationship
->
type
);
return
*
type
?
S_OK
:
E_OUTOFMEMORY
;
}
static
HRESULT
WINAPI
opc_relationship_GetSourceUri
(
IOpcRelationship
*
iface
,
IOpcUri
**
uri
)
...
...
@@ -465,8 +470,8 @@ static const IOpcRelationshipVtbl opc_relationship_vtbl =
opc_relationship_GetTargetMode
,
};
static
HRESULT
opc_relationship_create
(
struct
opc_relationship_set
*
set
,
const
WCHAR
*
id
,
IUri
*
target_uri
,
OPC_URI_TARGET_MODE
target_mode
,
IOpcRelationship
**
out
)
static
HRESULT
opc_relationship_create
(
struct
opc_relationship_set
*
set
,
const
WCHAR
*
id
,
const
WCHAR
*
type
,
IUri
*
target_uri
,
OPC_URI_TARGET_MODE
target_mode
,
IOpcRelationship
**
out
)
{
struct
opc_relationship
*
relationship
;
...
...
@@ -479,6 +484,9 @@ static HRESULT opc_relationship_create(struct opc_relationship_set *set, const W
relationship
->
IOpcRelationship_iface
.
lpVtbl
=
&
opc_relationship_vtbl
;
relationship
->
refcount
=
1
;
relationship
->
target
=
target_uri
;
IUri_AddRef
(
relationship
->
target
);
/* FIXME: test that id is unique */
if
(
id
)
relationship
->
id
=
opc_strdupW
(
id
);
...
...
@@ -495,15 +503,13 @@ static HRESULT opc_relationship_create(struct opc_relationship_set *set, const W
}
}
if
(
!
relationship
->
id
)
relationship
->
type
=
opc_strdupW
(
type
);
if
(
!
relationship
->
id
||
!
relationship
->
type
)
{
heap_free
(
relationship
);
IOpcRelationship_Release
(
&
relationship
->
IOpcRelationship_iface
);
return
E_OUTOFMEMORY
;
}
relationship
->
target
=
target_uri
;
IUri_AddRef
(
relationship
->
target
);
set
->
relationships
[
set
->
count
++
]
=
relationship
;
IOpcRelationship_AddRef
(
&
relationship
->
IOpcRelationship_iface
);
...
...
@@ -577,7 +583,7 @@ static HRESULT WINAPI opc_relationship_set_CreateRelationship(IOpcRelationshipSe
if
(
!
type
||
!
target_uri
)
return
E_POINTER
;
return
opc_relationship_create
(
relationship_set
,
id
,
target_uri
,
target_mode
,
relationship
);
return
opc_relationship_create
(
relationship_set
,
id
,
t
ype
,
t
arget_uri
,
target_mode
,
relationship
);
}
static
HRESULT
WINAPI
opc_relationship_set_DeleteRelationship
(
IOpcRelationshipSet
*
iface
,
const
WCHAR
*
id
)
...
...
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