|
VLC
2.1.0-git
|

Macros | |
| #define | SMB_SCHEME "smb" |
Functions | |
| char * | decode_URI_duplicate (const char *str) |
| Decodes an encoded URI component. | |
| char * | decode_URI (char *str) |
| Decodes an encoded URI component in place. | |
| static bool | isurisafe (int c) |
| static char * | encode_URI_bytes (const char *str, size_t *restrict lenp) |
| char * | encode_URI_component (const char *str) |
| Encodes a URI component (RFC3986 §2). | |
| char * | vlc_path2uri (const char *path, const char *scheme) |
| Builds a URL representation from a local file path. | |
| char * | make_path (const char *url) |
| Tries to convert a URI to a local (UTF-8-encoded) file path. | |
| static char * | vlc_idna_to_ascii (const char *idn) |
| Converts a UTF-8 nul-terminated IDN to nul-terminated ASCII domain name. | |
| void | vlc_UrlParse (vlc_url_t *restrict url, const char *str, unsigned char opt) |
| Splits an URL into parts. | |
| void | vlc_UrlClean (vlc_url_t *restrict url) |
| Releases resources allocated by vlc_UrlParse(). | |
| #define SMB_SCHEME "smb" |
Referenced by vlc_path2uri().
| char* decode_URI | ( | char * | str | ) |
Decodes an encoded URI component in place.
This function does NOT decode entire URIs. Instead, it decodes one component at a time (e.g. host name, directory, file name). Decoded URIs do not exist in the real world (see RFC3986 §2.4). Complete URIs are always "encoded" (or they are syntaxically invalid).
Note that URI encoding is different from Javascript escaping. Especially, white spaces and Unicode non-ASCII code points are encoded differently.
| str | nul-terminated URI component to decode |
Referenced by decode_URI_duplicate(), input_item_SetURI(), make_path(), and vlc_UrlParse().
| char* decode_URI_duplicate | ( | const char * | str | ) |
Decodes an encoded URI component.
See also decode_URI().
References decode_URI(), and strdup().
Referenced by test_decode().
|
static |
References isurisafe(), likely, and unlikely.
Referenced by encode_URI_component(), and vlc_path2uri().
| char* encode_URI_component | ( | const char * | str | ) |
Encodes a URI component (RFC3986 §2).
| str | nul-terminated UTF-8 representation of the component. |
References encode_URI_bytes(), and likely.
|
inlinestatic |
Referenced by encode_URI_bytes().
| char* make_path | ( | const char * | url | ) |
Tries to convert a URI to a local (UTF-8-encoded) file path.
| url | URI to convert |
References asprintf(), decode_URI(), strdup(), strndup(), and unlikely.
Referenced by get_path(), input_item_WriteMeta(), and subtitles_Detect().
|
static |
Converts a UTF-8 nul-terminated IDN to nul-terminated ASCII domain name.
| idn | UTF-8 Internationalized Domain Name to convert |
References strdup(), and unlikely.
Referenced by vlc_UrlParse().
| char* vlc_path2uri | ( | const char * | path, |
| const char * | scheme | ||
| ) |
Builds a URL representation from a local file path.
| path | path to convert (or URI to copy) |
| scheme | URI scheme to use (default is auto: "file", "fd" or "smb") |
References asprintf(), DIR_SEP, DIR_SEP_CHAR, encode_URI_bytes(), SMB_SCHEME, strdup(), unlikely, vlc_getcwd(), and vlc_path2uri().
Referenced by GetFilenames(), libvlc_InternalInit(), LoadSlaves(), make_URI_def(), playlist_FindArtInCache(), playlist_Import(), playlist_MLLoad(), playlist_SaveArt(), SubtitleAdd(), system_Configure(), vlc_path2uri(), vlm_ControlMediaInstanceStart(), vlm_OnMediaUpdate(), and WMCOPYWNDPROC().
| void vlc_UrlClean | ( | vlc_url_t *restrict | url | ) |
Releases resources allocated by vlc_UrlParse().
Referenced by httpd_HostCreate(), and input_item_SetURI().
| void vlc_UrlParse | ( | vlc_url_t *restrict | url, |
| const char * | str, | ||
| unsigned char | opt | ||
| ) |
Splits an URL into parts.
| url | structure of URL parts [OUT] |
| str | nul-terminated URL string to split |
| opt | if non-zero, character separating paths from options, normally the question mark |
References decode_URI(), strdup(), unlikely, and vlc_idna_to_ascii().
Referenced by httpd_HostCreate(), and input_item_SetURI().
1.8.1.2