diff options
author | David Robillard <d@drobilla.net> | 2018-06-13 21:32:11 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:58 +0100 |
commit | 9baa0127ea016c3ee409a64563b960cff135bbdb (patch) | |
tree | 6e06baf34fe52cdd02eaae3ee31c8f90eb0ef483 /serd | |
parent | bcd9ce4800688e3b53cc198d26e2e44627a2ec7a (diff) | |
download | serd-9baa0127ea016c3ee409a64563b960cff135bbdb.tar.gz serd-9baa0127ea016c3ee409a64563b960cff135bbdb.tar.bz2 serd-9baa0127ea016c3ee409a64563b960cff135bbdb.zip |
Simplify SerdEnv API
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/serd/serd.h b/serd/serd.h index 2ca024f3..be3ea586 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -918,17 +918,14 @@ serd_env_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. @@ -941,26 +938,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. @@ -969,8 +952,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`. |