aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-13 21:32:11 -0400
committerDavid Robillard <d@drobilla.net>2019-12-19 20:55:24 -0500
commit148fd83672c219138499380664d5e0fe37605ea7 (patch)
tree867e62b598fcc849b5c798e4b2c6a83bf13d0e4e /serd
parentfeb8de751a7f23cbd96ad4760dea68344ea3d0d7 (diff)
downloadserd-148fd83672c219138499380664d5e0fe37605ea7.tar.gz
serd-148fd83672c219138499380664d5e0fe37605ea7.tar.bz2
serd-148fd83672c219138499380664d5e0fe37605ea7.zip
Simplify SerdEnv API
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 9b34dcbb..098fe6a0 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -920,17 +920,14 @@ serd_env_get_base_uri(const SerdEnv* env);
*/
SERD_API
SerdStatus
-serd_env_set_base_uri(SerdEnv* env,
- const SerdNode* uri);
+serd_env_set_base_uri(SerdEnv* env, const SerdNode* uri);
/**
Set a namespace prefix.
*/
SERD_API
SerdStatus
-serd_env_set_prefix(SerdEnv* env,
- const SerdNode* name,
- const SerdNode* uri);
+serd_env_set_prefix(SerdEnv* env, const SerdNode* name, const SerdNode* uri);
/**
Set a namespace prefix.
@@ -943,26 +940,12 @@ serd_env_set_prefix_from_strings(SerdEnv* env,
/**
Qualify `uri` into a CURIE if possible.
-*/
-SERD_API
-bool
-serd_env_qualify(const SerdEnv* env,
- const SerdNode* uri,
- const SerdNode** prefix,
- SerdStringView* suffix);
-/**
- Expand `curie`.
-
- Errors: SERD_ERR_BAD_ARG if `curie` is not valid, or SERD_ERR_BAD_CURIE if
- prefix is not defined in `env`.
+ Returns null if `node` can not be qualified.
*/
SERD_API
-SerdStatus
-serd_env_expand(const SerdEnv* env,
- const SerdNode* curie,
- SerdStringView* uri_prefix,
- SerdStringView* uri_suffix);
+SerdNode*
+serd_env_qualify(const SerdEnv* env, const SerdNode* uri);
/**
Expand `node`, which must be a CURIE or URI, to a full URI.
@@ -971,8 +954,7 @@ serd_env_expand(const SerdEnv* env,
*/
SERD_API
SerdNode*
-serd_env_expand_node(const SerdEnv* env,
- const SerdNode* node);
+serd_env_expand(const SerdEnv* env, const SerdNode* node);
/**
Call `func` for each prefix defined in `env`.