From 1ce0154639ea329d0a085713e8e21b85aa8526d0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 15 Jul 2022 11:25:21 -0400 Subject: Simplify SerdEnv API --- src/env.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/env.h') diff --git a/src/env.h b/src/env.h index ed3fbfd9..934b9879 100644 --- a/src/env.h +++ b/src/env.h @@ -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 + +/// 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); -- cgit v1.2.1