|
LMMS
|
Variables | |
| static const SerdNode | SERD_NODE_NULL = {NULL, 0, 0, 0, SERD_NOTHING} |
| SERD_API SerdNode serd_node_copy | ( | const SerdNode *SERD_NULLABLE | node | ) |
Make a deep copy of node.
| SERD_PURE_API bool serd_node_equals | ( | const SerdNode *SERD_NONNULL | a, |
| const SerdNode *SERD_NONNULL | b ) |
| SERD_API void serd_node_free | ( | SerdNode *SERD_NULLABLE | node | ) |
Free any data owned by node.
Note that if node is itself dynamically allocated (which is not the case for nodes created internally by serd), it will not be freed.
Make a (shallow) node from str.
This measures, but does not copy, str. No memory is allocated.
| SERD_API SerdNode serd_node_from_substring | ( | SerdType | type, |
| const uint8_t *SERD_NULLABLE | str, | ||
| size_t | len ) |
Make a (shallow) node from a prefix of str.
This measures, but does not copy, str. No memory is allocated. Note that the returned node may not be null terminated.
| SERD_API SerdNode serd_node_new_blob | ( | const void *SERD_NONNULL | buf, |
| size_t | size, | ||
| bool | wrap_lines ) |
Create a node by serialising buf into an xsd:base64Binary string
This function can be used to make a serialisable node out of arbitrary binary data, which can be decoded using serd_base64_decode().
| buf | Raw binary input data. |
| size | Size of buf. |
| wrap_lines | Wrap lines at 76 characters to conform to RFC 2045. |
Create a new node by serialising d into an xsd:decimal string
The resulting node will always contain a .', start with a digit, and end with a digit (i.e. will have a leading and/or trailing 0' if necessary). It will never be in scientific notation. A maximum of frac_digits digits will be written after the decimal point, but trailing zeros will automatically be omitted (except one if d is a round integer).
Note that about 16 and 8 fractional digits are required to precisely represent a double and float, respectively.
| d | The value for the new node. |
| frac_digits | The maximum number of digits after the decimal place. |
| SERD_API SerdNode serd_node_new_file_uri | ( | const uint8_t *SERD_NONNULL | path, |
| const uint8_t *SERD_NULLABLE | hostname, | ||
| SerdURI *SERD_NULLABLE | out, | ||
| bool | escape ) |
Create a new file URI node from a file system path and optional hostname.
Backslashes in Windows paths will be converted and '' will always be percent encoded. If escape is true, all other invalid characters will be percent encoded as well.
If path is relative, hostname is ignored. If out is not NULL, it will be set to the parsed URI.
Create a new node by serialising i into an xsd:integer string.
| SERD_API SerdNode serd_node_new_relative_uri | ( | const SerdURI *SERD_NONNULL | uri, |
| const SerdURI *SERD_NULLABLE | base, | ||
| const SerdURI *SERD_NULLABLE | root, | ||
| SerdURI *SERD_NULLABLE | out ) |
Create a new node by serialising uri into a new relative URI.
| uri | The URI to serialise. |
| base | Base URI to make uri relative to, if possible. |
| root | Root URI for resolution (see serd_uri_serialise_relative()). |
| out | Set to the parsing of the new URI (i.e. points only to memory owned by the new returned node). |
| SERD_API SerdNode serd_node_new_uri | ( | const SerdURI *SERD_NONNULL | uri, |
| const SerdURI *SERD_NULLABLE | base, | ||
| SerdURI *SERD_NULLABLE | out ) |
| SERD_API SerdNode serd_node_new_uri_from_node | ( | const SerdNode *SERD_NONNULL | uri_node, |
| const SerdURI *SERD_NULLABLE | base, | ||
| SerdURI *SERD_NULLABLE | out ) |
Simple wrapper for serd_node_new_uri() to resolve a URI node.
| SERD_API SerdNode serd_node_new_uri_from_string | ( | const uint8_t *SERD_NULLABLE | str, |
| const SerdURI *SERD_NULLABLE | base, | ||
| SerdURI *SERD_NULLABLE | out ) |
Simple wrapper for serd_node_new_uri() to resolve a URI string.
|
static |