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>2018-11-25 22:12:47 +0100
commitcdbd9de9d8d336b0c5f867b3d6e99788518ad7e8 (patch)
tree7e2dd7650dd6c0b01f63481d5e637e1d37d6609a /src/env.h
parentafab9f8037f9281bcef6ee4201061aa234eeadac (diff)
downloadserd-cdbd9de9d8d336b0c5f867b3d6e99788518ad7e8.tar.gz
serd-cdbd9de9d8d336b0c5f867b3d6e99788518ad7e8.tar.bz2
serd-cdbd9de9d8d336b0c5f867b3d6e99788518ad7e8.zip
Simplify SerdEnv API
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/env.h b/src/env.h
index ecb6cc15..0b15fbc2 100644
--- a/src/env.h
+++ b/src/env.h
@@ -19,6 +19,28 @@
#include "serd/serd.h"
-const SerdURI* serd_env_get_parsed_base_uri(const SerdEnv* env);
+/**
+ Qualify `uri` into a CURIE if possible.
+*/
+bool
+serd_env_qualify_in_place(const SerdEnv* env,
+ const SerdNode* uri,
+ const SerdNode** prefix,
+ SerdSlice* 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,
+ SerdSlice* uri_prefix,
+ SerdSlice* uri_suffix);
+
+const SerdURI*
+serd_env_get_parsed_base_uri(const SerdEnv* env);
-#endif // SERD_ENV_H
+#endif // SERD_ENV_H