Hans Leidekker : webservices: Implement WsGetChannelProperty and WsSetChannelProperty.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Apr 13 11:51:48 CDT 2016


Module: wine
Branch: master
Commit: 5f5c389010371242316bbecbaedecdb7daf1c365
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5f5c389010371242316bbecbaedecdb7daf1c365

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Apr 13 13:49:45 2016 +0200

webservices: Implement WsGetChannelProperty and WsSetChannelProperty.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/webservices/channel.c        | 37 +++++++++++++++++++++++++++++++++++++
 dlls/webservices/webservices.spec |  4 ++--
 2 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c
index c8a920d..54e159d 100644
--- a/dlls/webservices/channel.c
+++ b/dlls/webservices/channel.c
@@ -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 );
+}
diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec
index 2ddda72..001b3ca 100644
--- a/dlls/webservices/webservices.spec
+++ b/dlls/webservices/webservices.spec
@@ -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




More information about the wine-cvs mailing list