/usr/include/openwsman/wsman-xml-api.h is in libopenwsman-dev 2.6.5-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | /*******************************************************************************
* Copyright (C) 2004-2006 Intel Corp. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Intel Corp. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL Intel Corp. OR THE CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
/**
* @author Anas Nashif
* @author Eugene Yarmosh
*/
#ifndef WS_XML_API_H_
#define WS_XML_API_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <stdio.h>
#include "wsman-types.h"
/**
* @defgroup XML XML
* @brief XML API
*
* @{
*/
// context
#define WS_CONTEXT_TYPE_MASK 0x0f
#define WS_CONTEXT_FREE_DATA 0x80
#define WS_CONTEXT_TYPE_STRING 0x01
#define WS_CONTEXT_TYPE_ULONG 0x02
#define WS_CONTEXT_TYPE_XMLDOC 0x03
#define WS_CONTEXT_TYPE_XMLNODE 0x04
#define WS_CONTEXT_TYPE_BLOB 0x05
#define WS_CONTEXT_TYPE_FAULT 0x06
#define XML_LAST_CHILD (-1)
#define XML_ELEMENT_NEXT (-2)
#define XML_ELEMENT_PREV (-3)
#define XML_ELEMENT_PARENT (-4)
#define XML_NS_URI 1
#define XML_NS_PREFIX 2
#define XML_LOCAL_NAME 3
#define XML_TEXT_VALUE 4
#define XML_COUNT_NODE 10
#define XML_COUNT_NS 11
#define XML_COUNT_ATTR 12
#define PROCESSED_MSG_ID_MAX_SIZE 200
#define WSMAN_MINIMAL_ENVELOPE_SIZE_REQUEST 8192
#define WSMAN_MAX_ENVELOPE_SIZE 32767
void ws_xml_free_memory(void *ptr);
typedef int (*WsXmlEnumCallback) (WsXmlNodeH, void *);
typedef int (*WsXmlNsEnumCallback) (WsXmlNodeH, WsXmlNsH, void *);
// Dumping
void ws_xml_dump_node_tree(FILE * f, WsXmlNodeH node);
/* indented, using doc encoding */
void ws_xml_dump_memory_node_tree(WsXmlNodeH node, char **buf,
int *ptrSize);
/* indented, using given encoding (default: utf-8) */
void ws_xml_dump_memory_node_tree_enc(WsXmlNodeH node, char **buf,
int *ptrSize, const char *encoding);
void ws_xml_dump_doc(FILE * f, WsXmlDocH doc);
/* non-indented, using given encoding */
void ws_xml_dump_memory_enc(WsXmlDocH doc, char **buf, int *ptrSize,
const char *encoding);
// WSXmlDoc handling
WsXmlNodeH ws_xml_get_doc_root(WsXmlDocH doc);
void ws_xml_destroy_doc(WsXmlDocH doc);
char *ws_xml_get_xpath_value(WsXmlDocH doc, char *expression);
WsXmlDocH ws_xml_create_soap_envelope(void);
WsXmlNodeH ws_xml_get_soap_envelope(WsXmlDocH doc);
WsXmlNodeH ws_xml_get_soap_header(WsXmlDocH doc);
WsXmlNodeH ws_xml_get_soap_body(WsXmlDocH doc);
WsXmlNodeH ws_xml_get_soap_element(WsXmlDocH doc, const char *name);
// WsXmlNode handling
WsXmlDocH ws_xml_get_node_doc(WsXmlNodeH node);
void ws_xml_duplicate_tree(WsXmlNodeH dstNode, WsXmlNodeH srcNode);
int ws_xml_duplicate_children(WsXmlNodeH dstNode, WsXmlNodeH srcNode);
WsXmlNodeH ws_xml_get_node_parent(WsXmlNodeH node);
int ws_xml_get_child_count(WsXmlNodeH parent);
int ws_xml_get_child_count_by_qname(WsXmlNodeH parent,
const char *nsUri, const char *name);
WsXmlNodeH ws_xml_get_child(WsXmlNodeH parent, int index,
const char *nsUri, const char *localName);
int ws_xml_enum_children(WsXmlNodeH parent, WsXmlEnumCallback callback,
void *data, int bRecursive);
WsXmlNodeH ws_xml_add_child(WsXmlNodeH node, const char *ns,
const char *localName, const char *val);
WsXmlNodeH ws_xml_add_prev_sibling(WsXmlNodeH node, const char *ns,
const char *localName, const char *val);
WsXmlNodeH ws_xml_add_child_sort(WsXmlNodeH node, const char *ns,
const char *localName, const char *val, int xmlescape);
WsXmlNodeH ws_xml_add_empty_child_format(WsXmlNodeH node,
const char *nsUri,
const char *format, ...);
WsXmlNsH ws_xml_ns_add(WsXmlNodeH node, const char *uri,
const char *prefix);
void ws_xml_set_ns(WsXmlNodeH r, const char* ns, const char* prefix );
WsXmlNodeH ws_xml_add_child_format(WsXmlNodeH node, const char *nsUri,
const char *localName,
const char *format, ...);
WsXmlNodeH ws_xml_add_qname_child(WsXmlNodeH parent, const char *nameNs,
const char *name, const char *valueNs,
const char *value);
int ws_xml_enum_tree(WsXmlNodeH top, WsXmlEnumCallback callback,
void *data, int bRecursive);
WsXmlNodeH ws_xml_find_in_tree(WsXmlNodeH head, const char *nsUri,
const char *localName, int bRecursive);
int ws_xml_is_node_qname(WsXmlNodeH node, const char *nsUri,
const char *name);
char *ws_xml_get_node_local_name(WsXmlNodeH node);
char *ws_xml_get_node_name_ns(WsXmlNodeH node);
int ws_xml_set_node_name(WsXmlNodeH node, const char *nsUri,
const char *name);
int ws_xml_set_node_qname_val(WsXmlNodeH node, const char *valNsUri,
const char *valName);
int ws_xml_get_ns_count(WsXmlNodeH node, int bWalkUpTree);
void ws_xml_ns_enum(WsXmlNodeH node, WsXmlNsEnumCallback callback,
void *data, int bWalkUpTree);
WsXmlNsH ws_xml_find_ns(WsXmlNodeH node, const char *nsUri,
const char *prefix, int bWalkUpTree);
WsXmlNsH ws_xml_get_ns(WsXmlNodeH node, int index);
WsXmlNsH ws_xml_define_ns(WsXmlNodeH node, const char *nsUri,
const char *nsPrefix, int bDefault);
char *ws_xml_get_ns_prefix(WsXmlNsH ns);
char *ws_xml_get_ns_uri(WsXmlNsH ns);
unsigned long ws_xml_get_node_ulong(WsXmlNodeH node);
int ws_xml_set_node_ulong(WsXmlNodeH node, unsigned long uVal);
int ws_xml_set_node_long(WsXmlNodeH node, long Val);
int ws_xml_set_node_real(WsXmlNodeH node, double Val);
char *ws_xml_get_node_text(WsXmlNodeH node);
int ws_xml_set_node_text(WsXmlNodeH node, const char *text);
void ws_xml_duplicate_attr(WsXmlNodeH dstNode, WsXmlNodeH srcNode);
int ws_xml_get_node_attr_count(WsXmlNodeH node);
WsXmlAttrH ws_xml_get_node_attr(WsXmlNodeH node, int index);
WsXmlAttrH ws_xml_find_node_attr(WsXmlNodeH node, const char *attrNs,
const char *attrName);
WsXmlAttrH ws_xml_add_node_attr(WsXmlNodeH node, const char *nsUri,
const char *name, const char *value);
WsXmlAttrH ws_xml_add_qname_attr(WsXmlNodeH node, const char *nameNs,
const char *name, const char *valueNs,
const char *value);
unsigned long ws_xml_find_attr_ulong(WsXmlNodeH node, const char *ns,
const char *attrName);
int ws_xml_find_attr_bool(WsXmlNodeH node, const char *ns,
const char *attrName);
void ws_xml_remove_node_attr(WsXmlAttrH attr);
char *ws_xml_get_attr_name(WsXmlAttrH attr);
char *ws_xml_get_attr_ns(WsXmlAttrH attr);
char *ws_xml_get_attr_ns_prefix(WsXmlAttrH attr);
char *ws_xml_get_attr_value(WsXmlAttrH attr);
char *ws_xml_find_attr_value(WsXmlNodeH node, const char *ns,
const char *attrName);
void ws_xml_make_default_prefix(WsXmlNodeH node, const char *uri,
char *buf, int bufsize);
void ws_xml_copy_node(WsXmlNodeH src, WsXmlNodeH dst);
WsXmlDocH ws_xml_clone_and_create_doc(WsXmlDocH doc,
const char *rootNsUri,
const char *rootName );
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /*WS_XML_API_H_ */
|