Commit 5f5c3890 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Implement WsGetChannelProperty and WsSetChannelProperty.

parent 8d9bf537
......@@ -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 );
}
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment