aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-13 21:32:11 -0400
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:58 +0100
commit9baa0127ea016c3ee409a64563b960cff135bbdb (patch)
tree6e06baf34fe52cdd02eaae3ee31c8f90eb0ef483 /src/env.h
parentbcd9ce4800688e3b53cc198d26e2e44627a2ec7a (diff)
downloadserd-9baa0127ea016c3ee409a64563b960cff135bbdb.tar.gz
serd-9baa0127ea016c3ee409a64563b960cff135bbdb.tar.bz2
serd-9baa0127ea016c3ee409a64563b960cff135bbdb.zip
Simplify SerdEnv API
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/env.h b/src/env.h
index d1894613..32098570 100644
--- a/src/env.h
+++ b/src/env.h
@@ -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