summaryrefslogtreecommitdiffstats
path: root/asxparser.h
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-12 14:19:53 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-12 14:19:53 +0000
commit2f58e31c26d212c41b239f1e1b2f84d31cb2a48e (patch)
tree3d7dde8ac71a382311a472fe2c1b4bb2079d0e78 /asxparser.h
parent1402692370a360a0e1d6eaddb505ce4b8ee91aa4 (diff)
downloadmpv-2f58e31c26d212c41b239f1e1b2f84d31cb2a48e.tar.bz2
mpv-2f58e31c26d212c41b239f1e1b2f84d31cb2a48e.tar.xz
Allow to use the asx parser for some other purposes
A few 10L fix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8171 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'asxparser.h')
-rw-r--r--asxparser.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/asxparser.h b/asxparser.h
index 256f10239c..9e872f1bda 100644
--- a/asxparser.h
+++ b/asxparser.h
@@ -15,3 +15,35 @@ struct _ASX_Parser_t {
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);