[Asterisk-cvs] asterisk/include/asterisk config.h, 1.13, 1.14 config_pvt.h, 1.6, 1.7

markster at lists.digium.com markster at lists.digium.com
Sat Jan 15 23:58:23 CST 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv6846/include/asterisk

Modified Files:
	config.h config_pvt.h 
Log Message:
config restructure, sip peer completion (bug #3352, #3327)


Index: config.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/config.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- config.h	15 Jan 2005 23:48:12 -0000	1.13
+++ config.h	16 Jan 2005 06:01:50 -0000	1.14
@@ -96,6 +96,13 @@
  */
 int ast_false(const char *val);
 
+/*! Retrieve a category if it exists
+ * \param config which config to use
+ * \param category_name name of the category you're looking for
+ * This will search through the categories within a given config file and search for a match.  The passed category_name can be a regular string.
+ * Returns pointer to category if found, NULL if not. */
+struct ast_category *ast_category_get(const struct ast_config *config, const char *category_name);
+
 /*! Check for category duplicates */
 /*!
  * \param config which config to use

Index: config_pvt.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/config_pvt.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- config_pvt.h	28 Dec 2004 14:53:40 -0000	1.6
+++ config_pvt.h	16 Jan 2005 06:01:50 -0000	1.7
@@ -14,53 +14,49 @@
 struct ast_category {
 	char name[80];
 	struct ast_variable *root;
+	struct ast_variable *last;
 	struct ast_category *next;
 };
 
 struct ast_config {
-	/* Maybe this structure isn't necessary but we'll keep it
-	   for now */
 	struct ast_category *root;
-	struct ast_category *prev;
+	struct ast_category *last;
 };
 
-
-struct ast_category;
+typedef struct ast_config *config_static_func(const char *database, const char *table, const char *configfile, struct ast_config *config, struct ast_category **cat, int includelevel);
 
 struct ast_config_reg {
 	char name[CONFIG_KEYWORD_STRLEN];
-	struct ast_config *(*static_func)(const char *database, const char *table, const char *, struct ast_config *,struct ast_category **,struct ast_variable **,int);
+	config_static_func *static_func;
 	struct ast_variable *(*realtime_func)(const char *database, const char *table, va_list ap);
 	struct ast_config *(*realtime_multi_func)(const char *database, const char *table, va_list ap);
 	int (*update_func)(const char *database, const char *table, const char *keyfield, const char *entity, va_list ap);
 	struct ast_config_reg *next;
 };
 
-
 int ast_config_register(struct ast_config_reg *new);
 int ast_config_deregister(struct ast_config_reg *del);
 void ast_cust_config_on(void);
 void ast_cust_config_off(void);
 int ast_cust_config_active(void);
 void ast_config_destroy_all(void);
-
-
-int ast_category_delete(struct ast_config *cfg, char *category);
-int ast_variable_delete(struct ast_config *cfg, char *category, char *variable, char *value);
-int ast_save(char *filename, struct ast_config *cfg, char *generator);
+int ast_cust_config_register(struct ast_config_reg *new);
+int ast_cust_config_deregister(struct ast_config_reg *new);
+int register_config_cli(void);
+int read_ast_cust_config(void);
 
 struct ast_config *ast_new_config(void);
+
 struct ast_category *ast_new_category(char *name);
-struct ast_variable *ast_new_variable(char *name,char *value);
 void ast_category_append(struct ast_config *config, struct ast_category *cat);
+int ast_category_delete(struct ast_config *cfg, char *category);
 void ast_category_destroy(struct ast_category *cat);
-int ast_cust_config_register(struct ast_config_reg *new);
-int ast_cust_config_deregister(struct ast_config_reg *new);
-int register_config_cli(void);
-int read_ast_cust_config(void);
-struct ast_config *ast_internal_load(const char *configfile, struct ast_config *tmp, struct ast_category **_tmpc, struct ast_variable **_last, int includelevel);
 
+struct ast_variable *ast_new_variable(char *name,char *value);
+int ast_variable_delete(struct ast_config *cfg, char *category, char *variable, char *value);
+int ast_save(char *filename, struct ast_config *cfg, char *generator);
 
+struct ast_config *ast_internal_load(const char *configfile, struct ast_config *tmp, struct ast_category **cat, int includelevel);
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }




More information about the svn-commits mailing list