diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-19 13:28:38 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-19 13:28:38 +0000 |
commit | b972e7626d98f17fa84e7219500a6a54e74ce6dd (patch) | |
tree | 1b40cd56d9b716fbe6080b44ad3041da91d6bc91 /include | |
parent | 0a1d33454ccd03e074d6d6a714af80f266fb2442 (diff) |
First pass at in-place file manipulation via manager
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37936 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/config.h | 8 | ||||
-rw-r--r-- | include/asterisk/manager.h | 1 |
2 files changed, 6 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) } diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h index 71b5a5966..96326f07c 100644 --- a/include/asterisk/manager.h +++ b/include/asterisk/manager.h @@ -54,6 +54,7 @@ #define EVENT_FLAG_COMMAND (1 << 4) /* Ability to read/set commands */ #define EVENT_FLAG_AGENT (1 << 5) /* Ability to read/set agent info */ #define EVENT_FLAG_USER (1 << 6) /* Ability to read/set user info */ +#define EVENT_FLAG_CONFIG (1 << 7) /* Ability to modify configurations */ /* Export manager structures */ #define AST_MAX_MANHEADERS 80 |