|
VLC
2.1.0-git
|
This file defines functions for manipulating URL in vlc. More...

Go to the source code of this file.
Data Structures | |
| struct | vlc_url_t |
Functions | |
| char * | vlc_path2uri (const char *path, const char *scheme) |
| Builds a URL representation from a local file path. | |
| char * | decode_URI_duplicate (const char *psz) |
| Decodes an encoded URI component. | |
| char * | decode_URI (char *psz) |
| Decodes an encoded URI component in place. | |
| char * | encode_URI_component (const char *psz) |
| Encodes a URI component (RFC3986 §2). | |
| char * | make_path (const char *url) |
| Tries to convert a URI to a local (UTF-8-encoded) file path. | |
| void | vlc_UrlParse (vlc_url_t *, const char *, unsigned char) |
| void | vlc_UrlClean (vlc_url_t *) |
This file defines functions for manipulating URL in vlc.
| 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().
| 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.
| 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().
| 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 * | ) |
| void vlc_UrlParse | ( | vlc_url_t * | , |
| const char * | , | ||
| unsigned | char | ||
| ) |
1.8.1.2