Module: wine Branch: master Commit: a04361f9bda55179a17c04bc46e989642fbfaa64 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a04361f9bda55179a17c04bc46...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Apr 22 09:42:44 2016 +0200
webservices: Implement WsCreateServiceProxyFromTemplate.
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/webservices/proxy.c | 60 +++++++++++++++++++++++++++++++++++++++ dlls/webservices/webservices.spec | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-)
diff --git a/dlls/webservices/proxy.c b/dlls/webservices/proxy.c index b0c09f5..1563ac9 100644 --- a/dlls/webservices/proxy.c +++ b/dlls/webservices/proxy.c @@ -122,6 +122,66 @@ HRESULT WINAPI WsCreateServiceProxy( const WS_CHANNEL_TYPE type, const WS_CHANNE }
/************************************************************************** + * WsCreateServiceProxyFromTemplate [webservices.@] + */ +HRESULT WINAPI WsCreateServiceProxyFromTemplate( WS_CHANNEL_TYPE channel_type, + const WS_PROXY_PROPERTY *properties, const ULONG count, + WS_BINDING_TEMPLATE_TYPE type, void *value, ULONG size, + const void *desc, ULONG desc_size, WS_SERVICE_PROXY **handle, + WS_ERROR *error ) +{ + const WS_CHANNEL_PROPERTY *channel_props = NULL; + ULONG channel_props_count = 0; + WS_CHANNEL_BINDING binding; + struct channel *channel; + HRESULT hr; + + TRACE( "%u %p %u %u %p %u %p %u %p %p\n", channel_type, properties, count, type, value, size, desc, + desc_size, handle, error ); + if (error) FIXME( "ignoring error parameter\n" ); + + if (!desc || !handle) return E_INVALIDARG; + FIXME( "ignoring description\n" ); + + switch (type) + { + case WS_HTTP_BINDING_TEMPLATE_TYPE: + { + WS_HTTP_BINDING_TEMPLATE *http = value; + if (http) + { + channel_props = http->channelProperties.properties; + channel_props_count = http->channelProperties.propertyCount; + } + binding = WS_HTTP_CHANNEL_BINDING; + break; + } + case WS_HTTP_SSL_BINDING_TEMPLATE_TYPE: + { + WS_HTTP_SSL_BINDING_TEMPLATE *https = value; + if (https) + { + channel_props = https->channelProperties.properties; + channel_props_count = https->channelProperties.propertyCount; + } + binding = WS_HTTP_CHANNEL_BINDING; + break; + } + default: + FIXME( "template type %u not implemented\n", type ); + return E_NOTIMPL; + } + + if ((hr = create_channel( type, binding, channel_props, channel_props_count, &channel )) != S_OK) + return hr; + + if ((hr = create_proxy( channel, properties, count, handle )) != S_OK) + free_channel( channel ); + + return hr; +} + +/************************************************************************** * WsFreeServiceProxy [webservices.@] */ void WINAPI WsFreeServiceProxy( WS_SERVICE_PROXY *handle ) diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 81c7c87..b39f715 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -33,7 +33,7 @@ @ stub WsCreateServiceEndpointFromTemplate @ stub WsCreateServiceHost @ stdcall WsCreateServiceProxy(long long ptr ptr long ptr long ptr ptr) -@ stub WsCreateServiceProxyFromTemplate +@ stdcall WsCreateServiceProxyFromTemplate(long ptr long long ptr long ptr long ptr ptr) @ stdcall WsCreateWriter(ptr long ptr ptr) @ stdcall WsCreateXmlBuffer(ptr ptr long ptr ptr) @ stub WsCreateXmlSecurityToken