aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/node.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-29 07:28:19 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commitfff826f406e0b9975fd8672041e50dd1a342339f (patch)
tree03a22b89b83a8b26fdf18dd8700e51833b488d81 /include/serd/node.h
parent94d3433dcf0e77d2c867c9a2dd6928acfea4184c (diff)
downloadserd-fff826f406e0b9975fd8672041e50dd1a342339f.tar.gz
serd-fff826f406e0b9975fd8672041e50dd1a342339f.tar.bz2
serd-fff826f406e0b9975fd8672041e50dd1a342339f.zip
Simplify URI API and implementation
Diffstat (limited to 'include/serd/node.h')
-rw-r--r--include/serd/node.h43
1 files changed, 3 insertions, 40 deletions
diff --git a/include/serd/node.h b/include/serd/node.h
index 1c64b6b9..b95891c9 100644
--- a/include/serd/node.h
+++ b/include/serd/node.h
@@ -112,20 +112,16 @@ serd_new_substring(SerdNodeType type,
size_t len);
/**
- Create a new URI node from a node.
+ Create a new URI node from a parsed URI.
*/
SERD_API SerdNode* SERD_ALLOCATED
-serd_new_uri_from_node(const SerdNode* SERD_NONNULL uri_node,
- const SerdURIView* SERD_NULLABLE base,
- SerdURIView* SERD_NULLABLE out);
+serd_new_parsed_uri(SerdURIView uri);
/**
Create a new URI node from a string.
*/
SERD_API SerdNode* SERD_ALLOCATED
-serd_new_uri_from_string(const char* SERD_NULLABLE str,
- const SerdURIView* SERD_NULLABLE base,
- SerdURIView* SERD_NULLABLE out);
+serd_new_uri(const char* SERD_NONNULL str);
/**
Create a new file URI node from a file system path and optional hostname.
@@ -142,39 +138,6 @@ serd_new_file_uri(const char* SERD_NONNULL path,
SerdURIView* SERD_NULLABLE out);
/**
- Create a new node by serialising `uri` into a new string.
-
- @param uri The URI to serialise.
-
- @param base Base URI to resolve `uri` against (or NULL for no resolution).
-
- @param 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_ALLOCATED
-serd_new_uri(const SerdURIView* SERD_NONNULL uri,
- const SerdURIView* SERD_NULLABLE base,
- SerdURIView* SERD_NULLABLE out);
-
-/**
- Create a new node by serialising `uri` into a new relative URI.
-
- @param uri The URI to serialise.
-
- @param base Base URI to make `uri` relative to, if possible.
-
- @param root Root URI for resolution (see serd_uri_serialise_relative()).
-
- @param 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_ALLOCATED
-serd_new_relative_uri(const SerdURIView* SERD_NONNULL uri,
- const SerdURIView* SERD_NULLABLE base,
- const SerdURIView* SERD_NULLABLE root,
- SerdURIView* SERD_NULLABLE out);
-
-/**
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