diff options
author | Brian Cully <bjc@kublai.com> | 2008-04-14 21:52:55 -0400 |
---|---|---|
committer | Brian Cully <github.20.shmit@spamgourmet.com> | 2008-04-14 21:52:55 -0400 |
commit | 6ba98a9f9f48e13738d9736cba9c45b5e94f42f2 (patch) | |
tree | 86d7c281bcdbf67eb53cee064aa905e740ec5ccf /include/.svn/text-base/config.h.svn-base | |
download | nastd-6ba98a9f9f48e13738d9736cba9c45b5e94f42f2.tar.gz nastd-6ba98a9f9f48e13738d9736cba9c45b5e94f42f2.zip |
Initial import
Diffstat (limited to 'include/.svn/text-base/config.h.svn-base')
-rw-r--r-- | include/.svn/text-base/config.h.svn-base | 40 |
1 files changed, 40 insertions, 0 deletions
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 |