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

/extra/work/state-dev/src/sul/sul_config.h

00001 /* ----------------------------------------------------------------------------
00002  * $Id: sul_config.h,v 1.13 2004/04/08 20:20:48 jlewalle Exp $
00003  *
00004  * --------------------------------------------------------------------------*/
00005 #if !defined(_INCLUDED_SUL_CONFIG_H_HEADER__)
00006 #define _INCLUDED_SUL_CONFIG_H_HEADER__
00007 
00019 typedef struct sul_cfg_block_t sul_cfg_block_t;
00020 
00029 SUL_DECLARE(sul_error_t *)
00030 sul_configuration_create(sul_cfg_block_t **cfg, xmlDocPtr doc, apr_pool_t *pool);
00031 
00040 SUL_DECLARE(sul_error_t *)
00041 sul_configuration_wrap(sul_cfg_block_t **cfg, sul_cfg_block_t *orig, 
00042                        apr_pool_t *pool);
00043 
00052 SUL_DECLARE(sul_error_t *)
00053 sul_configuration_load(sul_cfg_block_t **cfg, const char *path, apr_pool_t *pool);
00054 
00063 SUL_DECLARE(sul_error_t *)
00064 sul_configuration_parse(sul_cfg_block_t **cfg, const char *str, apr_pool_t *pool);
00065 
00074 SUL_DECLARE(sul_error_t *)
00075 sul_configuration_read_vars(sul_cfg_block_t *cfg, const char *path, 
00076                             apr_pool_t *pool);
00077 
00085 SUL_DECLARE(sul_cfg_block_t *)
00086 sul_cfg_next(const sul_cfg_block_t *cfg);
00087 
00097 SUL_DECLARE(sul_cfg_block_t *)
00098 sul_cfg_get_blocks(const sul_cfg_block_t *cfg, const char *path, apr_pool_t *pool);
00099 
00112 SUL_DECLARE(const char *)
00113 sul_cfg_get_string(const sul_cfg_block_t *cfg, const char *path,
00114                    sul_boolean_t vars, const char *def, apr_pool_t *pool);
00115 
00128 SUL_DECLARE(const char *)
00129 sul_cfg_get_string_insides(const sul_cfg_block_t *cfg, const char *path,
00130                            sul_boolean_t vars, const char *def, apr_pool_t *pool);
00131 
00144 SUL_DECLARE(apr_int32_t)
00145 sul_cfg_get_integer(const sul_cfg_block_t *cfg, const char *path,
00146                     sul_boolean_t vars, apr_int32_t def, apr_pool_t *pool);
00147 
00160 SUL_DECLARE(apr_uint32_t)
00161 sul_cfg_get_uinteger(const sul_cfg_block_t *cfg, const char *path,
00162                      sul_boolean_t vars, apr_uint32_t def, apr_pool_t *pool);
00163 
00176 SUL_DECLARE(double)
00177 sul_cfg_get_double(const sul_cfg_block_t *cfg, const char *path,
00178                    sul_boolean_t vars, double def, apr_pool_t *pool);
00179 
00192 SUL_DECLARE(sul_boolean_t)
00193 sul_cfg_get_boolean(const sul_cfg_block_t *cfg, const char *path,
00194                     sul_boolean_t vars, sul_boolean_t def, apr_pool_t *pool);
00195 
00202 SUL_DECLARE(const char *)
00203 sul_cfg_name_get(const sul_cfg_block_t *cfg);
00204 
00213 SUL_DECLARE(char *)
00214 sul_cfg_interpolate(const sul_cfg_block_t *cfg, const char *src, 
00215                     apr_pool_t *pool);
00216 
00223 SUL_DECLARE(sul_error_t *)
00224 sul_cfg_rdlock(sul_cfg_block_t *cfg);
00225 
00232 SUL_DECLARE(sul_error_t *)
00233 sul_cfg_wrlock(sul_cfg_block_t *cfg);
00234 
00241 SUL_DECLARE(sul_error_t *)
00242 sul_cfg_unlock(sul_cfg_block_t *cfg);
00243 
00252 SUL_DECLARE(void)
00253 sul_cfg_to_string(sul_cfg_block_t *cfg, char **str, apr_size_t *sz, 
00254                   apr_pool_t *pool);
00255 
00263 SUL_DECLARE(void)
00264 sul_cfg_vars_set(sul_cfg_block_t *cfg, const char *key, const char *val);
00265 
00273 SUL_DECLARE(const char *)
00274 sul_cfg_vars_get(sul_cfg_block_t *cfg, const char *key);
00275 
00276 
00277 typedef enum sul_cfg_vorder_e
00278 {
00279   SUL_CVO_BEFORE = 0x1 << 0,
00280   SUL_CVO_AFTER  = 0x1 << 1
00281 } sul_cfg_vorder_e;
00282 
00283 typedef sul_error_t *(*sul_cfg_visitor_fn_t)(sul_cfg_block_t *config, 
00284                       long flags, void *param, apr_pool_t *pool);
00285 
00286 typedef struct sul_cfg_visitor_t
00287 {
00288   char *name;
00289   long flags;
00290   sul_cfg_visitor_fn_t fn;
00291   void *baton;
00292 } sul_cfg_visitor_t;
00293 
00294 SUL_DECLARE(sul_error_t *)
00295 sul_cfg_apply_visitors(sul_cfg_block_t *cfg, sul_cfg_visitor_t *visitors, 
00296                        apr_pool_t *pool);
00297 
00298 SUL_DECLARE(sul_error_t *)
00299 sul_cfg_apply_children(sul_cfg_block_t *cfg, sul_cfg_visitor_t *visitors,
00300                        apr_pool_t *pool);
00301 
00304 #endif

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