webservices: Implement WsSetOutput.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9dfe9ec8bb
commit
8c3bf0e95e
|
@ -154,7 +154,7 @@
|
||||||
@ stub WsSetInputToBuffer
|
@ stub WsSetInputToBuffer
|
||||||
@ stub WsSetListenerProperty
|
@ stub WsSetListenerProperty
|
||||||
@ stub WsSetMessageProperty
|
@ stub WsSetMessageProperty
|
||||||
@ stub WsSetOutput
|
@ stdcall WsSetOutput(ptr ptr ptr ptr long ptr)
|
||||||
@ stub WsSetOutputToBuffer
|
@ stub WsSetOutputToBuffer
|
||||||
@ stub WsSetReaderPosition
|
@ stub WsSetReaderPosition
|
||||||
@ stub WsSetWriterPosition
|
@ stub WsSetWriterPosition
|
||||||
|
|
|
@ -57,6 +57,7 @@ writer_props[] =
|
||||||
|
|
||||||
struct writer
|
struct writer
|
||||||
{
|
{
|
||||||
|
WS_XML_WRITER_OUTPUT_TYPE output_type;
|
||||||
ULONG prop_count;
|
ULONG prop_count;
|
||||||
WS_XML_WRITER_PROPERTY prop[sizeof(writer_props)/sizeof(writer_props[0])];
|
WS_XML_WRITER_PROPERTY prop[sizeof(writer_props)/sizeof(writer_props[0])];
|
||||||
};
|
};
|
||||||
|
@ -162,5 +163,57 @@ HRESULT WINAPI WsGetWriterProperty( WS_XML_WRITER *handle, WS_XML_WRITER_PROPERT
|
||||||
TRACE( "%p %u %p %u %p\n", handle, id, buf, size, error );
|
TRACE( "%p %u %p %u %p\n", handle, id, buf, size, error );
|
||||||
if (error) FIXME( "ignoring error parameter\n" );
|
if (error) FIXME( "ignoring error parameter\n" );
|
||||||
|
|
||||||
|
if (!writer->output_type) return WS_E_INVALID_OPERATION;
|
||||||
return get_writer_prop( writer, id, buf, size );
|
return get_writer_prop( writer, id, buf, size );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* WsSetOutput [webservices.@]
|
||||||
|
*/
|
||||||
|
HRESULT WINAPI WsSetOutput( WS_XML_WRITER *handle, const WS_XML_WRITER_ENCODING *encoding,
|
||||||
|
const WS_XML_WRITER_OUTPUT *output, const WS_XML_WRITER_PROPERTY *properties,
|
||||||
|
ULONG count, WS_ERROR *error )
|
||||||
|
{
|
||||||
|
struct writer *writer = (struct writer *)handle;
|
||||||
|
HRESULT hr;
|
||||||
|
ULONG i;
|
||||||
|
|
||||||
|
TRACE( "%p %p %p %p %u %p\n", handle, encoding, output, properties, count, error );
|
||||||
|
if (error) FIXME( "ignoring error parameter\n" );
|
||||||
|
|
||||||
|
if (!writer) return E_INVALIDARG;
|
||||||
|
|
||||||
|
switch (encoding->encodingType)
|
||||||
|
{
|
||||||
|
case WS_XML_WRITER_ENCODING_TYPE_TEXT:
|
||||||
|
{
|
||||||
|
WS_XML_WRITER_TEXT_ENCODING *text = (WS_XML_WRITER_TEXT_ENCODING *)encoding;
|
||||||
|
if (text->charSet != WS_CHARSET_UTF8)
|
||||||
|
{
|
||||||
|
FIXME( "charset %u not supported\n", text->charSet );
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
FIXME( "encoding type %u not supported\n", encoding->encodingType );
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
switch (output->outputType)
|
||||||
|
{
|
||||||
|
case WS_XML_WRITER_OUTPUT_TYPE_BUFFER:
|
||||||
|
writer->output_type = WS_XML_WRITER_OUTPUT_TYPE_BUFFER;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FIXME( "output type %u not supported\n", output->outputType );
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
hr = set_writer_prop( writer, properties[i].id, properties[i].value, properties[i].valueSize );
|
||||||
|
if (hr != S_OK) return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue