2 * Copyright 2015 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_WEBSERVICES_H
20 #define __WINE_WEBSERVICES_H
24 #endif /* __cplusplus */
26 typedef struct _WS_ERROR WS_ERROR
;
27 typedef struct _WS_HEAP WS_HEAP
;
28 typedef struct _WS_XML_BUFFER WS_XML_BUFFER
;
29 typedef struct _WS_XML_READER WS_XML_READER
;
31 struct _WS_STRUCT_DESCRIPTION
;
32 struct _WS_XML_STRING
;
35 WS_ERROR_PROPERTY_STRING_COUNT
,
36 WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE
,
37 WS_ERROR_PROPERTY_LANGID
38 } WS_ERROR_PROPERTY_ID
;
40 typedef struct _WS_ERROR_PROPERTY
{
41 WS_ERROR_PROPERTY_ID id
;
47 WS_HEAP_PROPERTY_MAX_SIZE
,
48 WS_HEAP_PROPERTY_TRIM_SIZE
,
49 WS_HEAP_PROPERTY_REQUESTED_SIZE
,
50 WS_HEAP_PROPERTY_ACTUAL_SIZE
51 } WS_HEAP_PROPERTY_ID
;
53 typedef struct _WS_HEAP_PROPERTY
{
54 WS_HEAP_PROPERTY_ID id
;
60 WS_XML_READER_PROPERTY_MAX_DEPTH
,
61 WS_XML_READER_PROPERTY_ALLOW_FRAGMENT
,
62 WS_XML_READER_PROPERTY_MAX_ATTRIBUTES
,
63 WS_XML_READER_PROPERTY_READ_DECLARATION
,
64 WS_XML_READER_PROPERTY_CHARSET
,
65 WS_XML_READER_PROPERTY_ROW
,
66 WS_XML_READER_PROPERTY_COLUMN
,
67 WS_XML_READER_PROPERTY_UTF8_TRIM_SIZE
,
68 WS_XML_READER_PROPERTY_STREAM_BUFFER_SIZE
,
69 WS_XML_READER_PROPERTY_IN_ATTRIBUTE
,
70 WS_XML_READER_PROPERTY_STREAM_MAX_ROOT_MIME_PART_SIZE
,
71 WS_XML_READER_PROPERTY_STREAM_MAX_MIME_HEADERS_SIZE
,
72 WS_XML_READER_PROPERTY_MAX_MIME_PARTS
,
73 WS_XML_READER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES
,
74 WS_XML_READER_PROPERTY_MAX_NAMESPACES
75 } WS_XML_READER_PROPERTY_ID
;
77 typedef struct _WS_XML_READER_PROPERTY
{
78 WS_XML_READER_PROPERTY_ID id
;
81 } WS_XML_READER_PROPERTY
;
84 WS_XML_READER_ENCODING_TYPE_TEXT
= 1,
85 WS_XML_READER_ENCODING_TYPE_BINARY
= 2,
86 WS_XML_READER_ENCODING_TYPE_MTOM
= 3,
87 WS_XML_READER_ENCODING_TYPE_RAW
= 4
88 } WS_XML_READER_ENCODING_TYPE
;
90 typedef struct _WS_XML_READER_ENCODING
{
91 WS_XML_READER_ENCODING_TYPE encodingType
;
92 } WS_XML_READER_ENCODING
;
101 typedef struct _WS_XML_READER_TEXT_ENCODING
{
102 WS_XML_READER_ENCODING encoding
;
104 } WS_XML_READER_TEXT_ENCODING
;
107 WS_XML_READER_INPUT_TYPE_BUFFER
= 1,
108 WS_XML_READER_INPUT_TYPE_STREAM
= 2
109 } WS_XML_READER_INPUT_TYPE
;
111 typedef struct _WS_XML_READER_INPUT
{
112 WS_XML_READER_INPUT_TYPE inputType
;
113 } WS_XML_READER_INPUT
;
115 typedef struct _WS_XML_READER_BUFFER_INPUT
{
116 WS_XML_READER_INPUT input
;
118 ULONG encodedDataSize
;
119 } WS_XML_READER_BUFFER_INPUT
;
126 typedef void (CALLBACK
*WS_ASYNC_CALLBACK
)
127 (HRESULT
, WS_CALLBACK_MODEL
, void *);
129 typedef struct _WS_ASYNC_CONTEXT
{
130 WS_ASYNC_CALLBACK callback
;
134 typedef HRESULT (CALLBACK
*WS_READ_CALLBACK
)
135 (void*, void*, ULONG
, ULONG
*, const WS_ASYNC_CONTEXT
*, WS_ERROR
*);
137 typedef struct _WS_XML_READER_STREAM_INPUT
{
138 WS_XML_READER_INPUT input
;
139 WS_READ_CALLBACK readCallback
;
140 void *readCallbackState
;
141 } WS_XML_READER_STREAM_INPUT
;
143 typedef struct _WS_XML_DICTIONARY
{
145 struct _WS_XML_STRING
*strings
;
150 typedef struct _WS_XML_STRING
{
153 WS_XML_DICTIONARY
*dictionary
;
158 WS_ELEMENT_TYPE_MAPPING
= 1,
159 WS_ATTRIBUTE_TYPE_MAPPING
= 2,
160 WS_ELEMENT_CONTENT_TYPE_MAPPING
= 3,
161 WS_ANY_ELEMENT_TYPE_MAPPING
= 4
193 WS_ENDPOINT_ADDRESS_TYPE
,
199 WS_ANY_ATTRIBUTES_TYPE
203 WS_READ_REQUIRED_VALUE
= 1,
204 WS_READ_REQUIRED_POINTER
= 2,
205 WS_READ_OPTIONAL_POINTER
= 3,
206 WS_READ_NILLABLE_POINTER
= 4,
207 WS_READ_NILLABLE_VALUE
= 5
211 WS_TYPE_ATTRIBUTE_FIELD_MAPPING
,
212 WS_ATTRIBUTE_FIELD_MAPPING
,
213 WS_ELEMENT_FIELD_MAPPING
,
214 WS_REPEATING_ELEMENT_FIELD_MAPPING
,
215 WS_TEXT_FIELD_MAPPING
,
217 WS_XML_ATTRIBUTE_FIELD_MAPPING
,
218 WS_ELEMENT_CHOICE_FIELD_MAPPING
,
219 WS_REPEATING_ELEMENT_CHOICE_FIELD_MAPPING
,
220 WS_ANY_ELEMENT_FIELD_MAPPING
,
221 WS_REPEATING_ANY_ELEMENT_FIELD_MAPPING
,
222 WS_ANY_CONTENT_FIELD_MAPPING
,
223 WS_ANY_ATTRIBUTES_FIELD_MAPPING
226 typedef struct _WS_DEFAULT_VALUE
{
231 typedef struct _WS_ITEM_RANGE
{
236 typedef struct _WS_FIELD_DESCRIPTION
{
237 WS_FIELD_MAPPING mapping
;
238 WS_XML_STRING
*localName
;
241 void *typeDescription
;
244 WS_DEFAULT_VALUE
*defaultValue
;
246 WS_XML_STRING
*itemLocalName
;
247 WS_XML_STRING
*itemNs
;
248 WS_ITEM_RANGE
*itemRange
;
249 } WS_FIELD_DESCRIPTION
;
251 typedef struct _WS_STRUCT_DESCRIPTION
{
254 WS_FIELD_DESCRIPTION
**fields
;
256 WS_XML_STRING
*typeLocalName
;
257 WS_XML_STRING
*typeNs
;
258 struct _WS_STRUCT_DESCRIPTION
*parentType
;
259 struct _WS_STRUCT_DESCRIPTION
**subTypes
;
262 } WS_STRUCT_DESCRIPTION
;
264 typedef struct _WS_ATTRIBUTE_DESCRIPTION
{
265 WS_XML_STRING
*attributeLocalName
;
266 WS_XML_STRING
*attributeNs
;
268 void *typeDescription
;
269 } WS_ATTRIBUTE_DESCRIPTION
;
271 typedef struct _WS_STRING
{
277 WS_XML_NODE_TYPE_ELEMENT
= 1,
278 WS_XML_NODE_TYPE_TEXT
= 2,
279 WS_XML_NODE_TYPE_END_ELEMENT
= 3,
280 WS_XML_NODE_TYPE_COMMENT
= 4,
281 WS_XML_NODE_TYPE_CDATA
= 6,
282 WS_XML_NODE_TYPE_END_CDATA
= 7,
283 WS_XML_NODE_TYPE_EOF
= 8,
284 WS_XML_NODE_TYPE_BOF
= 9
287 typedef struct _WS_XML_NODE
{
288 WS_XML_NODE_TYPE nodeType
;
292 WS_XML_TEXT_TYPE_UTF8
= 1,
293 WS_XML_TEXT_TYPE_UTF16
= 2,
294 WS_XML_TEXT_TYPE_BASE64
= 3,
295 WS_XML_TEXT_TYPE_BOOL
= 4,
296 WS_XML_TEXT_TYPE_INT32
= 5,
297 WS_XML_TEXT_TYPE_INT64
= 6,
298 WS_XML_TEXT_TYPE_UINT64
= 7,
299 WS_XML_TEXT_TYPE_FLOAT
= 8,
300 WS_XML_TEXT_TYPE_DOUBLE
= 9,
301 WS_XML_TEXT_TYPE_DECIMAL
= 10,
302 WS_XML_TEXT_TYPE_GUID
= 11,
303 WS_XML_TEXT_TYPE_UNIQUE_ID
= 12,
304 WS_XML_TEXT_TYPE_DATETIME
= 13,
305 WS_XML_TEXT_TYPE_TIMESPAN
= 14,
306 WS_XML_TEXT_TYPE_QNAME
= 15,
307 WS_XML_TEXT_TYPE_LIST
= 16
310 typedef struct _WS_XML_TEXT
{
311 WS_XML_TEXT_TYPE textType
;
314 typedef struct _WS_XML_UTF8_TEXT
{
319 typedef struct _WS_XML_ATTRIBUTE
{
322 WS_XML_STRING
*prefix
;
323 WS_XML_STRING
*localName
;
328 typedef struct _WS_XML_ELEMENT_NODE
{
330 WS_XML_STRING
*prefix
;
331 WS_XML_STRING
*localName
;
333 ULONG attributeCount
;
334 WS_XML_ATTRIBUTE
**attributes
;
336 } WS_XML_ELEMENT_NODE
;
338 typedef struct _WS_XML_TEXT_NODE
{
343 typedef struct _WS_XML_COMMENT_NODE
{
346 } WS_XML_COMMENT_NODE
;
348 typedef struct _WS_XML_NODE_POSITION
{
349 WS_XML_BUFFER
*buffer
;
351 } WS_XML_NODE_POSITION
;
353 HRESULT WINAPI
WsCreateError(const WS_ERROR_PROPERTY
*, ULONG
, WS_ERROR
**);
354 HRESULT WINAPI
WsCreateHeap(SIZE_T
, SIZE_T
, const WS_HEAP_PROPERTY
*, ULONG
, WS_HEAP
**, WS_ERROR
*);
355 HRESULT WINAPI
WsCreateReader(const WS_XML_READER_PROPERTY
*, ULONG
, WS_XML_READER
**, WS_ERROR
*);
356 HRESULT WINAPI
WsFillReader(WS_XML_READER
*, ULONG
, const WS_ASYNC_CONTEXT
*, WS_ERROR
*);
357 HRESULT WINAPI
WsFindAttribute(WS_XML_READER
*, const WS_XML_STRING
*, const WS_XML_STRING
*, BOOL
,
359 void WINAPI
WsFreeError(WS_ERROR
*);
360 void WINAPI
WsFreeHeap(WS_HEAP
*);
361 void WINAPI
WsFreeReader(WS_XML_READER
*);
362 HRESULT WINAPI
WsGetErrorProperty(WS_ERROR
*, WS_ERROR_PROPERTY_ID
, void*, ULONG
);
363 HRESULT WINAPI
WsGetErrorString(WS_ERROR
*, ULONG
, WS_STRING
**);
364 HRESULT WINAPI
WsGetHeapProperty(WS_HEAP
*, WS_HEAP_PROPERTY_ID
, void*, ULONG
, WS_ERROR
*);
365 HRESULT WINAPI
WsGetReaderNode(WS_XML_READER
*, const WS_XML_NODE
**, WS_ERROR
*);
366 HRESULT WINAPI
WsGetReaderPosition(WS_XML_READER
*, WS_XML_NODE_POSITION
*, WS_ERROR
*);
367 HRESULT WINAPI
WsGetReaderProperty(WS_XML_READER
*, WS_XML_READER_PROPERTY_ID
, void*, ULONG
, WS_ERROR
*);
368 HRESULT WINAPI
WsGetXmlAttribute(WS_XML_READER
*, const WS_XML_STRING
*, WS_HEAP
*, WCHAR
**,
370 HRESULT WINAPI
WsReadAttribute(WS_XML_READER
*, const WS_ATTRIBUTE_DESCRIPTION
*, WS_READ_OPTION
,
371 WS_HEAP
*, void*, ULONG
, WS_ERROR
*);
372 HRESULT WINAPI
WsReadEndElement(WS_XML_READER
*, WS_ERROR
*);
373 HRESULT WINAPI
WsReadNode(WS_XML_READER
*, WS_ERROR
*);
374 HRESULT WINAPI
WsReadStartAttribute(WS_XML_READER
*, ULONG
, WS_ERROR
*);
375 HRESULT WINAPI
WsReadStartElement(WS_XML_READER
*, WS_ERROR
*);
376 HRESULT WINAPI
WsReadToStartElement(WS_XML_READER
*, const WS_XML_STRING
*, const WS_XML_STRING
*,
378 HRESULT WINAPI
WsReadType(WS_XML_READER
*, WS_TYPE_MAPPING
, WS_TYPE
, const void*, WS_READ_OPTION
,
379 WS_HEAP
*, void*, ULONG
, WS_ERROR
*);
380 HRESULT WINAPI
WsSetErrorProperty(WS_ERROR
*, WS_ERROR_PROPERTY_ID
, const void*, ULONG
);
381 HRESULT WINAPI
WsSetInput(WS_XML_READER
*, const WS_XML_READER_ENCODING
*, const WS_XML_READER_INPUT
*,
382 const WS_XML_READER_PROPERTY
*, ULONG
, WS_ERROR
*);
385 #define WS_S_ASYNC 0x003d0000
386 #define WS_S_END 0x003d0001
387 #define WS_E_INVALID_FORMAT 0x803d0000
388 #define WS_E_OBJECT_FAULTED 0x803d0001
389 #define WS_E_NUMERIC_OVERFLOW 0x803d0002
390 #define WS_E_INVALID_OPERATION 0x803d0003
391 #define WS_E_OPERATION_ABORTED 0x803d0004
392 #define WS_E_ENDPOINT_ACCESS_DENIED 0x803d0005
393 #define WS_E_OPERATION_TIMED_OUT 0x803d0006
394 #define WS_E_OPERATION_ABANDONED 0x803d0007
395 #define WS_E_QUOTA_EXCEEDED 0x803d0008
396 #define WS_E_NO_TRANSLATION_AVAILABLE 0x803d0009
397 #define WS_E_SECURITY_VERIFICATION_FAILURE 0x803d000a
398 #define WS_E_ADDRESS_IN_USE 0x803d000b
399 #define WS_E_ADDRESS_NOT_AVAILABLE 0x803d000c
400 #define WS_E_ENDPOINT_NOT_FOUND 0x803d000d
401 #define WS_E_ENDPOINT_NOT_AVAILABLE 0x803d000e
402 #define WS_E_ENDPOINT_FAILURE 0x803d000f
403 #define WS_E_ENDPOINT_UNREACHABLE 0x803d0010
404 #define WS_E_ENDPOINT_ACTION_NOT_SUPPORTED 0x803d0011
405 #define WS_E_ENDPOINT_TOO_BUSY 0x803d0012
406 #define WS_E_ENDPOINT_FAULT_RECEIVED 0x803d0013
407 #define WS_E_ENDPOINT_DISCONNECTED 0x803d0014
408 #define WS_E_PROXY_FAILURE 0x803d0015
409 #define WS_E_PROXY_ACCESS_DENIED 0x803d0016
410 #define WS_E_NOT_SUPPORTED 0x803d0017
411 #define WS_E_PROXY_REQUIRES_BASIC_AUTH 0x803d0018
412 #define WS_E_PROXY_REQUIRES_DIGEST_AUTH 0x803d0019
413 #define WS_E_PROXY_REQUIRES_NTLM_AUTH 0x803d001a
414 #define WS_E_PROXY_REQUIRES_NEGOTIATE_AUTH 0x803d001b
415 #define WS_E_SERVER_REQUIRES_BASIC_AUTH 0x803d001c
416 #define WS_E_SERVER_REQUIRES_DIGEST_AUTH 0x803d001d
417 #define WS_E_SERVER_REQUIRES_NTLM_AUTH 0x803d001e
418 #define WS_E_SERVER_REQUIRES_NEGOTIATE_AUTH 0x803d001f
419 #define WS_E_INVALID_ENDPOINT_URL 0x803d0020
420 #define WS_E_OTHER 0x803d0021
421 #define WS_E_SECURITY_TOKEN_EXPIRED 0x803d0022
422 #define WS_E_SECURITY_SYSTEM_FAILURE 0x803d0023
426 #endif /* __cplusplus */
428 #endif /* __WINE_WEBSERVICES_H */