upipe/uuri.h header reference

Upipe functions to parse or generate URIs according to RFC3986 More

Header inclusion  

Members  

Types  

Functions  

Description  

Upipe functions to parse or generate URIs according to RFC3986

Members detail  

#define _UPIPE_UURI_H_  

This macro is declared in upipe/uuri.h source file, line 31.

struct uuri  

This struct is declared in upipe/uuri.h source file, line 226.

This struct stores the different parts of an URI.

scheme ':' [ '//' authority ] path [ '?' query ] [ '#' fragment ]

FieldDescription
struct ustring scheme;scheme part
struct uuri_authority authority;authority
struct ustring path;path part
struct ustring query;query part
struct ustring fragment;fragment part

struct uuri_authority  

This struct is declared in upipe/uuri.h source file, line 164.

This struct stores the authority part of an URI.

[ userinfo '@' ] host [ ':' port ]

FieldDescription
struct ustring userinfo;userinfo part
struct ustring host;host part
struct ustring port;port part

bool uuri_authority_is_null(struct uuri_authority authority)  

This function is declared in upipe/uuri.h source file, line 192.

This function checks if an authority is null.

Parameter list:

  • authority: an uuri_authority structure

The return value is true if authority is null

int uuri_authority_len(const struct uuri_authority *authority, size_t *len_p)  

This function is declared in upipe/uuri.h source file, line 203.

This function gets the length required to print authority.

Parameter list:

  • authority: pointer to an uuri_authority structure
  • len_p: pointer to the length

The return value is an error code

struct uuri_authority uuri_authority_null(void )  

This function is declared in upipe/uuri.h source file, line 178.

This function returns an initialized uuri_authority.

The return value is an initialized uuri_authority structure

int uuri_authority_to_buffer(const struct uuri_authority *authority, char *buffer, size_t len)  

This function is declared in upipe/uuri.h source file, line 213.

This function prints the authority into a buffer.

Parameter list:

  • authority: pointer to an uuri_authority structure
  • buffer: pointer to buffer
  • len: size of the buffer

The return value is an error code

ssize_t uuri_escape(const char *str, char *buffer, size_t size)  

This function is declared in upipe/uuri.h source file, line 129.

This function escapes a string into a buffer.

Parameter list:

  • str: the string to escape
  • buffer: the destination buffer
  • size: the size of the destination buffer

The return value is the size needed to escape or a negative value on error

ssize_t uuri_escape_len(const char *str)  

This function is declared in upipe/uuri.h source file, line 137.

This function returns the size needed to escape.

Parameter list:

  • str: the string to escape

The return value is the size needed to escape or a negative value on error

int uuri_from_str(struct uuri *uuri, const char *str)  

This function is declared in upipe/uuri.h source file, line 303.

This function makes an uuri structure from a string.

Parameter list:

  • uuri: pointer to an uuri structure
  • str: the string to parse

The return value is an error code

bool uuri_is_null(struct uuri uuri)  

This function is declared in upipe/uuri.h source file, line 260.

This function checks if an uri is null.

Parameter list:

  • uuri: an uuri structure

The return value is true if uri is null

int uuri_len(const struct uuri *uuri, size_t *len_p)  

This function is declared in upipe/uuri.h source file, line 270.

This function gets the length required to print uri.

Parameter list:

  • uuri: pointer to an uuri structure
  • len_p: pointer to the length

The return value is an error code

struct uuri uuri_null(void )  

This function is declared in upipe/uuri.h source file, line 244.

This function returns an initialized uuri.

The return value is an initialized uuri structure

struct uuri uuri_parse(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 294.

This function parses and shifts an uri.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an uuri structure with the uri portion of str

struct uuri_authority uuri_parse_authority(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 220.

This function parses and shifts an authority.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an authority structure with the authority portion of str

struct ustring uuri_parse_fragment(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 120.

This function parses and shifts a fragment.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an ustring with the fragment portion of str

struct ustring uuri_parse_host(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 85.

This function parses and shifts an authority host.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an ustring with the host portion of str

struct ustring uuri_parse_ipv4(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 48.

This function parses an IPv4 and shifts ustring str. (ex: 192.168.0.1)

Parameter list:

  • str: the ustring to parse

The return value is the parsed IPv4 or a null ustring

struct ustring uuri_parse_ipv6(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 56.

This function parses an IPv6 and shifts ustring str. (ex: FE80:0000:0000:0000:0202:B3FF:FE1E:8329)

Parameter list:

  • str: the ustring to parse

The return value is the parsed IPv6 or a null ustring

struct ustring uuri_parse_ipv6_scoped(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 64.

This function parses a scoped IPv6 and shifts ustring str. (ex: FE80:0000:0000:0000:0202:B3FF:FE1E:8329%25eth0)

Parameter list:

  • str: the ustring to parse

The return value is the parsed IPv6 or a null ustring

struct ustring uuri_parse_ipvfuture(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 71.

This function parses a future ip and shifts ustring str.

Parameter list:

  • str: the ustring to parse

The return value is the parsed IPv6 or a null ustring

struct ustring uuri_parse_path(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 106.

This function parses and shifts a path.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an ustring with the path portion of str

struct ustring uuri_parse_port(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 92.

This function parses and shifts an authority port.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an ustring with the port portion of str

struct ustring uuri_parse_query(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 113.

This function parses and shifts a query.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an ustring with the query portion of str

struct ustring uuri_parse_scheme(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 99.

This function parses and shifts a scheme.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an ustring with the scheme portion of str

struct ustring uuri_parse_userinfo(struct ustring *str)  

This function is declared in upipe/uuri.h source file, line 78.

This function parses and shifts an authority user info.

Parameter list:

  • str: pointer to an ustring to parse and shift

The return value is an ustring with the user info portion of str

int uuri_to_buffer(struct uuri *uuri, char *buffer, size_t len)  

This function is declared in upipe/uuri.h source file, line 279.

This function prints the uri into a buffer.

Parameter list:

  • uuri: pointer to an uuri structure
  • buffer: pointer to buffer
  • len: size of the buffer

The return value is an error code

int uuri_to_str(struct uuri *uuri, char **str_p)  

This function is declared in upipe/uuri.h source file, line 287.

This function allocates a string from an uri.

Parameter list:

  • uuri: pointer to an uuri structure
  • str_p: a pointer to the allocated string

The return value is an error code

ssize_t uuri_unescape(const char *str, char *buffer, size_t size)  

This function is declared in upipe/uuri.h source file, line 148.

This function unescapes a string into buffer.

Parameter list:

  • str: the string to unescape
  • buffer: the destination buffer
  • size: the size of the destination buffer

The return value is the size needed to unescape or a negative value on error

ssize_t uuri_unescape_len(const char *str)  

This function is declared in upipe/uuri.h source file, line 156.

This function returns the size needed to unescape string.

Parameter list:

  • str: the string to unescape

The return value is the size needed to unescape or a negative value on error

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:20 2018 using MkDoc