[][src]Module sequoia_ffi::core

Contexts and errors.

Sequoia tries to be useful for a wide variety of applications. Therefore, we need you to provide a little information about the context you are using Sequoia in.

Examples

A context with reasonable defaults can be created using sq_context_new:

#include <sequoia.h>

sq_context_t ctx;
ctx = sq_context_new (NULL);

/* Use Sequoia.  */

sq_context_free (ctx);

A context can be configured using the builder pattern with sq_context_configure:

#include <sequoia.h>

sq_config_t cfg;
sq_context_t ctx;

cfg = sq_context_configure ();
sq_config_network_policy (cfg, SQ_NETWORK_POLICY_OFFLINE);
ctx = sq_config_build (cfg, NULL);

/* Use Sequoia.  */

sq_context_free (ctx);

Functions

sq_config_build

Finalizes the configuration and return a Context.

sq_config_ephemeral

Makes this context ephemeral.

sq_config_home

Sets the directory containing shared state.

sq_config_ipc_policy

Sets the IPC policy.

sq_config_lib

Set the directory containing backend servers.

sq_config_network_policy

Sets the network policy.

sq_context_configure

Creates a Context that can be configured.

sq_context_ephemeral

Returns whether or not this is an ephemeral context.

sq_context_free

Frees a context.

sq_context_home

Returns the directory containing shared state.

sq_context_ipc_policy

Returns the IPC policy.

sq_context_last_error

Returns the last error.

sq_context_lib

Returns the directory containing backend servers.

sq_context_network_policy

Returns the network policy.

sq_context_new

Creates a Context with reasonable defaults.