Main Page | Modules | Data Structures | File List | Data Fields

Configuration Data
[State Utility Library]


Data Structures

struct  sul_cfg_visitor_t

Typedefs

typedef sul_cfg_block_t sul_cfg_block_t
typedef enum sul_cfg_vorder_e sul_cfg_vorder_e
typedef sul_error_t *(* sul_cfg_visitor_fn_t )(sul_cfg_block_t *config, long flags, void *param, apr_pool_t *pool)
typedef sul_cfg_visitor_t sul_cfg_visitor_t

Enumerations

enum  sul_cfg_vorder_e { SUL_CVO_BEFORE = 0x1 << 0, SUL_CVO_AFTER = 0x1 << 1 }

Functions

 sul_configuration_create (sul_cfg_block_t **cfg, xmlDocPtr doc, apr_pool_t *pool)
 sul_configuration_wrap (sul_cfg_block_t **cfg, sul_cfg_block_t *orig, apr_pool_t *pool)
 sul_configuration_load (sul_cfg_block_t **cfg, const char *path, apr_pool_t *pool)
 sul_configuration_parse (sul_cfg_block_t **cfg, const char *str, apr_pool_t *pool)
 sul_configuration_read_vars (sul_cfg_block_t *cfg, const char *path, apr_pool_t *pool)
 sul_cfg_next (const sul_cfg_block_t *cfg)
 sul_cfg_get_blocks (const sul_cfg_block_t *cfg, const char *path, apr_pool_t *pool)
 sul_cfg_get_string (const sul_cfg_block_t *cfg, const char *path, sul_boolean_t vars, const char *def, apr_pool_t *pool)
 sul_cfg_get_string_insides (const sul_cfg_block_t *cfg, const char *path, sul_boolean_t vars, const char *def, apr_pool_t *pool)
 sul_cfg_get_integer (const sul_cfg_block_t *cfg, const char *path, sul_boolean_t vars, apr_int32_t def, apr_pool_t *pool)
 sul_cfg_get_uinteger (const sul_cfg_block_t *cfg, const char *path, sul_boolean_t vars, apr_uint32_t def, apr_pool_t *pool)
 sul_cfg_get_double (const sul_cfg_block_t *cfg, const char *path, sul_boolean_t vars, double def, apr_pool_t *pool)
 sul_cfg_get_boolean (const sul_cfg_block_t *cfg, const char *path, sul_boolean_t vars, sul_boolean_t def, apr_pool_t *pool)
 sul_cfg_name_get (const sul_cfg_block_t *cfg)
 sul_cfg_interpolate (const sul_cfg_block_t *cfg, const char *src, apr_pool_t *pool)
 sul_cfg_rdlock (sul_cfg_block_t *cfg)
 sul_cfg_wrlock (sul_cfg_block_t *cfg)
 sul_cfg_unlock (sul_cfg_block_t *cfg)
 sul_cfg_to_string (sul_cfg_block_t *cfg, char **str, apr_size_t *sz, apr_pool_t *pool)
 sul_cfg_vars_set (sul_cfg_block_t *cfg, const char *key, const char *val)
 sul_cfg_vars_get (sul_cfg_block_t *cfg, const char *key)
 sul_cfg_apply_visitors (sul_cfg_block_t *cfg, sul_cfg_visitor_t *visitors, apr_pool_t *pool)
 sul_cfg_apply_children (sul_cfg_block_t *cfg, sul_cfg_visitor_t *visitors, apr_pool_t *pool)

Typedef Documentation

typedef struct sul_cfg_block_t sul_cfg_block_t
 

Configuration block, there is one of these at the top of the Configuration and ever sub node is one of these. They provide handy reference points to determine other options from.


Function Documentation

sul_cfg_get_blocks const sul_cfg_block_t cfg,
const char *  path,
apr_pool_t *  pool
 

Executes the given Xpath query and returns a linked list of the configuration blocks that the query returns.

Parameters:
cfg A configuration block.
path XPath query to execute that will return the wanted blocks.
pool Pool to allocate overhead from.
Returns:
A configuration block for the given path.

sul_cfg_get_boolean const sul_cfg_block_t cfg,
const char *  path,
sul_boolean_t  vars,
sul_boolean_t  def,
apr_pool_t *  pool
 

Retrieves a configuration property located at the given key as a boolean value.

Parameters:
cfg Configuration block to retrieve the key from.
path Path to the configuration key to get.
vars TRUE if variable interpolation should be done on the resulting string. If this is FALSE then $Key will yield $Key, instead of being replaced with Key's value.
def The default value of the configuration key.
Returns:
The string value of the configuration key they requested to def if the path was missing.

sul_cfg_get_double const sul_cfg_block_t cfg,
const char *  path,
sul_boolean_t  vars,
double  def,
apr_pool_t *  pool
 

Retrieves a configuration property located at the given key as a double value.

Parameters:
cfg Configuration block to retrieve the key from.
path Path to the configuration key to get.
vars TRUE if variable interpolation should be done on the resulting string. If this is FALSE then $Key will yield $Key, instead of being replaced with Key's value.
def The default value of the configuration key.
Returns:
The string value of the configuration key they requested to def if the path was missing.

sul_cfg_get_integer const sul_cfg_block_t cfg,
const char *  path,
sul_boolean_t  vars,
apr_int32_t  def,
apr_pool_t *  pool
 

Retrieves a configuration property located at the given key as a integer value.

Parameters:
cfg Configuration block to retrieve the key from.
path Path to the configuration key to get.
vars TRUE if variable interpolation should be done on the resulting string. If this is FALSE then $Key will yield $Key, instead of being replaced with Key's value.
def The default value of the configuration key.
Returns:
The string value of the configuration key they requested to def if the path was missing.

