diff options
Diffstat (limited to 'include/serd/env.h')
-rw-r--r-- | include/serd/env.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/include/serd/env.h b/include/serd/env.h index 7a03e80d..db2c1150 100644 --- a/include/serd/env.h +++ b/include/serd/env.h @@ -9,7 +9,6 @@ #include "serd/sink.h" #include "serd/status.h" #include "serd/string_view.h" -#include "serd/uri.h" #include <stdbool.h> @@ -26,21 +25,19 @@ typedef struct SerdEnvImpl SerdEnv; /// Create a new environment SERD_API SerdEnv* SERD_ALLOCATED -serd_env_new(const SerdNode* SERD_NULLABLE base_uri); +serd_env_new(SerdStringView base_uri); /// Free `env` SERD_API void serd_env_free(SerdEnv* SERD_NULLABLE env); /// Get the current base URI -SERD_API const SerdNode* SERD_NULLABLE -serd_env_base_uri(const SerdEnv* SERD_NONNULL env, - SerdURIView* SERD_NULLABLE out); +SERD_PURE_API const SerdNode* SERD_NULLABLE +serd_env_base_uri(const SerdEnv* SERD_NULLABLE env); /// Set the current base URI SERD_API SerdStatus -serd_env_set_base_uri(SerdEnv* SERD_NONNULL env, - const SerdNode* SERD_NULLABLE uri); +serd_env_set_base_uri(SerdEnv* SERD_NONNULL env, SerdStringView uri); /** Set a namespace prefix. @@ -50,15 +47,9 @@ serd_env_set_base_uri(SerdEnv* SERD_NONNULL env, expand to "http://www.w3.org/2001/XMLSchema#decimal". */ SERD_API SerdStatus -serd_env_set_prefix(SerdEnv* SERD_NONNULL env, - const SerdNode* SERD_NONNULL name, - const SerdNode* SERD_NONNULL uri); - -/// Set a namespace prefix -SERD_API SerdStatus -serd_env_set_prefix_from_strings(SerdEnv* SERD_NONNULL env, - const char* SERD_NONNULL name, - const char* SERD_NONNULL uri); +serd_env_set_prefix(SerdEnv* SERD_NONNULL env, + SerdStringView name, + SerdStringView uri); /// Qualify `uri` into a CURIE if possible SERD_API bool |