Next: Bindings, Previous: Server functionality, Up: Server functions [Contents][Index]
These functions provide an interface for configuring a server. They are used to create and modify the default configuration of a server type in order to create a server configuration.
Instantiate a configurable type. The type argument specifies the configurable type name, name the name of the type (in the domain of the configurable type) and instance the instance name of the type. Return zero on success, otherwise -1.
Release the configuration cfg of the given configuration
prototype prototype. If cfg is NULL
, do nothing.
Create a collection of type, given the count
items of data. Valid values of type are one of:
SVZ_INTARRAY
, SVZ_STRARRAY
, SVZ_STRHASH
.
For a string hash, data should be alternating keys and values;
the returned hash table will have count / 2
elements.
The C type of data for an int array should be int[]
,
and for string array or hash it should be char*[]
.
On error (either bad type or odd count for string hash),
return NULL
.
Here are some convenience macros for svz_collect
:
Return an integer array svz_array_t *
created from int cvar[]
.
Return a string array svz_array_t *
created from char *cvar[]
.
Return a string hash svz_hash_t *
created from char *cvar[]
.
Next: Bindings, Previous: Server functionality, Up: Server functions [Contents][Index]