diff options
author | David Robillard <d@drobilla.net> | 2022-07-15 11:25:21 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | 1ce0154639ea329d0a085713e8e21b85aa8526d0 (patch) | |
tree | badc24e17cb45132edec317b84f9afdf385ed107 /src/env.h | |
parent | b7cce4a24dbc544129a9fabc44cb22025767f10b (diff) | |
download | serd-1ce0154639ea329d0a085713e8e21b85aa8526d0.tar.gz serd-1ce0154639ea329d0a085713e8e21b85aa8526d0.tar.bz2 serd-1ce0154639ea329d0a085713e8e21b85aa8526d0.zip |
Simplify SerdEnv API
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -6,8 +6,32 @@ #include "serd/attributes.h" #include "serd/env.h" +#include "serd/node.h" +#include "serd/status.h" +#include "serd/string_view.h" #include "serd/uri.h" +#include <stdbool.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_BAD_ARG if `curie` is not valid, or SERD_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); + SERD_PURE_FUNC SerdURIView serd_env_base_uri_view(const SerdEnv* env); |