From 05ea9fdadeeb3973998e4c00f5de4834dc2432d3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 10 Feb 2011 22:22:27 +0000 Subject: Add base parameter to serd_node_new_uri and add serd_node_new_uri_from_node. git-svn-id: http://svn.drobilla.net/serd/trunk@97 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- serd/serd.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'serd/serd.h') diff --git a/serd/serd.h b/serd/serd.h index 25237371..7a7d0bb3 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -190,14 +190,28 @@ SERD_API SerdNode serd_node_copy(const SerdNode* node); +/** Create a new node by resolving @a uri_node into a new node and parsed URI. + * This is a basic wrapper of serd_node_new_uri which first parses @a uri_node. + * @param uri_node The URI node to parse, resolve, and serialise. + * @param base Base URI to resolve @a uri_node against (or NULL). + * @param out (Output) 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_from_node(const SerdNode* uri_node, + const SerdURI* base, + SerdURI* out); + /** Create a new node by serialising @a uri into a new string. * @param uri The URI to parse and serialise. + * @param base Base URI to resolve @a uri against (or NULL for no resolution). * @param out (Output) 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* uri, SerdURI* out); +serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out); /** Free any data owned by @a node. * Note that if @a node is itself dynamically allocated (which is not the case -- cgit v1.2.1