diff options
author | David Robillard <d@drobilla.net> | 2018-06-13 21:32:11 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-12-31 11:37:48 -0500 |
commit | feb16bc18d586080e979845374f053075e6bb7ed (patch) | |
tree | b4e87632c7689798635ae37a9bd097987a7019dd /src/env.h | |
parent | b6197eb59799c2933bd776ea22760fea5e97b4bd (diff) | |
download | serd-feb16bc18d586080e979845374f053075e6bb7ed.tar.gz serd-feb16bc18d586080e979845374f053075e6bb7ed.tar.bz2 serd-feb16bc18d586080e979845374f053075e6bb7ed.zip |
Simplify SerdEnv API
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -19,6 +19,28 @@ #include "serd/serd.h" -const SerdURI* serd_env_get_parsed_base_uri(const SerdEnv* env); +/** + Qualify `uri` into a CURIE if possible. +*/ +bool +serd_env_qualify_in_place(const SerdEnv* env, + const SerdNode* uri, + const SerdNode** prefix, + SerdSlice* 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`. +*/ +SerdStatus +serd_env_expand_in_place(const SerdEnv* env, + const SerdNode* curie, + SerdSlice* uri_prefix, + SerdSlice* uri_suffix); + +const SerdURI* +serd_env_get_parsed_base_uri(const SerdEnv* env); -#endif // SERD_ENV_H +#endif // SERD_ENV_H |