diff options
author | David Robillard <d@drobilla.net> | 2018-06-13 21:32:11 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-13 19:15:32 +0200 |
commit | 37251f892794e7accbabbe8a2816ad71191e2174 (patch) | |
tree | ec65a6e7630e79acaf15de00f2fb223ada07d3ee /serd | |
parent | 2402d960c54981abb34a79982ecd61a00f798901 (diff) | |
download | serd-37251f892794e7accbabbe8a2816ad71191e2174.tar.gz serd-37251f892794e7accbabbe8a2816ad71191e2174.tar.bz2 serd-37251f892794e7accbabbe8a2816ad71191e2174.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 9e1c651e..14a82389 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -881,17 +881,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. @@ -904,26 +901,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. @@ -932,8 +915,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`. |