123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /** @file environment.h
- *
- * @brief Handle LSUP environment initialization and teardown.
- *
- * #VOLK_init() should be called before performing any other interaction with
- * this library.
- *
- * #VOLK_done() is called automatically on program exit (`atexit`).
- */
- #ifndef _VOLK_ENVIRONMENT_H
- #define _VOLK_ENVIRONMENT_H
- #include "volksdata/term.h"
- /**@defgroup environment Environment module
- * @ingroup public
- * @{
- */
- /*
- * External variables.
- */
- /** @brief Default context.
- *
- * The actual default context IRI used throughout the application may use a
- * value from the `VOLK_DEFAULT_CTX_URI` environment variable.
- */
- #define DEFAULT_CTX_LABEL VOLK_NS "default"
- /// Default context.
- extern VOLK_Term *VOLK_default_ctx;
- /// Serialized default context.
- extern VOLK_Buffer *VOLK_default_ctx_buf;
- /** @brief Initialize the default environment.
- *
- * This must be called before using the library.
- *
- * The default environment is cleaned up automatically on exit.
- *
- * This environment should suit most cases, unless an application needs to use
- * multiple environments and call #VOLK_init with specific handles. Such
- * other environment(s) must be freed up manually with #VOLK_done().
- */
- VOLK_rc
- VOLK_init (void);
- /** @brief Close the default environment.
- *
- * This is called by atexit(). If called before then, subsequent calls have
- * no effect.
- */
- void
- VOLK_done (void);
- /** TODO
- */
- VOLK_rc
- VOLK_env_put_id (const uint32_t key, const char *data);
- /** TODO
- */
- const char *
- VOLK_env_get_id (const uint32_t key);
- /// @} END defgroup environment
- #endif /* _VOLK_ENVIRONMENT_H */
|