diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/eina/src/include/eina_simple_xml_parser.h | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/eina/src/include/eina_simple_xml_parser.h')
-rw-r--r-- | libraries/eina/src/include/eina_simple_xml_parser.h | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/libraries/eina/src/include/eina_simple_xml_parser.h b/libraries/eina/src/include/eina_simple_xml_parser.h index db9a4e1..78660ef 100644 --- a/libraries/eina/src/include/eina_simple_xml_parser.h +++ b/libraries/eina/src/include/eina_simple_xml_parser.h | |||
@@ -119,16 +119,16 @@ struct _Eina_Simple_XML_Node_Data | |||
119 | 119 | ||
120 | typedef enum _Eina_Simple_XML_Type | 120 | typedef enum _Eina_Simple_XML_Type |
121 | { | 121 | { |
122 | EINA_SIMPLE_XML_OPEN = 0, /* <tag attribute="value"> */ | 122 | EINA_SIMPLE_XML_OPEN = 0, /*!< <tag attribute="value"> */ |
123 | EINA_SIMPLE_XML_OPEN_EMPTY, /* <tag attribute="value" /> */ | 123 | EINA_SIMPLE_XML_OPEN_EMPTY, /*!< <tag attribute="value" /> */ |
124 | EINA_SIMPLE_XML_CLOSE, /* </tag> */ | 124 | EINA_SIMPLE_XML_CLOSE, /*!< </tag> */ |
125 | EINA_SIMPLE_XML_DATA, /* tag text data */ | 125 | EINA_SIMPLE_XML_DATA, /*!< tag text data */ |
126 | EINA_SIMPLE_XML_CDATA, /* <![CDATA[something]]> */ | 126 | EINA_SIMPLE_XML_CDATA, /*!< <![CDATA[something]]> */ |
127 | EINA_SIMPLE_XML_ERROR, /* error contents */ | 127 | EINA_SIMPLE_XML_ERROR, /*!< error contents */ |
128 | EINA_SIMPLE_XML_PROCESSING, /* <?xml ... ?> <?php .. ?> */ | 128 | EINA_SIMPLE_XML_PROCESSING, /*!< <?xml ... ?> <?php .. ?> */ |
129 | EINA_SIMPLE_XML_DOCTYPE, /* <!DOCTYPE html */ | 129 | EINA_SIMPLE_XML_DOCTYPE, /*!< <!DOCTYPE html */ |
130 | EINA_SIMPLE_XML_COMMENT, /* <!-- something --> */ | 130 | EINA_SIMPLE_XML_COMMENT, /*!< <!-- something --> */ |
131 | EINA_SIMPLE_XML_IGNORED /* whatever is ignored by parser, like whitespace */ | 131 | EINA_SIMPLE_XML_IGNORED /*!< whatever is ignored by parser, like whitespace */ |
132 | } Eina_Simple_XML_Type; | 132 | } Eina_Simple_XML_Type; |
133 | 133 | ||
134 | typedef Eina_Bool (*Eina_Simple_XML_Cb)(void *data, Eina_Simple_XML_Type type, const char *content, unsigned offset, unsigned length); | 134 | typedef Eina_Bool (*Eina_Simple_XML_Cb)(void *data, Eina_Simple_XML_Type type, const char *content, unsigned offset, unsigned length); |
@@ -137,7 +137,7 @@ typedef Eina_Bool (*Eina_Simple_XML_Attribute_Cb)(void *data, const char *key, c | |||
137 | 137 | ||
138 | /** | 138 | /** |
139 | * Parse a section of XML string text | 139 | * Parse a section of XML string text |
140 | * | 140 | * |
141 | * @param buf the input string. May not contain \0 terminator. | 141 | * @param buf the input string. May not contain \0 terminator. |
142 | * @param buflen the input string size. | 142 | * @param buflen the input string size. |
143 | * @param strip whenever this parser should strip leading and trailing | 143 | * @param strip whenever this parser should strip leading and trailing |
@@ -164,12 +164,15 @@ EAPI Eina_Bool eina_simple_xml_parse(const char *buf, unsigned buflen, | |||
164 | /** | 164 | /** |
165 | * Given the contents of a tag, find where the attributes start. | 165 | * Given the contents of a tag, find where the attributes start. |
166 | * | 166 | * |
167 | * The tag contents is returned by eina_simple_xml_parse() when | 167 | * @param buf the input string. May not contain \0 terminator. |
168 | * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY. | 168 | * @param buflen the input string size. |
169 | * | ||
170 | * @return pointer to the start of attributes, it can be used | 169 | * @return pointer to the start of attributes, it can be used |
171 | * to feed eina_simple_xml_attributes_parse(). NULL is returned | 170 | * to feed eina_simple_xml_attributes_parse(). NULL is returned |
172 | * if no attributes were found. | 171 | * if no attributes were found. |
172 | * | ||
173 | * The tag contents is returned by eina_simple_xml_parse() when | ||
174 | * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY. | ||
175 | * | ||
173 | */ | 176 | */ |
174 | EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsigned buflen); | 177 | EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsigned buflen); |
175 | 178 | ||
@@ -183,6 +186,7 @@ EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsigned | |||
183 | * key (null-terminated) and the last is the value (null | 186 | * key (null-terminated) and the last is the value (null |
184 | * terminated). These strings should not be modified and | 187 | * terminated). These strings should not be modified and |
185 | * reference is just valid until the function return. | 188 | * reference is just valid until the function return. |
189 | * @param data data to pass to the callback function. | ||
186 | * | 190 | * |
187 | * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or | 191 | * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or |
188 | * parsing error. | 192 | * parsing error. |
@@ -238,8 +242,8 @@ EAPI void eina_simple_xml_node_tag_free(Eina_Simple_XML_Node_Tag *tag); | |||
238 | * | 242 | * |
239 | * @param parent if provided, will be set in the resulting structure | 243 | * @param parent if provided, will be set in the resulting structure |
240 | * as well as the data will be appended to children list. | 244 | * as well as the data will be appended to children list. |
241 | * @param content string to be used. Must not be NULL. | 245 | * @param contents string to be used. Must not be NULL. |
242 | * @param length size in bytes of @a content. | 246 | * @param length size in bytes of @a contents. |
243 | * | 247 | * |
244 | * @return newly allocated memory or NULL on error. This memory should be | 248 | * @return newly allocated memory or NULL on error. This memory should be |
245 | * released with eina_simple_xml_node_data_free() or indirectly | 249 | * released with eina_simple_xml_node_data_free() or indirectly |
@@ -250,7 +254,7 @@ EAPI Eina_Simple_XML_Node_Data * eina_simple_xml_node_data_new(Eina_Simple_XML_N | |||
250 | /** | 254 | /** |
251 | * Remove data from parent and delete it. | 255 | * Remove data from parent and delete it. |
252 | * | 256 | * |
253 | * @param data to release memory. | 257 | * @param node to release memory. |
254 | */ | 258 | */ |
255 | EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node); | 259 | EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node); |
256 | 260 | ||
@@ -260,7 +264,7 @@ EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node); | |||
260 | * | 264 | * |
261 | * @param parent if provided, will be set in the resulting structure | 265 | * @param parent if provided, will be set in the resulting structure |
262 | * as well as the cdata will be appended to children list. | 266 | * as well as the cdata will be appended to children list. |
263 | * @param content string to be used. Must not be NULL. | 267 | * @param contents string to be used. Must not be NULL. |
264 | * @param length size in bytes of @a content. | 268 | * @param length size in bytes of @a content. |
265 | * | 269 | * |
266 | * @return newly allocated memory or NULL on error. This memory should be | 270 | * @return newly allocated memory or NULL on error. This memory should be |
@@ -272,7 +276,7 @@ EAPI Eina_Simple_XML_Node_CData * eina_simple_xml_node_cdata_new(Eina_Simple_XML | |||
272 | /** | 276 | /** |
273 | * Remove cdata from parent and delete it. | 277 | * Remove cdata from parent and delete it. |
274 | * | 278 | * |
275 | * @param cdata to release memory. | 279 | * @param node to release memory. |
276 | */ | 280 | */ |
277 | EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node); | 281 | EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node); |
278 | 282 | ||
@@ -282,8 +286,8 @@ EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node); | |||
282 | * | 286 | * |
283 | * @param parent if provided, will be set in the resulting structure | 287 | * @param parent if provided, will be set in the resulting structure |
284 | * as well as the processing will be appended to children list. | 288 | * as well as the processing will be appended to children list. |
285 | * @param content string to be used. Must not be NULL. | 289 | * @param contents string to be used. Must not be NULL. |
286 | * @param length size in bytes of @a content. | 290 | * @param length size in bytes of @a contents. |
287 | * | 291 | * |
288 | * @return newly allocated memory or NULL on error. This memory should be | 292 | * @return newly allocated memory or NULL on error. This memory should be |
289 | * released with eina_simple_xml_node_processing_free() or indirectly | 293 | * released with eina_simple_xml_node_processing_free() or indirectly |
@@ -294,7 +298,7 @@ EAPI Eina_Simple_XML_Node_Processing * eina_simple_xml_node_processing_new(Eina_ | |||
294 | /** | 298 | /** |
295 | * Remove processing from parent and delete it. | 299 | * Remove processing from parent and delete it. |
296 | * | 300 | * |
297 | * @param processing to release memory. | 301 | * @param node processing to release memory. |
298 | */ | 302 | */ |
299 | EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *node); | 303 | EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *node); |
300 | 304 | ||
@@ -304,8 +308,8 @@ EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *node); | |||
304 | * | 308 | * |
305 | * @param parent if provided, will be set in the resulting structure | 309 | * @param parent if provided, will be set in the resulting structure |
306 | * as well as the doctype will be appended to children list. | 310 | * as well as the doctype will be appended to children list. |
307 | * @param content string to be used. Must not be NULL. | 311 | * @param contents string to be used. Must not be NULL. |
308 | * @param length size in bytes of @a content. | 312 | * @param length size in bytes of @a contents. |
309 | * | 313 | * |
310 | * @return newly allocated memory or NULL on error. This memory should be | 314 | * @return newly allocated memory or NULL on error. This memory should be |
311 | * released with eina_simple_xml_node_doctype_free() or indirectly | 315 | * released with eina_simple_xml_node_doctype_free() or indirectly |
@@ -316,7 +320,7 @@ EAPI Eina_Simple_XML_Node_Doctype * eina_simple_xml_node_doctype_new(Eina_Simple | |||
316 | /** | 320 | /** |
317 | * Remove doctype from parent and delete it. | 321 | * Remove doctype from parent and delete it. |
318 | * | 322 | * |
319 | * @param doctype to release memory. | 323 | * @param node doctype to release memory. |
320 | */ | 324 | */ |
321 | EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node); | 325 | EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node); |
322 | 326 | ||
@@ -326,8 +330,8 @@ EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node); | |||
326 | * | 330 | * |
327 | * @param parent if provided, will be set in the resulting structure | 331 | * @param parent if provided, will be set in the resulting structure |
328 | * as well as the comment will be appended to children list. | 332 | * as well as the comment will be appended to children list. |
329 | * @param content string to be used. Must not be NULL. | 333 | * @param contents string to be used. Must not be NULL. |
330 | * @param length size in bytes of @a content. | 334 | * @param length size in bytes of @a contents. |
331 | * | 335 | * |
332 | * @return newly allocated memory or NULL on error. This memory should be | 336 | * @return newly allocated memory or NULL on error. This memory should be |
333 | * released with eina_simple_xml_node_comment_free() or indirectly | 337 | * released with eina_simple_xml_node_comment_free() or indirectly |
@@ -338,7 +342,7 @@ EAPI Eina_Simple_XML_Node_Comment * eina_simple_xml_node_comment_new(Eina_Simple | |||
338 | /** | 342 | /** |
339 | * Remove comment from parent and delete it. | 343 | * Remove comment from parent and delete it. |
340 | * | 344 | * |
341 | * @param comment to release memory. | 345 | * @param node comment to release memory. |
342 | */ | 346 | */ |
343 | EAPI void eina_simple_xml_node_comment_free(Eina_Simple_XML_Node_Data *node); | 347 | EAPI void eina_simple_xml_node_comment_free(Eina_Simple_XML_Node_Data *node); |
344 | 348 | ||
@@ -370,7 +374,7 @@ EAPI void eina_simple_xml_node_root_free(Eina_Simple_XML_Node_Root *root); | |||
370 | * @param node the base node to convert. | 374 | * @param node the base node to convert. |
371 | * @param indent indentation string, or NULL to disable it. | 375 | * @param indent indentation string, or NULL to disable it. |
372 | * | 376 | * |
373 | * @param NULL on errors or a newly allocated string on success. | 377 | * @return NULL on errors or a newly allocated string on success. |
374 | */ | 378 | */ |
375 | EAPI char * eina_simple_xml_node_dump(Eina_Simple_XML_Node *node, const char *indent); | 379 | EAPI char * eina_simple_xml_node_dump(Eina_Simple_XML_Node *node, const char *indent); |
376 | 380 | ||