sul_cfg_get_string const sul_cfg_block_t cfg,
const char *  path,
sul_boolean_t  vars,
const char *  def,
apr_pool_t *  pool
 

Retrieves a configuration property located at the given key as a string value.

Parameters:
cfg Configuration block to retrieve the key from.
path Path to the configuration key to get.
vars TRUE if variable interpolation should be done on the resulting string. If this is FALSE then $Key will yield $Key, instead of being replaced with Key's value.
def The default value of the configuration key.
Returns:
The string value of the configuration key they requested to def if the path was missing.

sul_cfg_get_string_insides const sul_cfg_block_t cfg,
const char *  path,
sul_boolean_t  vars,
const char *  def,
apr_pool_t *  pool
 

Retrieves a configuration property located at the given key as a string value.

Parameters:
cfg Configuration block to retrieve the key from.
path Path to the configuration key to get.
vars TRUE if variable interpolation should be done on the resulting string. If this is FALSE then $Key will yield $Key, instead of being replaced with Key's value.
def The default value of the configuration key.
Returns:
The string value of the configuration key they requested to def if the path was missing.

sul_cfg_get_uinteger const sul_cfg_block_t cfg,
const char *  path,
sul_boolean_t  vars,
apr_uint32_t  def,
apr_pool_t *  pool
 

Retrieves a configuration property located at the given key as a integer value.

Parameters:
cfg Configuration block to retrieve the key from.
path Path to the configuration key to get.
vars TRUE if variable interpolation should be done on the resulting string. If this is FALSE then $Key will yield $Key, instead of being replaced with Key's value.
def The default value of the configuration key.
Returns:
The string value of the configuration key they requested to def if the path was missing.

sul_cfg_interpolate const sul_cfg_block_t cfg,
const char *  src,
apr_pool_t *  pool
 

Interpolate a string using variables defined from the Configuration.

Parameters:
cfg Configuration block.
src Source string to be interpolated.
pool Pool to allocate overhead from, including the new string.
Returns:
New, interpolated string.

sul_cfg_name_get const sul_cfg_block_t cfg  ) 
 

Gets the name of the given configuration block, AKA, the tag name.

Parameters:
cfg Configuration block.
Returns:
The name of the top level configuration block given.

sul_cfg_next const sul_cfg_block_t cfg  ) 
 

Gets the next configuration block in a linked list of them. Linked lists of configuration blocks are returned by the sul_cfg_get_blocks call, as an example and are the results of XPath queries.

Returns:
Next configuration block.

sul_cfg_rdlock sul_cfg_block_t cfg  ) 
 

Obtains a read lock on a configuration.

Parameters:
cfg A configuration block.
Returns:
An sul_error_t instance if an error occured and NULL otherwise.

sul_cfg_to_string sul_cfg_block_t cfg,
char **  str,
apr_size_t *  sz,
apr_pool_t *  pool
 

Converts a configuration to a string.

Parameters:
cfg Configuration block to be converted.
str String to return the results into.
sz Resulting size of the string.
pool Pool to allocate memory overhead from.

sul_cfg_unlock sul_cfg_block_t cfg  ) 
 

Unlocks the configuration block, freeing any read and write locks.

Parameters:
cfg A configuration block.
Returns:
An sul_error_t instance if an error occured and NULL otherwise.

sul_cfg_vars_get sul_cfg_block_t cfg,
const char *  key
 

Gets a configuration variable that can be used in interpolated values.

Parameters:
cfg A configuration block.
key Key value of the variable to get.
Returns:

sul_cfg_vars_set sul_cfg_block_t cfg,
const char *  key,
const char *  val
 

Sets a configuration variable that can be used in interpolated values.

Parameters:
cfg A configuration block.
key Key to assign the value to.
val Value to be assigned to the configuration variable.

sul_cfg_wrlock sul_cfg_block_t cfg  ) 
 

Obtains a write lock on a configuration.

Parameters:
cfg A configuration block.
Returns:
An sul_error_t instance if an error occured and NULL otherwise.

sul_configuration_create sul_cfg_block_t **  cfg,
xmlDocPtr  doc,
apr_pool_t *  pool
 

Create a new Configuration block from an existing XML document pointer.

Parameters:
cfg 
doc 
pool 
Returns:
An sul_error_t instance if an error occured and NULL otherwise.

sul_configuration_load sul_cfg_block_t **  cfg,
const char *  path,
apr_pool_t *  pool
 

Loads the daemon's configuration file.

Parameters:
cfg Pointer to receive the configuration information.
path Path to the configuration file to load.
pool Pool to allocate from.
Returns:
An sul_error_t instance if an error occured and NULL otherwise.

sul_configuration_parse sul_cfg_block_t **  cfg,
const char *  str,
apr_pool_t *  pool
 

Parases a configuration from a string.

Parameters:
cfg A configuration.
str String to be parsed.
pool Pool to allocate memory overhead from.
Returns:
An sul_error_t instance if an error occured and NULL otherwise.

sul_configuration_read_vars sul_cfg_block_t cfg,
const char *  path,
apr_pool_t *  pool
 

Read variables from a specified path int he configuration.

Parameters:
cfg A configuration.
path Xpath to the variables.
pool Pool to allocate memory overhead from.
Returns:
An sul_error_t instance if an error occured and NULL otherwise.

sul_configuration_wrap sul_cfg_block_t **  cfg,
sul_cfg_block_t orig,
apr_pool_t *  pool
 

Create a new Configuration block from an existing configuration.

Parameters:
cfg 
doc 
pool 
Returns:
An sul_error_t instance if an error occured and NULL otherwise.


Generated on Wed Apr 28 09:38:38 2004 for State by doxygen 1.3.5