Vuo  2.3.2
Functions | Variables
VuoUrl.c File Reference

Description

VuoUrl implementation.

Definition in file VuoUrl.c.

Go to the source code of this file.

Functions

VuoUrl VuoUrl_makeFromJson (json_object *js)
 Decodes the JSON object js, expected to contain a UTF-8 string, to create a new value. More...
 
json_objectVuoUrl_getJson (const VuoUrl value)
 Encodes value as a JSON object. More...
 
char * VuoUrl_getSummary (const VuoUrl value)
 Creates a new UTF-8 C string from value, or, if it's more than 50 Unicode characters long, creates an aposiopesis. More...
 
bool VuoUrl_getParts (const VuoUrl url, VuoText *scheme, VuoText *user, VuoText *host, VuoInteger *port, VuoText *path, VuoText *query, VuoText *fragment)
 Attempts to parse url and outputs its parts. More...
 
bool VuoUrl_getFileParts (const VuoUrl url, VuoText *path, VuoText *folder, VuoText *filename, VuoText *extension)
 Attempts to parse url as a file: URL, and outputs its parts. More...
 
bool VuoUrl_areEqual (const VuoText a, const VuoText b)
 Returns true if a == b. More...
 
bool VuoUrl_isLessThan (const VuoText a, const VuoText b)
 Returns true if a < b. More...
 
static bool VuoUrl_urlContainsScheme (const char *url)
 Returns a boolean indicating whether the input url contains a scheme. More...
 
static bool VuoUrl_urlIsAbsoluteFilePath (const char *url)
 Returns a boolean indicating whether the input url is an absolute file path. More...
 
static bool VuoUrl_urlIsUserRelativeFilePath (const char *url)
 Returns a boolean indicating whether the input url is relative to the user's home folder. More...
 
bool VuoUrl_isRelativePath (const VuoUrl url)
 Returns a boolean indicating whether the provided url is a relative file path. More...
 
VuoText VuoUrl_escapePosixPath (const VuoText path)
 URL-escapes characters in path to make it a valid IRI path. More...
 
VuoText VuoUrl_escapeUTF8 (const VuoText url)
 URL-escapes UTF-8 bytes greater than 0x7F. More...
 
VuoUrl VuoUrl_normalize (const VuoText url, enum VuoUrlNormalizeFlags flags)
 Resolves url (which could be an absolute URL, an absolute Unix file path, a relative Unix file path, or a user-relative Unix file path) into an absolute URL. More...
 
VuoText VuoUrl_decodeRFC3986 (const VuoUrl url)
 Decodes a RFC 3986 section 2.1 URI-encoded string. More...
 
VuoText VuoUrl_getPosixPath (const VuoUrl url)
 If url uses the file: scheme, returns the corresponding (URL-decoded) POSIX path. More...
 
bool VuoUrl_isBundle (const VuoUrl url)
 Returns true if the url refers to an OS X bundle folder. More...
 
VuoUrl VuoUrl_appendFileExtension (const char *filename, struct json_object *validExtensions)
 Given a filename and set of valid extensions, returns a new VuoUrl guaranteed to have the extension. More...
 

Variables

static const char VuoUrl_reservedCharacters []
 http://www.blooberry.com/indexdot/html/topics/urlencoding.htm#whatwhy More...
 
static const char * VuoUrl_fileScheme = "file:"
 URL scheme for local files. More...
 
static const char * VuoUrl_httpScheme = "http://"
 URL scheme for HTTP. More...
 

Function Documentation

◆ VuoUrl_urlContainsScheme()

static bool VuoUrl_urlContainsScheme ( const char *  url)
static

Returns a boolean indicating whether the input url contains a scheme.

Definition at line 276 of file VuoUrl.c.

◆ VuoUrl_urlIsAbsoluteFilePath()

static bool VuoUrl_urlIsAbsoluteFilePath ( const char *  url)
static

Returns a boolean indicating whether the input url is an absolute file path.

Definition at line 293 of file VuoUrl.c.

◆ VuoUrl_urlIsUserRelativeFilePath()

static bool VuoUrl_urlIsUserRelativeFilePath ( const char *  url)
static

Returns a boolean indicating whether the input url is relative to the user's home folder.

Definition at line 301 of file VuoUrl.c.

Variable Documentation

◆ VuoUrl_fileScheme

const char* VuoUrl_fileScheme = "file:"
static

URL scheme for local files.

Definition at line 430 of file VuoUrl.c.

◆ VuoUrl_httpScheme

const char* VuoUrl_httpScheme = "http://"
static

URL scheme for HTTP.

Definition at line 431 of file VuoUrl.c.

◆ VuoUrl_reservedCharacters

const char VuoUrl_reservedCharacters[]
static
Initial value:
=
{
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
'"', '$', '&', '+', ',', ':', ';', '=', '?', '@', '#', ' ',
'%'
}

http://www.blooberry.com/indexdot/html/topics/urlencoding.htm#whatwhy

Definition at line 320 of file VuoUrl.c.