webservices: Implement WsGetChannelProperty and WsSetChannelProperty.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2016-04-13 13:49:45 +02:00 committed by Alexandre Julliard
parent 8d9bf53758
commit 5f5c389010
2 changed files with 39 additions and 2 deletions

View File

@ -78,6 +78,15 @@ static HRESULT set_channel_prop( struct channel *channel, WS_CHANNEL_PROPERTY_ID
return S_OK;
}
static HRESULT get_channel_prop( struct channel *channel, WS_CHANNEL_PROPERTY_ID id, void *buf, ULONG size )
{
if (id >= channel->prop_count || size != channel_props[id].size)
return E_INVALIDARG;
memcpy( buf, channel->prop[id].value, channel->prop[id].valueSize );
return S_OK;
}
void free_channel( struct channel *channel )
{
heap_free( channel );
@ -156,3 +165,31 @@ void WINAPI WsFreeChannel( WS_CHANNEL *handle )
TRACE( "%p\n", handle );
free_channel( channel );
}
/**************************************************************************
* WsGetChannelProperty [webservices.@]
*/
HRESULT WINAPI WsGetChannelProperty( WS_CHANNEL *handle, WS_CHANNEL_PROPERTY_ID id, void *buf,
ULONG size, WS_ERROR *error )
{
struct channel *channel = (struct channel *)handle;
TRACE( "%p %u %p %u %p\n", handle, id, buf, size, error );
if (error) FIXME( "ignoring error parameter\n" );
return get_channel_prop( channel, id, buf, size );
}
/**************************************************************************
* WsSetChannelProperty [webservices.@]
*/
HRESULT WINAPI WsSetChannelProperty( WS_CHANNEL *handle, WS_CHANNEL_PROPERTY_ID id, const void *value,
ULONG size, WS_ERROR *error )
{
struct channel *channel = (struct channel *)handle;
TRACE( "%p %u %p %u\n", handle, id, value, size );
if (error) FIXME( "ignoring error parameter\n" );
return set_channel_prop( channel, id, value, size );
}

View File

@ -59,7 +59,7 @@
@ stub WsFreeServiceHost
@ stub WsFreeServiceProxy
@ stdcall WsFreeWriter(ptr)
@ stub WsGetChannelProperty
@ stdcall WsGetChannelProperty(ptr long ptr long ptr)
@ stub WsGetCustomHeader
@ stub WsGetDictionary
@ stdcall WsGetErrorProperty(ptr long ptr long)
@ -145,7 +145,7 @@
@ stub WsSendFaultMessageForError
@ stub WsSendMessage
@ stub WsSendReplyMessage
@ stub WsSetChannelProperty
@ stdcall WsSetChannelProperty(ptr long ptr long ptr)
@ stdcall WsSetErrorProperty(ptr long ptr long)
@ stub WsSetFaultErrorDetail
@ stub WsSetFaultErrorProperty