diff options
author | Mark Spencer <markster@digium.com> | 2006-07-19 13:28:38 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2006-07-19 13:28:38 +0000 |
commit | 837910062b3f16b74eb9209595bcded5e2f8eb85 (patch) | |
tree | 1b40cd56d9b716fbe6080b44ad3041da91d6bc91 /include/asterisk/config.h | |
parent | db0b142b06510f4f72115ea7bc1616dc771afb29 (diff) |
First pass at in-place file manipulation via manager
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/config.h')
-rw-r--r-- | include/asterisk/config.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h index d7a4e4e83..7c3d75b44 100644 --- a/include/asterisk/config.h +++ b/include/asterisk/config.h @@ -45,7 +45,7 @@ struct ast_variable { char stuff[0]; }; -typedef struct ast_config *config_load_func(const char *database, const char *table, const char *configfile, struct ast_config *config); +typedef struct ast_config *config_load_func(const char *database, const char *table, const char *configfile, struct ast_config *config, int withcomments); typedef struct ast_variable *realtime_var_get(const char *database, const char *table, va_list ap); typedef struct ast_config *realtime_multi_get(const char *database, const char *table, va_list ap); typedef int realtime_update(const char *database, const char *table, const char *keyfield, const char *entity, va_list ap); @@ -66,6 +66,7 @@ struct ast_config_engine { * Returns NULL on error, or an ast_config data structure on success */ struct ast_config *ast_config_load(const char *filename); +struct ast_config *ast_config_load_with_comments(const char *filename); /*! \brief Destroys a config * \param config pointer to config data structure @@ -181,11 +182,12 @@ void ast_category_rename(struct ast_category *cat, const char *name); struct ast_variable *ast_variable_new(const char *name, const char *value); void ast_variable_append(struct ast_category *category, struct ast_variable *variable); -int ast_variable_delete(struct ast_config *cfg, char *category, char *variable, char *value); +int ast_variable_delete(struct ast_category *category, char *variable); +int ast_variable_update(struct ast_category *category, char *variable, char *value); int config_text_file_save(const char *filename, const struct ast_config *cfg, const char *generator); -struct ast_config *ast_config_internal_load(const char *configfile, struct ast_config *cfg); +struct ast_config *ast_config_internal_load(const char *configfile, struct ast_config *cfg, int withcomments); #if defined(__cplusplus) || defined(c_plusplus) } |