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 /src/env.h | |
parent | 2402d960c54981abb34a79982ecd61a00f798901 (diff) | |
download | serd-37251f892794e7accbabbe8a2816ad71191e2174.tar.gz serd-37251f892794e7accbabbe8a2816ad71191e2174.tar.bz2 serd-37251f892794e7accbabbe8a2816ad71191e2174.zip |
Simplify SerdEnv API
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 28 |
1 files changed, 26 insertions, 2 deletions
@@ -19,6 +19,30 @@ #include "serd/serd.h" -const SerdURI* serd_env_get_parsed_base_uri(const SerdEnv* env); +#include <stdbool.h> -#endif // SERD_ENV_H +/** + Qualify `uri` into a CURIE if possible. +*/ +bool +serd_env_qualify_in_place(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`. +*/ +SerdStatus +serd_env_expand_in_place(const SerdEnv* env, + const SerdNode* curie, + SerdStringView* uri_prefix, + SerdStringView* uri_suffix); + +const SerdURI* +serd_env_get_parsed_base_uri(const SerdEnv* env); + +#endif // SERD_ENV_H |