Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

config_pvt.h

Go to the documentation of this file.
00001 #ifndef _ASTERISK_CONFIG_PVT_H 00002 #define _ASTERISK_CONFIG_PVT_H 00003 #if defined(__cplusplus) || defined(c_plusplus) 00004 extern "C" { 00005 #endif 00006 00007 #define CONFIG_KEYWORD_STRLEN 128 00008 #define CONFIG_KEYWORD_ARRAYLEN 512 00009 #include <asterisk/config.h> 00010 00011 #define MAX_INCLUDE_LEVEL 10 00012 00013 struct ast_category { 00014 char name[80]; 00015 struct ast_variable *root; 00016 struct ast_category *next; 00017 #ifdef PRESERVE_COMMENTS 00018 struct ast_comment *precomments; 00019 struct ast_comment *sameline; 00020 #endif 00021 }; 00022 00023 struct ast_config { 00024 /* Maybe this structure isn't necessary but we'll keep it 00025 for now */ 00026 struct ast_category *root; 00027 struct ast_category *prev; 00028 #ifdef PRESERVE_COMMENTS 00029 struct ast_comment *trailingcomments; 00030 #endif 00031 }; 00032 00033 #ifdef PRESERVE_COMMENTS 00034 struct ast_comment_struct 00035 { 00036 struct ast_comment *root; 00037 struct ast_comment *prev; 00038 }; 00039 #endif 00040 00041 struct ast_category; 00042 00043 struct ast_config_reg { 00044 char name[CONFIG_KEYWORD_STRLEN]; 00045 struct ast_config *(*func)(char *, struct ast_config *,struct ast_category **,struct ast_variable **,int 00046 #ifdef PRESERVE_COMMENTS 00047 ,struct ast_comment_struct * 00048 #endif 00049 ); 00050 char keywords[CONFIG_KEYWORD_STRLEN][CONFIG_KEYWORD_ARRAYLEN]; 00051 int keycount; 00052 struct ast_config_reg *next; 00053 }; 00054 00055 00056 00057 int ast_config_register(struct ast_config_reg *new); 00058 int ast_config_deregister(struct ast_config_reg *del); 00059 void ast_cust_config_on(void); 00060 void ast_cust_config_off(void); 00061 int ast_cust_config_active(void); 00062 struct ast_config_reg *get_config_registrations(void); 00063 struct ast_config_reg *get_ast_cust_config(char *name); 00064 struct ast_config_reg *get_ast_cust_config_keyword(char *name); 00065 void ast_config_destroy_all(void); 00066 00067 00068 int ast_category_delete(struct ast_config *cfg, char *category); 00069 int ast_variable_delete(struct ast_config *cfg, char *category, char *variable, char *value); 00070 int ast_save(char *filename, struct ast_config *cfg, char *generator); 00071 00072 struct ast_config *ast_new_config(void); 00073 struct ast_category *ast_new_category(char *name); 00074 struct ast_variable *ast_new_variable(char *name,char *value); 00075 int ast_cust_config_register(struct ast_config_reg *new); 00076 int ast_cust_config_deregister(struct ast_config_reg *new); 00077 int register_config_cli(void); 00078 int read_ast_cust_config(void); 00079 00080 00081 00082 00083 #if defined(__cplusplus) || defined(c_plusplus) 00084 } 00085 #endif 00086 00087 00088 #endif

Generated on Tue Aug 17 16:13:52 2004 for Asterisk by doxygen 1.3.8