aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-03-02 11:09:33 -0500
committerDavid Robillard <d@drobilla.net>2022-01-13 23:04:04 -0500
commitaca4640882aab7da0193ee2f5767ecd6d9506b0c (patch)
treebffe2871b838e6db98838e82cc5ff01d1661922f /src/env.h
parent9b344f6425657b2a077c3948289199155f490ff9 (diff)
downloadserd-aca4640882aab7da0193ee2f5767ecd6d9506b0c.tar.gz
serd-aca4640882aab7da0193ee2f5767ecd6d9506b0c.tar.bz2
serd-aca4640882aab7da0193ee2f5767ecd6d9506b0c.zip
Simplify SerdEnv API
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h
index 1c36b4ee..50ae82eb 100644
--- a/src/env.h
+++ b/src/env.h
@@ -19,6 +19,27 @@
#include "serd/serd.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_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);
+
SERD_CONST_FUNC
SerdURIView
serd_env_base_uri_view(const SerdEnv* env);