xine-lib 1.2.13-20230125hg15249
Data Structures | Enumerations | Functions
stree.h File Reference
#include <stdint.h>
#include <xine/attributes.h>
#include <xine/compat.h>

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_txine_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)
 

Enumeration Type Documentation

◆ xine_stree_mode_t

Enumerator
XINE_STREE_AUTO 
XINE_STREE_XML 
XINE_STREE_JSON 

<< eXtensible Markup Language

XINE_STREE_URL 

<< Java script Serial Object Notation

XINE_STREE_LAST 

<< Uniform Resource Location encoding

Function Documentation

◆ xine_stree_delete()

void xine_stree_delete ( xine_stree_t ** tree)

References NULL.

Referenced by mpd_input_dispose(), and mpd_input_load_manifest().

◆ xine_stree_dump()

void xine_stree_dump ( const xine_stree_t * tree,
const char * buf,
uint32_t base )

◆ xine_stree_find()

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_load()

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().

◆ xine_string_unampersand()

size_t xine_string_unampersand ( char * s)

"&amp;" -> "&" "&lt;" -> "<" "&gt;" -> ">" "&quot;" -> "\"" "&#xd575;" -> "핵" return new strlen ().

References _tab_unhex, v, and z.

Referenced by _xine_stree_load_xml().

◆ xine_string_unbackslash()

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().

◆ xine_string_unpercent()

size_t xine_string_unpercent ( char * s)

"%3a" -> ":" etc. return new strlen ().

References _tab_unhex, v, and z.

Referenced by _xine_stree_load_url().