Mercurial > mplayer.hg
diff asxparser.h @ 8170:1f6ae3d15f19
Allow to use the asx parser for some other purposes
A few 10L fix
author | albeu |
---|---|
date | Tue, 12 Nov 2002 14:19:53 +0000 |
parents | 487cfc28525d |
children | 75327b24e06f |
line wrap: on
line diff
--- a/asxparser.h Tue Nov 12 14:16:30 2002 +0000 +++ b/asxparser.h Tue Nov 12 14:19:53 2002 +0000 @@ -15,3 +15,35 @@ int deep; }; +ASX_Parser_t* +asx_parser_new(void); + +void +asx_parser_free(ASX_Parser_t* parser); + +/* + * Return -1 on error, 0 when nothing is found, 1 on sucess + */ +int +asx_get_element(ASX_Parser_t* parser,char** _buffer, + char** _element,char** _body,char*** _attribs); + +int +asx_parse_attribs(ASX_Parser_t* parser,char* buffer,char*** _attribs); + +/////// Attribs utils + +char* +asx_get_attrib(char* attrib,char** attribs); + +int +asx_attrib_to_enum(char* val,char** valid_vals); + +#define asx_free_attribs(a) asx_list_free((void***)&a,free) + +////// List utils + +typedef void (*ASX_FreeFunc)(void* arg); + +void +asx_list_free(void* list_ptr,ASX_FreeFunc free_func);