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
d6c50ee2
Commit
d6c50ee2
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: Partially implement CreatePackageRootUri().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a2e8bd8f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
4 deletions
+49
-4
factory.c
dlls/opcservices/factory.c
+4
-2
opc_private.h
dlls/opcservices/opc_private.h
+1
-0
Makefile.in
dlls/opcservices/tests/Makefile.in
+1
-1
opcservices.c
dlls/opcservices/tests/opcservices.c
+21
-0
uri.c
dlls/opcservices/uri.c
+22
-1
No files found.
dlls/opcservices/factory.c
View file @
d6c50ee2
...
...
@@ -309,9 +309,11 @@ static ULONG WINAPI opc_factory_Release(IOpcFactory *iface)
static
HRESULT
WINAPI
opc_factory_CreatePackageRootUri
(
IOpcFactory
*
iface
,
IOpcUri
**
uri
)
{
FIXME
(
"iface %p, uri %p stub!
\n
"
,
iface
,
uri
)
;
static
const
WCHAR
rootW
[]
=
{
'/'
,
0
}
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, uri %p.
\n
"
,
iface
,
uri
);
return
opc_uri_create
(
rootW
,
uri
);
}
static
HRESULT
WINAPI
opc_factory_CreatePartUri
(
IOpcFactory
*
iface
,
LPCWSTR
uri
,
IOpcPartUri
**
part_uri
)
...
...
dlls/opcservices/opc_private.h
View file @
d6c50ee2
...
...
@@ -47,3 +47,4 @@ static inline BOOL opc_array_reserve(void **elements, size_t *capacity, size_t c
extern
HRESULT
opc_package_create
(
IOpcPackage
**
package
)
DECLSPEC_HIDDEN
;
extern
HRESULT
opc_part_uri_create
(
const
WCHAR
*
uri
,
IOpcPartUri
**
part_uri
)
DECLSPEC_HIDDEN
;
extern
HRESULT
opc_uri_create
(
const
WCHAR
*
uri
,
IOpcUri
**
opc_uri
)
DECLSPEC_HIDDEN
;
dlls/opcservices/tests/Makefile.in
View file @
d6c50ee2
TESTDLL
=
opcservices.dll
IMPORTS
=
ole32 urlmon
IMPORTS
=
ole32 urlmon
oleaut32
C_SRCS
=
\
opcservices.c
dlls/opcservices/tests/opcservices.c
View file @
d6c50ee2
...
...
@@ -210,14 +210,18 @@ static void test_relationship(void)
static
const
WCHAR
absoluteW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
'h'
,
'o'
,
's'
,
't'
,
'/'
,
'f'
,
'i'
,
'l'
,
'e'
,
'.'
,
't'
,
'x'
,
't'
,
0
};
static
const
WCHAR
targetW
[]
=
{
't'
,
'a'
,
'r'
,
'g'
,
'e'
,
't'
,
0
};
static
const
WCHAR
typeW
[]
=
{
't'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
rootW
[]
=
{
'/'
,
0
};
IUri
*
target_uri
,
*
target_uri2
,
*
uri
;
IOpcRelationshipSet
*
rels
;
IOpcRelationship
*
rel
;
IOpcFactory
*
factory
;
IOpcPackage
*
package
;
IOpcUri
*
source_uri
;
IUnknown
*
unk
;
DWORD
mode
;
HRESULT
hr
;
WCHAR
*
id
;
BSTR
str
;
factory
=
create_factory
();
...
...
@@ -267,6 +271,23 @@ todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to get target mode, hr %#x.
\n
"
,
hr
);
ok
(
mode
==
OPC_URI_TARGET_MODE_INTERNAL
,
"Unexpected mode %d.
\n
"
,
mode
);
/* Source uri */
hr
=
IOpcRelationship_GetSourceUri
(
rel
,
&
source_uri
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to get source uri, hr %#x.
\n
"
,
hr
);
hr
=
IOpcUri_QueryInterface
(
source_uri
,
&
IID_IOpcPartUri
,
(
void
**
)
&
unk
);
ok
(
hr
==
E_NOINTERFACE
,
"Unexpected hr %#x.
\n
"
,
hr
);
str
=
NULL
;
hr
=
IOpcUri_GetRawUri
(
source_uri
,
&
str
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get raw uri, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
!
lstrcmpW
(
rootW
,
str
),
"Unexpected uri %s.
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IOpcUri_Release
(
source_uri
);
IOpcRelationship_Release
(
rel
);
IOpcRelationshipSet_Release
(
rels
);
...
...
dlls/opcservices/uri.c
View file @
d6c50ee2
...
...
@@ -32,6 +32,7 @@ struct opc_uri
{
IOpcPartUri
IOpcPartUri_iface
;
LONG
refcount
;
BOOL
is_part_uri
;
};
static
inline
struct
opc_uri
*
impl_from_IOpcPartUri
(
IOpcPartUri
*
iface
)
...
...
@@ -41,9 +42,13 @@ static inline struct opc_uri *impl_from_IOpcPartUri(IOpcPartUri *iface)
static
HRESULT
WINAPI
opc_uri_QueryInterface
(
IOpcPartUri
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
opc_uri
*
uri
=
impl_from_IOpcPartUri
(
iface
);
TRACE
(
"iface %p, iid %s, out %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
out
);
if
(
IsEqualIID
(
iid
,
&
IID_IOpcPartUri
)
||
if
((
uri
->
is_part_uri
&&
IsEqualIID
(
iid
,
&
IID_IOpcPartUri
))
||
IsEqualIID
(
iid
,
&
IID_IOpcUri
)
||
IsEqualIID
(
iid
,
&
IID_IUri
)
||
IsEqualIID
(
iid
,
&
IID_IUnknown
))
{
*
out
=
iface
;
...
...
@@ -348,8 +353,24 @@ HRESULT opc_part_uri_create(const WCHAR *str, IOpcPartUri **out)
uri
->
IOpcPartUri_iface
.
lpVtbl
=
&
opc_part_uri_vtbl
;
uri
->
refcount
=
1
;
uri
->
is_part_uri
=
TRUE
;
*
out
=
&
uri
->
IOpcPartUri_iface
;
TRACE
(
"Created part uri %p.
\n
"
,
*
out
);
return
S_OK
;
}
HRESULT
opc_uri_create
(
const
WCHAR
*
str
,
IOpcUri
**
out
)
{
struct
opc_uri
*
uri
;
if
(
!
(
uri
=
heap_alloc_zero
(
sizeof
(
*
uri
))))
return
E_OUTOFMEMORY
;
uri
->
IOpcPartUri_iface
.
lpVtbl
=
&
opc_part_uri_vtbl
;
uri
->
refcount
=
1
;
*
out
=
(
IOpcUri
*
)
&
uri
->
IOpcPartUri_iface
;
TRACE
(
"Created part uri %p.
\n
"
,
*
out
);
return
S_OK
;
}
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