webservices: Implement WsWriteArray.
[wine.git] / dlls / webservices / webservices_private.h
bloba4d08f4bbeb6bfa0043d11960cec11c754e1e055
1 /*
2 * Copyright 2015 Hans Leidekker 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 struct xmlbuf
21 WS_HEAP *heap;
22 void *ptr;
23 SIZE_T size_allocated;
24 SIZE_T size;
27 void *ws_alloc( WS_HEAP *, SIZE_T ) DECLSPEC_HIDDEN;
28 void *ws_realloc( WS_HEAP *, void *, SIZE_T ) DECLSPEC_HIDDEN;
29 void ws_free( WS_HEAP *, void * ) DECLSPEC_HIDDEN;
30 const char *debugstr_xmlstr( const WS_XML_STRING * ) DECLSPEC_HIDDEN;
31 WS_XML_STRING *alloc_xml_string( const unsigned char *, ULONG ) DECLSPEC_HIDDEN;
32 WS_XML_UTF8_TEXT *alloc_utf8_text( const unsigned char *, ULONG ) DECLSPEC_HIDDEN;
33 HRESULT append_attribute( WS_XML_ELEMENT_NODE *, WS_XML_ATTRIBUTE * ) DECLSPEC_HIDDEN;
34 void free_attribute( WS_XML_ATTRIBUTE * ) DECLSPEC_HIDDEN;
35 WS_TYPE map_value_type( WS_VALUE_TYPE ) DECLSPEC_HIDDEN;
36 BOOL set_fp_rounding( unsigned short * ) DECLSPEC_HIDDEN;
37 void restore_fp_rounding( unsigned short ) DECLSPEC_HIDDEN;
38 ULONG get_type_size( WS_TYPE, const WS_STRUCT_DESCRIPTION * ) DECLSPEC_HIDDEN;
40 struct node
42 WS_XML_ELEMENT_NODE hdr;
43 struct list entry;
44 struct node *parent;
45 struct list children;
48 struct node *alloc_node( WS_XML_NODE_TYPE ) DECLSPEC_HIDDEN;
49 void free_node( struct node * ) DECLSPEC_HIDDEN;
50 void destroy_nodes( struct node * ) DECLSPEC_HIDDEN;
51 struct node *find_parent( struct node * ) DECLSPEC_HIDDEN;
52 HRESULT copy_node( WS_XML_READER *, struct node ** ) DECLSPEC_HIDDEN;
54 static inline WS_XML_NODE_TYPE node_type( const struct node *node )
56 return node->hdr.node.nodeType;
59 BOOL move_to_root_element( struct node *, struct node ** ) DECLSPEC_HIDDEN;
60 BOOL move_to_next_element( struct node ** ) DECLSPEC_HIDDEN;
61 BOOL move_to_prev_element( struct node ** ) DECLSPEC_HIDDEN;
62 BOOL move_to_child_element( struct node ** ) DECLSPEC_HIDDEN;
63 BOOL move_to_end_element( struct node ** ) DECLSPEC_HIDDEN;
64 BOOL move_to_parent_element( struct node ** ) DECLSPEC_HIDDEN;
65 BOOL move_to_first_node( struct node ** ) DECLSPEC_HIDDEN;
66 BOOL move_to_next_node( struct node ** ) DECLSPEC_HIDDEN;
67 BOOL move_to_prev_node( struct node ** ) DECLSPEC_HIDDEN;
68 BOOL move_to_bof( struct node *, struct node ** ) DECLSPEC_HIDDEN;
69 BOOL move_to_eof( struct node *, struct node ** ) DECLSPEC_HIDDEN;
70 BOOL move_to_child_node( struct node ** ) DECLSPEC_HIDDEN;
71 BOOL move_to_parent_node( struct node ** ) DECLSPEC_HIDDEN;
73 struct prop_desc
75 ULONG size;
76 BOOL readonly;
77 BOOL writeonly;
80 struct prop
82 void *value;
83 ULONG size;
84 BOOL readonly;
85 BOOL writeonly;
88 ULONG prop_size( const struct prop_desc *, ULONG ) DECLSPEC_HIDDEN;
89 void prop_init( const struct prop_desc *, ULONG, struct prop *, void * ) DECLSPEC_HIDDEN;
90 HRESULT prop_set( const struct prop *, ULONG, ULONG, const void *, ULONG ) DECLSPEC_HIDDEN;
91 HRESULT prop_get( const struct prop *, ULONG, ULONG, void *, ULONG ) DECLSPEC_HIDDEN;
93 struct channel
95 WS_CHANNEL_TYPE type;
96 WS_CHANNEL_BINDING binding;
97 WS_CHANNEL_STATE state;
98 ULONG prop_count;
99 struct prop prop[50];
102 HRESULT create_channel( WS_CHANNEL_TYPE, WS_CHANNEL_BINDING, const WS_CHANNEL_PROPERTY *,
103 ULONG, struct channel ** ) DECLSPEC_HIDDEN;
104 void free_channel( struct channel * ) DECLSPEC_HIDDEN;
105 HRESULT open_channel( struct channel *, const WS_ENDPOINT_ADDRESS * ) DECLSPEC_HIDDEN;
106 HRESULT close_channel( struct channel * ) DECLSPEC_HIDDEN;
108 static inline void *heap_alloc( SIZE_T size )
110 return HeapAlloc( GetProcessHeap(), 0, size );
113 static inline void *heap_alloc_zero( SIZE_T size )
115 return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size );
118 static inline void *heap_realloc( void *mem, SIZE_T size )
120 return HeapReAlloc( GetProcessHeap(), 0, mem, size );
123 static inline void *heap_realloc_zero( void *mem, SIZE_T size )
125 return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, mem, size );
128 static inline BOOL heap_free( void *mem )
130 return HeapFree( GetProcessHeap(), 0, mem );