upscaledb  2.2.1
Data Structures | Typedefs | Functions
upscaledb Embedded Server

Data Structures

struct  ups_srv_config_t
 

Typedefs

typedef struct ups_srv_t ups_srv_t
 

Functions

ups_status_t ups_srv_init (ups_srv_config_t *config, ups_srv_t **srv)
 
ups_status_t ups_srv_add_env (ups_srv_t *srv, ups_env_t *env, const char *urlname)
 
ups_status_t ups_srv_remove_env (ups_srv_t *srv, ups_env_t *env)
 
void ups_srv_close (ups_srv_t *srv)
 

Detailed Description

Typedef Documentation

typedef struct ups_srv_t ups_srv_t

Definition at line 68 of file upscaledb_srv.h.

Function Documentation

ups_status_t ups_srv_add_env ( ups_srv_t srv,
ups_env_t env,
const char *  urlname 
)

Add a upscaledb Environment

This function adds a new upscaledb Environment to the server. The Environment has to be initialized properly by the caller. It will be served at ups://localhost:port/urlname, where port was specified for ups_srv_init and urlname is the third parameter to this function.

A client accessing this Environment will specify this URL as a filename, and upscaledb will transparently connect to this server.

Parameters
srvA valid ups_srv_t handle
envA valid upscaledb Environment handle
urlnameURL of this Environment
Returns
UPS_SUCCESS on success
UPS_LIMITS_REACHED if more than the max. number of Environments were added (default limit: 128)

Referenced by main().

void ups_srv_close ( ups_srv_t srv)

Referenced by main().

ups_status_t ups_srv_init ( ups_srv_config_t config,
ups_srv_t **  srv 
)

Initialize the server

This function initializes a ups_srv_t handle and starts the upscaledb database server on the port specified in the configuration object.

Parameters
configA configuration structure
srvA pointer to a ups_srv_t pointer; will be allocated if this function returns successfully
Returns
UPS_SUCCESS on success
UPS_OUT_OF_MEMORY if memory could not be allocated

Referenced by main().

ups_status_t ups_srv_remove_env ( ups_srv_t srv,
ups_env_t env 
)

Removes an upscaledb Environment

This function removes an upscaledb Environment from the server. It can then no longer be accessed by the clients.

Parameters
srvA valid ups_srv_t handle
envA valid upscaledb Environment handle
Returns
UPS_SUCCESS on success