LMMS
Loading...
Searching...
No Matches

Functions

SERD_API const uint8_t *SERD_NULLABLE serd_uri_to_path (const uint8_t *SERD_NONNULL uri)
SERD_API uint8_t *SERD_NULLABLE serd_file_uri_parse (const uint8_t *SERD_NONNULL uri, uint8_t *SERD_NONNULL *SERD_NULLABLE hostname)
SERD_PURE_API bool serd_uri_string_has_scheme (const uint8_t *SERD_NULLABLE utf8)
 Return true iff utf8 starts with a valid URI scheme.
SERD_API SerdStatus serd_uri_parse (const uint8_t *SERD_NONNULL utf8, SerdURI *SERD_NONNULL out)
 Parse utf8, writing result to out.
SERD_API void serd_uri_resolve (const SerdURI *SERD_NONNULL r, const SerdURI *SERD_NONNULL base, SerdURI *SERD_NONNULL t)
SERD_API size_t serd_uri_serialise (const SerdURI *SERD_NONNULL uri, SerdSink SERD_NONNULL sink, void *SERD_NONNULL stream)
 Serialise uri with a series of calls to sink.
SERD_API size_t serd_uri_serialise_relative (const SerdURI *SERD_NONNULL uri, const SerdURI *SERD_NULLABLE base, const SerdURI *SERD_NULLABLE root, SerdSink SERD_NONNULL sink, void *SERD_NONNULL stream)

Variables

static const SerdURI SERD_URI_NULL

Detailed Description

Function Documentation

◆ serd_file_uri_parse()

Get the unescaped path and hostname from a file URI.

The returned path and *hostname must be freed with serd_free().

Parameters
uriA file URI.
hostnameIf non-NULL, set to the hostname, if present.
Returns
The path component of the URI.

◆ serd_uri_parse()

Parse utf8, writing result to out.

◆ serd_uri_resolve()

Set target t to reference r resolved against base.

See also
RFC3986 5.2.2

◆ serd_uri_serialise()

SERD_API size_t serd_uri_serialise ( const SerdURI *SERD_NONNULL uri,
SerdSink SERD_NONNULL sink,
void *SERD_NONNULL stream )

Serialise uri with a series of calls to sink.

◆ serd_uri_serialise_relative()

SERD_API size_t serd_uri_serialise_relative ( const SerdURI *SERD_NONNULL uri,
const SerdURI *SERD_NULLABLE base,
const SerdURI *SERD_NULLABLE root,
SerdSink SERD_NONNULL sink,
void *SERD_NONNULL stream )

Serialise uri relative to base with a series of calls to sink

The uri is written as a relative URI iff if it a child of base and root. The optional root parameter must be a prefix of base and can be used keep up-references ("../") within a certain namespace.

◆ serd_uri_string_has_scheme()

SERD_PURE_API bool serd_uri_string_has_scheme ( const uint8_t *SERD_NULLABLE utf8)

Return true iff utf8 starts with a valid URI scheme.

◆ serd_uri_to_path()

Return the local path for uri, or NULL if uri is not a file URI. Note this (inappropriately named) function only removes the file scheme if necessary, and returns uri unmodified if it is an absolute path. Percent encoding and other issues are not handled, to properly convert a file URI to a path, use serd_file_uri_parse().

Variable Documentation

◆ SERD_URI_NULL

const SerdURI SERD_URI_NULL
static
Initial value:
=
{{NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}}
#define NULL
Definition CarlaBridgeFormat.cpp:30