Remove some useless code
[mplayer/glamo.git] / asxparser.h
blob8d3c87bcfd12d126e57a7d1a1c66517142629f03
3 typedef struct _ASX_Parser_t ASX_Parser_t;
5 typedef struct {
6 char* buffer;
7 int line;
8 } ASX_LineSave_t;
10 struct _ASX_Parser_t {
11 int line; // Curent line
12 ASX_LineSave_t *ret_stack;
13 int ret_stack_size;
14 char* last_body;
15 int deep;
18 ASX_Parser_t*
19 asx_parser_new(void);
21 void
22 asx_parser_free(ASX_Parser_t* parser);
25 * Return -1 on error, 0 when nothing is found, 1 on sucess
27 int
28 asx_get_element(ASX_Parser_t* parser,char** _buffer,
29 char** _element,char** _body,char*** _attribs);
31 int
32 asx_parse_attribs(ASX_Parser_t* parser,char* buffer,char*** _attribs);
34 /////// Attribs utils
36 char*
37 asx_get_attrib(const char* attrib,char** attribs);
39 int
40 asx_attrib_to_enum(const char* val,char** valid_vals);
42 #define asx_free_attribs(a) asx_list_free((void***)&a,free)
44 ////// List utils
46 typedef void (*ASX_FreeFunc)(void* arg);
48 void
49 asx_list_free(void* list_ptr,ASX_FreeFunc free_func);