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
c8a1b56c
Commit
c8a1b56c
authored
Sep 28, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Use public channel functions in the service proxy implementation.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e4fd9059
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
34 deletions
+36
-34
channel.c
dlls/webservices/channel.c
+20
-4
proxy.c
dlls/webservices/proxy.c
+16
-15
webservices_private.h
dlls/webservices/webservices_private.h
+0
-15
No files found.
dlls/webservices/channel.c
View file @
c8a1b56c
...
@@ -84,6 +84,15 @@ static const struct prop_desc channel_props[] =
...
@@ -84,6 +84,15 @@ static const struct prop_desc channel_props[] =
{
sizeof
(
ULONG
),
FALSE
}
/* WS_CHANNEL_PROPERTY_MAX_HTTP_REQUEST_HEADERS_BUFFER_SIZE */
{
sizeof
(
ULONG
),
FALSE
}
/* WS_CHANNEL_PROPERTY_MAX_HTTP_REQUEST_HEADERS_BUFFER_SIZE */
};
};
struct
channel
{
WS_CHANNEL_TYPE
type
;
WS_CHANNEL_BINDING
binding
;
WS_CHANNEL_STATE
state
;
ULONG
prop_count
;
struct
prop
prop
[
sizeof
(
channel_props
)
/
sizeof
(
channel_props
[
0
])];
};
static
struct
channel
*
alloc_channel
(
void
)
static
struct
channel
*
alloc_channel
(
void
)
{
{
static
const
ULONG
count
=
sizeof
(
channel_props
)
/
sizeof
(
channel_props
[
0
]);
static
const
ULONG
count
=
sizeof
(
channel_props
)
/
sizeof
(
channel_props
[
0
]);
...
@@ -96,12 +105,13 @@ static struct channel *alloc_channel(void)
...
@@ -96,12 +105,13 @@ static struct channel *alloc_channel(void)
return
ret
;
return
ret
;
}
}
void
free_channel
(
struct
channel
*
channel
)
static
void
free_channel
(
struct
channel
*
channel
)
{
{
if
(
!
channel
)
return
;
heap_free
(
channel
);
heap_free
(
channel
);
}
}
HRESULT
create_channel
(
WS_CHANNEL_TYPE
type
,
WS_CHANNEL_BINDING
binding
,
static
HRESULT
create_channel
(
WS_CHANNEL_TYPE
type
,
WS_CHANNEL_BINDING
binding
,
const
WS_CHANNEL_PROPERTY
*
properties
,
ULONG
count
,
struct
channel
**
ret
)
const
WS_CHANNEL_PROPERTY
*
properties
,
ULONG
count
,
struct
channel
**
ret
)
{
{
struct
channel
*
channel
;
struct
channel
*
channel
;
...
@@ -207,8 +217,14 @@ HRESULT WINAPI WsSetChannelProperty( WS_CHANNEL *handle, WS_CHANNEL_PROPERTY_ID
...
@@ -207,8 +217,14 @@ HRESULT WINAPI WsSetChannelProperty( WS_CHANNEL *handle, WS_CHANNEL_PROPERTY_ID
return
prop_set
(
channel
->
prop
,
channel
->
prop_count
,
id
,
value
,
size
);
return
prop_set
(
channel
->
prop
,
channel
->
prop_count
,
id
,
value
,
size
);
}
}
HRESULT
open_channel
(
struct
channel
*
channel
,
const
WS_ENDPOINT_ADDRESS
*
endpoint
)
static
HRESULT
open_channel
(
struct
channel
*
channel
,
const
WS_ENDPOINT_ADDRESS
*
endpoint
)
{
{
if
(
endpoint
->
headers
||
endpoint
->
extensions
||
endpoint
->
identity
)
{
FIXME
(
"headers, extensions or identity not supported
\n
"
);
return
E_NOTIMPL
;
}
channel
->
state
=
WS_CHANNEL_STATE_OPEN
;
channel
->
state
=
WS_CHANNEL_STATE_OPEN
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -231,7 +247,7 @@ HRESULT WINAPI WsOpenChannel( WS_CHANNEL *handle, const WS_ENDPOINT_ADDRESS *end
...
@@ -231,7 +247,7 @@ HRESULT WINAPI WsOpenChannel( WS_CHANNEL *handle, const WS_ENDPOINT_ADDRESS *end
return
open_channel
(
channel
,
endpoint
);
return
open_channel
(
channel
,
endpoint
);
}
}
HRESULT
close_channel
(
struct
channel
*
channel
)
static
HRESULT
close_channel
(
struct
channel
*
channel
)
{
{
channel
->
state
=
WS_CHANNEL_STATE_CLOSED
;
channel
->
state
=
WS_CHANNEL_STATE_CLOSED
;
return
S_OK
;
return
S_OK
;
...
...
dlls/webservices/proxy.c
View file @
c8a1b56c
...
@@ -43,7 +43,7 @@ static const struct prop_desc proxy_props[] =
...
@@ -43,7 +43,7 @@ static const struct prop_desc proxy_props[] =
struct
proxy
struct
proxy
{
{
struct
channel
*
channel
;
WS_CHANNEL
*
channel
;
ULONG
prop_count
;
ULONG
prop_count
;
struct
prop
prop
[
sizeof
(
proxy_props
)
/
sizeof
(
proxy_props
[
0
])];
struct
prop
prop
[
sizeof
(
proxy_props
)
/
sizeof
(
proxy_props
[
0
])];
};
};
...
@@ -62,11 +62,12 @@ static struct proxy *alloc_proxy(void)
...
@@ -62,11 +62,12 @@ static struct proxy *alloc_proxy(void)
static
void
free_proxy
(
struct
proxy
*
proxy
)
static
void
free_proxy
(
struct
proxy
*
proxy
)
{
{
free_channel
(
proxy
->
channel
);
if
(
!
proxy
)
return
;
WsFreeChannel
(
proxy
->
channel
);
heap_free
(
proxy
);
heap_free
(
proxy
);
}
}
static
HRESULT
create_proxy
(
struct
channel
*
channel
,
const
WS_PROXY_PROPERTY
*
properties
,
ULONG
count
,
static
HRESULT
create_proxy
(
WS_CHANNEL
*
channel
,
const
WS_PROXY_PROPERTY
*
properties
,
ULONG
count
,
WS_SERVICE_PROXY
**
handle
)
WS_SERVICE_PROXY
**
handle
)
{
{
struct
proxy
*
proxy
;
struct
proxy
*
proxy
;
...
@@ -102,7 +103,7 @@ HRESULT WINAPI WsCreateServiceProxy( const WS_CHANNEL_TYPE type, const WS_CHANNE
...
@@ -102,7 +103,7 @@ HRESULT WINAPI WsCreateServiceProxy( const WS_CHANNEL_TYPE type, const WS_CHANNE
const
ULONG
channel_props_count
,
WS_SERVICE_PROXY
**
handle
,
const
ULONG
channel_props_count
,
WS_SERVICE_PROXY
**
handle
,
WS_ERROR
*
error
)
WS_ERROR
*
error
)
{
{
struct
channel
*
channel
;
WS_CHANNEL
*
channel
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"%u %u %p %p %u %p %u %p %p
\n
"
,
type
,
binding
,
desc
,
proxy_props
,
proxy_props_count
,
TRACE
(
"%u %u %p %p %u %p %u %p %p
\n
"
,
type
,
binding
,
desc
,
proxy_props
,
proxy_props_count
,
...
@@ -112,11 +113,11 @@ HRESULT WINAPI WsCreateServiceProxy( const WS_CHANNEL_TYPE type, const WS_CHANNE
...
@@ -112,11 +113,11 @@ HRESULT WINAPI WsCreateServiceProxy( const WS_CHANNEL_TYPE type, const WS_CHANNE
if
(
!
handle
)
return
E_INVALIDARG
;
if
(
!
handle
)
return
E_INVALIDARG
;
if
((
hr
=
create_channel
(
type
,
binding
,
channel_props
,
channel_props_count
,
&
channel
))
!=
S_OK
)
if
((
hr
=
WsCreateChannel
(
type
,
binding
,
channel_props
,
channel_props_count
,
NULL
,
&
channel
,
return
hr
;
NULL
))
!=
S_OK
)
return
hr
;
if
((
hr
=
create_proxy
(
channel
,
proxy_props
,
proxy_props_count
,
handle
))
!=
S_OK
)
if
((
hr
=
create_proxy
(
channel
,
proxy_props
,
proxy_props_count
,
handle
))
!=
S_OK
)
free_c
hannel
(
channel
);
WsFreeC
hannel
(
channel
);
return
hr
;
return
hr
;
}
}
...
@@ -133,7 +134,7 @@ HRESULT WINAPI WsCreateServiceProxyFromTemplate( WS_CHANNEL_TYPE channel_type,
...
@@ -133,7 +134,7 @@ HRESULT WINAPI WsCreateServiceProxyFromTemplate( WS_CHANNEL_TYPE channel_type,
const
WS_CHANNEL_PROPERTY
*
channel_props
=
NULL
;
const
WS_CHANNEL_PROPERTY
*
channel_props
=
NULL
;
ULONG
channel_props_count
=
0
;
ULONG
channel_props_count
=
0
;
WS_CHANNEL_BINDING
binding
;
WS_CHANNEL_BINDING
binding
;
struct
channel
*
channel
;
WS_CHANNEL
*
channel
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"%u %p %u %u %p %u %p %u %p %p
\n
"
,
channel_type
,
properties
,
count
,
type
,
value
,
size
,
desc
,
TRACE
(
"%u %p %u %u %p %u %p %u %p %p
\n
"
,
channel_type
,
properties
,
count
,
type
,
value
,
size
,
desc
,
...
@@ -172,12 +173,10 @@ HRESULT WINAPI WsCreateServiceProxyFromTemplate( WS_CHANNEL_TYPE channel_type,
...
@@ -172,12 +173,10 @@ HRESULT WINAPI WsCreateServiceProxyFromTemplate( WS_CHANNEL_TYPE channel_type,
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
if
((
hr
=
create_channel
(
channel_type
,
binding
,
channel_props
,
channel_props_count
,
&
channel
))
!=
S_OK
)
if
((
hr
=
WsCreateChannel
(
channel_type
,
binding
,
channel_props
,
channel_props_count
,
NULL
,
return
hr
;
&
channel
,
NULL
))
!=
S_OK
)
return
hr
;
if
((
hr
=
create_proxy
(
channel
,
properties
,
count
,
handle
))
!=
S_OK
)
free_channel
(
channel
);
if
((
hr
=
create_proxy
(
channel
,
properties
,
count
,
handle
))
!=
S_OK
)
WsFreeChannel
(
channel
);
return
hr
;
return
hr
;
}
}
...
@@ -218,7 +217,8 @@ HRESULT WINAPI WsOpenServiceProxy( WS_SERVICE_PROXY *handle, const WS_ENDPOINT_A
...
@@ -218,7 +217,8 @@ HRESULT WINAPI WsOpenServiceProxy( WS_SERVICE_PROXY *handle, const WS_ENDPOINT_A
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
ctx
)
FIXME
(
"ignoring ctx parameter
\n
"
);
if
(
ctx
)
FIXME
(
"ignoring ctx parameter
\n
"
);
return
open_channel
(
proxy
->
channel
,
endpoint
);
if
(
!
handle
||
!
endpoint
)
return
E_INVALIDARG
;
return
WsOpenChannel
(
proxy
->
channel
,
endpoint
,
NULL
,
NULL
);
}
}
/**************************************************************************
/**************************************************************************
...
@@ -232,7 +232,8 @@ HRESULT WINAPI WsCloseServiceProxy( WS_SERVICE_PROXY *handle, const WS_ASYNC_CON
...
@@ -232,7 +232,8 @@ HRESULT WINAPI WsCloseServiceProxy( WS_SERVICE_PROXY *handle, const WS_ASYNC_CON
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
ctx
)
FIXME
(
"ignoring ctx parameter
\n
"
);
if
(
ctx
)
FIXME
(
"ignoring ctx parameter
\n
"
);
return
close_channel
(
proxy
->
channel
);
if
(
!
handle
)
return
E_INVALIDARG
;
return
WsCloseChannel
(
proxy
->
channel
,
NULL
,
NULL
);
}
}
/**************************************************************************
/**************************************************************************
...
...
dlls/webservices/webservices_private.h
View file @
c8a1b56c
...
@@ -90,21 +90,6 @@ void prop_init( const struct prop_desc *, ULONG, struct prop *, void * ) DECLSPE
...
@@ -90,21 +90,6 @@ void prop_init( const struct prop_desc *, ULONG, struct prop *, void * ) DECLSPE
HRESULT
prop_set
(
const
struct
prop
*
,
ULONG
,
ULONG
,
const
void
*
,
ULONG
)
DECLSPEC_HIDDEN
;
HRESULT
prop_set
(
const
struct
prop
*
,
ULONG
,
ULONG
,
const
void
*
,
ULONG
)
DECLSPEC_HIDDEN
;
HRESULT
prop_get
(
const
struct
prop
*
,
ULONG
,
ULONG
,
void
*
,
ULONG
)
DECLSPEC_HIDDEN
;
HRESULT
prop_get
(
const
struct
prop
*
,
ULONG
,
ULONG
,
void
*
,
ULONG
)
DECLSPEC_HIDDEN
;
struct
channel
{
WS_CHANNEL_TYPE
type
;
WS_CHANNEL_BINDING
binding
;
WS_CHANNEL_STATE
state
;
ULONG
prop_count
;
struct
prop
prop
[
50
];
};
HRESULT
create_channel
(
WS_CHANNEL_TYPE
,
WS_CHANNEL_BINDING
,
const
WS_CHANNEL_PROPERTY
*
,
ULONG
,
struct
channel
**
)
DECLSPEC_HIDDEN
;
void
free_channel
(
struct
channel
*
)
DECLSPEC_HIDDEN
;
HRESULT
open_channel
(
struct
channel
*
,
const
WS_ENDPOINT_ADDRESS
*
)
DECLSPEC_HIDDEN
;
HRESULT
close_channel
(
struct
channel
*
)
DECLSPEC_HIDDEN
;
static
inline
BOOL
is_nil_value
(
const
char
*
value
,
ULONG
size
)
static
inline
BOOL
is_nil_value
(
const
char
*
value
,
ULONG
size
)
{
{
ULONG
i
;
ULONG
i
;
...
...
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