From 6ba98a9f9f48e13738d9736cba9c45b5e94f42f2 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 14 Apr 2008 21:52:55 -0400 Subject: Initial import --- include/.svn/text-base/config.h.svn-base | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/.svn/text-base/config.h.svn-base (limited to 'include/.svn/text-base/config.h.svn-base') diff --git a/include/.svn/text-base/config.h.svn-base b/include/.svn/text-base/config.h.svn-base new file mode 100644 index 0000000..36d3611 --- /dev/null +++ b/include/.svn/text-base/config.h.svn-base @@ -0,0 +1,40 @@ +/* $Id: config.h,v 1.3 2001/11/09 15:54:37 shmit Exp $ */ + +#ifndef CONFIG_H +# define CONFIG_H + +enum data_type { NUMBER, STRING, ARRAY, DICTIONARY }; + +struct conf_entry { + char *name; + void *data; + int namelen, datalen; + enum data_type type; + int num_entries; +}; +typedef struct conf_entry conf_entry_t; + +struct nast_config { + char *description; + char *nast_dir; + char *nast_sock; + char *nast_cdb_file; + char *mysql_host; + char *mysql_user; + char *mysql_pass; + int nofork_flag; + int null_cache_timeout; + int tcp_port; +}; + +extern struct nast_config config; + +int config_init(); +void config_delete(); +void config_setdefaults(); +void *config_find(void *root_node, const char *name, enum data_type *type); +void *config_arrayitemat(void *array, int index, enum data_type *type); +void *config_dictitemat(void *dict, const char *name, enum data_type *type); +void *getdata(void *itemref, void *dst, enum data_type want_type); + +#endif -- cgit v1.2.3