aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/config.h
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-05 06:46:11 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-05 06:46:11 +0000
commit89e09dcdf85d029417888df4f5ad88979f9bfb97 (patch)
tree1f9acecb29a22d0f2906c87338b105289ddef857 /include/asterisk/config.h
parent5d45bd2ea597a9e6d27f7f0af79ceb98cf765bc6 (diff)
Major changes to res_config to support centralized config, eliminate configuration of res_config_odbc, update config examples, integrate with iax2, remove mysql friends from iax2, put on flame retardant vest...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3914 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/config.h')
-rwxr-xr-xinclude/asterisk/config.h36
1 files changed, 31 insertions, 5 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index e98df700f..89e66437b 100755
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -34,6 +34,7 @@ struct ast_variable {
struct ast_comment *precomments;
struct ast_comment *sameline;
struct ast_variable *next;
+ char stuff[0];
};
//! Load a config file
@@ -103,12 +104,37 @@ int ast_false(char *val);
* Browse config structure and check for category duplicity Return non-zero if found */
int ast_category_exist(struct ast_config *config, char *category_name);
-/* These are only in the config engine at this point */
-struct ast_variable *ast_variable_append_modify(struct ast_config *cfg, char *category, char *variable, char *newvalue, int newcat, int newvar, int move);
+//! Retrieve realtime configuration
+/*!
+ * \param family which family/config to lookup
+ * \param keyfield which field to use as the key
+ * \param lookup which value to look for in the key field to match the entry.
+ * This will use builtin configuration backends to look up a particular
+ * entity in realtime and return a variable list of its parameters. Note
+ * that unlike the variables in ast_config, the resulting list of variables
+ * MUST be fred with ast_free_runtime() as there is no container.
+ */
+struct ast_variable *ast_load_realtime(const char *family, const char *keyfield, const char *lookup);
+
+//! Update realtime configuration
+/*!
+ * \param family which family/config to be updated
+ * \param keyfield which field to use as the key
+ * \param lookup which value to look for in the key field to match the entry.
+ * \param variable which variable should be updated in the config, NULL to end list
+ * \param value the value to be assigned to that variable in the given entity.
+ * This function is used to update a parameter in realtime configuration space.
+ *
+ */
+int ast_update_realtime(const char *family, const char *keyfield, const char *lookup, ...);
-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);
+//! Free realtime configuration
+/*!
+ * \param var the linked list of variables to free
+ * This command free's a list of variables and should ONLY be used
+ * in conjunction with ast_load_realtime and not with the regular ast_load.
+ */
+void ast_destroy_realtime(struct ast_variable *var);
#if defined(__cplusplus) || defined(c_plusplus)
}