xine-lib 1.2.13-20230125hg15249
|
Go to the source code of this file.
Data Structures | |
struct | xine_stree_t |
Enumerations | |
enum | xine_stree_mode_t { XINE_STREE_AUTO = 0 , XINE_STREE_XML , XINE_STREE_JSON , XINE_STREE_URL , XINE_STREE_LAST } |
Functions | |
xine_stree_t * | xine_stree_load (char *buf, xine_stree_mode_t *mode) |
void | xine_stree_dump (const xine_stree_t *tree, const char *buf, uint32_t base) |
uint32_t | xine_stree_find (const xine_stree_t *tree, const char *buf, const char *path, uint32_t base, int case_sens) |
void | xine_stree_delete (xine_stree_t **tree) |
size_t | xine_string_unampersand (char *s) |
size_t | xine_string_unpercent (char *s) |
size_t | xine_string_unbackslash (char *s) |
enum xine_stree_mode_t |
void xine_stree_delete | ( | xine_stree_t ** | tree | ) |
References NULL.
Referenced by mpd_input_dispose(), and mpd_input_load_manifest().
void xine_stree_dump | ( | const xine_stree_t * | tree, |
const char * | buf, | ||
uint32_t | base ) |
base is an index into the tree, where to start.
References xine_stree_t::first_child, xine_stree_t::key, xine_stree_t::level, xine_stree_t::next, NULL, xine_stree_t::parent, xine_stree_t::prev, and xine_stree_t::value.
uint32_t xine_stree_find | ( | const xine_stree_t * | tree, |
const char * | buf, | ||
const char * | path, | ||
uint32_t | base, | ||
int | case_sens ) |
path is a dot separated list of parts. part is a key, a zero based index number in square brackets, or both. the special key "[]" refers to xml tag content text. "foo.[][0]" will also be available as "foo".
References _tab_key, _tab_xml, xine_stree_t::first_child, xine_stree_t::key, xine_stree_t::next, v, and z.
Referenced by mpd_input_load_manifest(), and mpd_stree_find().
xine_stree_t * xine_stree_load | ( | char * | buf, |
xine_stree_mode_t * | mode ) |
buf will be reused (modified) to hold the strings referenced by xine_stree_t. XINE_STREE_AUTO will update mode.
References _tab_xml, _xine_stree_load_json(), _xine_stree_load_url(), _xine_stree_load_xml(), mode(), NULL, XINE_STREE_AUTO, XINE_STREE_JSON, XINE_STREE_LAST, XINE_STREE_URL, and XINE_STREE_XML.
Referenced by mpd_input_load_manifest().
size_t xine_string_unampersand | ( | char * | s | ) |
"&" -> "&" "<" -> "<" ">" -> ">" """ -> "\"" "핵" -> "핵" return new strlen ().
References _tab_unhex, v, and z.
Referenced by _xine_stree_load_xml().
size_t xine_string_unbackslash | ( | char * | s | ) |
"\n" -> <newline> "\070" -> "8" "\x37" -> "7" "\ud575" -> "핵" "\cG" -> <bell> (^G) return new strlen ().
References _tab_unhex, v, and z.
Referenced by _xine_stree_load_json().
size_t xine_string_unpercent | ( | char * | s | ) |
"%3a" -> ":" etc. return new strlen ().
References _tab_unhex, v, and z.
Referenced by _xine_stree_load_url().