Defines | Functions

Strings

Defines

#define str_format_meta(a, b)   str_format_meta( VLC_OBJECT( a ), b )
#define str_format(a, b)   str_format( VLC_OBJECT( a ), b )

Functions

VLC_API void resolve_xml_special_chars (char *psz_value)
 Converts "&lt;", "&gt;" and "&amp;" to "<", ">" and "&".
VLC_API char * convert_xml_special_chars (const char *psz_content)
 XML-encode an UTF-8 string.
VLC_API char * vlc_b64_encode_binary (const uint8_t *, size_t)
VLC_API char * vlc_b64_encode (const char *)
VLC_API size_t vlc_b64_decode_binary_to_buffer (uint8_t *p_dst, size_t i_dst_max, const char *psz_src)
VLC_API size_t vlc_b64_decode_binary (uint8_t **pp_dst, const char *psz_src)
VLC_API char * vlc_b64_decode (const char *psz_src)
VLC_API char * str_format_time (const char *)
 Formats current time into a heap-allocated string.
VLC_API char * str_format_meta (vlc_object_t *, const char *)
VLC_API char * str_format (vlc_object_t *, const char *)
 Apply str format time and str format meta.
VLC_API void filename_sanitize (char *)
 Remove forbidden, potentially forbidden and otherwise evil characters from filenames.
VLC_API void path_sanitize (char *)
 Remove forbidden characters from full paths (leaves slashes).
VLC_API time_t str_duration (const char *)

Define Documentation

#define str_format (   a,
  b 
)    str_format( VLC_OBJECT( a ), b )
#define str_format_meta (   a,
  b 
)    str_format_meta( VLC_OBJECT( a ), b )

Referenced by str_format().


Function Documentation

VLC_API char* convert_xml_special_chars ( const char *  str  ) 

XML-encode an UTF-8 string.

Parameters:
str nul-terminated UTF-8 byte sequence to XML-encode
Returns:
XML encoded string or NULL on error (errno is set to ENOMEM or EILSEQ as appropriate)

References likely, unlikely, and vlc_towc().

Referenced by encode().

VLC_API void filename_sanitize ( char *  str  ) 

Remove forbidden, potentially forbidden and otherwise evil characters from filenames.

This includes slashes, and popular characters like colon (on Unix anyway), so this should only be used for automatically generated filenames.

Warning:
Do not use this on full paths, only single file names without any directory separator!

References EnsureUTF8().

Referenced by ArtCacheGetDirPath(), ArtCacheName(), input_CreateFilename(), and vout_snapshot_SaveImage().

VLC_API void path_sanitize ( char *   ) 

Remove forbidden characters from full paths (leaves slashes).

Referenced by input_CreateFilename(), and vout_snapshot_SaveImage().

VLC_API void resolve_xml_special_chars ( char *  psz_value  ) 

Converts "&lt;", "&gt;" and "&amp;" to "<", ">" and "&".

Parameters:
string to convert

References cmp_entity(), xml_entity_s::psz_char, xml_entity_s::psz_entity, and xml_entities.

Referenced by decode().

VLC_API time_t str_duration ( const char *   ) 
VLC_API char* str_format ( vlc_object_t ,
const char *   
)

Apply str format time and str format meta.

References str_format_meta, and str_format_time().

VLC_API char* str_format_meta ( vlc_object_t ,
const char *   
)
VLC_API char* str_format_time ( const char *  tformat  ) 

Formats current time into a heap-allocated string.

Parameters:
tformat time format (as with C strftime())
Returns:
an allocated string (must be free()'d), or NULL on memory error.

References localtime_r(), and strdup().

Referenced by str_format().

VLC_API char* vlc_b64_decode ( const char *  psz_src  ) 
VLC_API size_t vlc_b64_decode_binary ( uint8_t **  pp_dst,
const char *  psz_src 
)
VLC_API size_t vlc_b64_decode_binary_to_buffer ( uint8_t *  p_dst,
size_t  i_dst_max,
const char *  psz_src 
)
VLC_API char* vlc_b64_encode ( const char *   ) 
VLC_API char* vlc_b64_encode_binary ( const uint8_t *  ,
size_t   
)

Referenced by vlc_b64_encode().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines