| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
XML Documentation API. More...
#include "asterisk.h"#include "asterisk/_private.h"#include "asterisk/paths.h"#include "asterisk/linkedlists.h"#include "asterisk/config.h"#include "asterisk/term.h"#include "asterisk/astobj2.h"#include "asterisk/xmldoc.h"#include "asterisk/cli.h"
Go to the source code of this file.
| Data Structures | |
| struct | documentation_tree | 
| XML documentation tree.  More... | |
| struct | strcolorized_tags | 
| struct | strspecial_tags | 
| struct | strsyntaxtype | 
| Mapping between type of node and type of syntax to generate.  More... | |
| struct | xmldoc_tree | 
| Container of documentation trees.  More... | |
| Macros | |
| #define | GOTONEXT(__rev, __a) (__rev ? ast_xml_node_get_prev(__a) : ast_xml_node_get_next(__a)) | 
| #define | ISLAST(__rev, __a) (__rev == 1 ? (ast_xml_node_get_prev(__a) ? 0 : 1) : (ast_xml_node_get_next(__a) ? 0 : 1)) | 
| #define | MP(__a) ((multiple ? __a : "")) | 
| Enumerations | |
| enum | syntaxtype { FUNCTION_SYNTAX , MANAGER_SYNTAX , MANAGER_EVENT_SYNTAX , CONFIG_INFO_SYNTAX , CONFIG_FILE_SYNTAX , CONFIG_OPTION_SYNTAX , CONFIG_OBJECT_SYNTAX , COMMAND_SYNTAX } | 
| Types of syntax that we are able to generate.  More... | |
| Functions | |
| static char * | _ast_xmldoc_build_arguments (struct ast_xml_node *node) | 
| static char * | _ast_xmldoc_build_description (struct ast_xml_node *node) | 
| static char * | _ast_xmldoc_build_seealso (struct ast_xml_node *node) | 
| static char * | _ast_xmldoc_build_since (struct ast_xml_node *node) | 
| static char * | _ast_xmldoc_build_synopsis (struct ast_xml_node *node) | 
| static char * | _ast_xmldoc_build_syntax (struct ast_xml_node *root_node, const char *type, const char *name) | 
| static char * | _xmldoc_build_field (struct ast_xml_node *node, const char *var, int raw) | 
| static struct ast_xml_doc_item * | ast_xml_doc_item_alloc (const char *name, const char *type) | 
| static int | ast_xml_doc_item_cmp (void *obj, void *arg, int flags) | 
| static void | ast_xml_doc_item_destructor (void *obj) | 
| static int | ast_xml_doc_item_hash (const void *obj, const int flags) | 
| char * | ast_xmldoc_build_arguments (const char *type, const char *name, const char *module) | 
| Generate the [arguments] tag based on type of node ('application', 'function' or 'agi') and name. | |
| char * | ast_xmldoc_build_description (const char *type, const char *name, const char *module) | 
| Generate description documentation from XML. | |
| struct ao2_container * | ast_xmldoc_build_documentation (const char *type) | 
| Build the documentation for a particular source type. | |
| struct ast_xml_doc_item * | ast_xmldoc_build_final_response (const char *type, const char *name, const char *module) | 
| Generate the [final response] tag based on type of node ('application', 'function' or 'agi') and name. | |
| struct ast_xml_doc_item * | ast_xmldoc_build_list_responses (const char *type, const char *name, const char *module) | 
| Generate the [list responses] tag based on type of node ('application', 'function' or 'agi') and name. | |
| char * | ast_xmldoc_build_seealso (const char *type, const char *name, const char *module) | 
| Parse the <see-also> node content. | |
| char * | ast_xmldoc_build_since (const char *type, const char *name, const char *module) | 
| Parse the <since> node content. | |
| char * | ast_xmldoc_build_synopsis (const char *type, const char *name, const char *module) | 
| Generate synopsis documentation from XML. | |
| char * | ast_xmldoc_build_syntax (const char *type, const char *name, const char *module) | 
| Get the syntax for a specified application or function. | |
| int | ast_xmldoc_load_documentation (void) | 
| Load XML documentation. Provided by xmldoc.c. | |
| char * | ast_xmldoc_printable (const char *bwinput, int withcolors) | 
| Colorize and put delimiters (instead of tags) to the xmldoc output. | |
| struct ast_xml_xpath_results * | ast_xmldoc_query (const char *fmt,...) | 
| Execute an XPath query on the loaded XML documentation. | |
| int | ast_xmldoc_regenerate_doc_item (struct ast_xml_doc_item *item) | 
| Regenerate the documentation for a particular item. | |
| static void | build_config_docs (struct ast_xml_node *cur, struct ast_xml_doc_item_list *root) | 
| static char * | handle_dump_docs (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) | 
| static char * | handle_reload_docs (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) | 
| static int | xmldoc_attribute_match (struct ast_xml_node *node, const char *attr, const char *value) | 
| static struct ast_xml_doc_item * | xmldoc_build_documentation_item (struct ast_xml_node *node, const char *name, const char *type) | 
| static char * | xmldoc_build_field (const char *type, const char *name, const char *module, const char *var, int raw) | 
| static struct ast_xml_doc_item * | xmldoc_build_final_response (struct ast_xml_node *manager_action) | 
| static struct ast_xml_doc_item * | xmldoc_build_list_responses (struct ast_xml_node *manager_action) | 
| static struct ast_str * | xmldoc_get_formatted (struct ast_xml_node *node, int raw_output, int raw_wrap) | 
| static struct ast_xml_node * | xmldoc_get_node (const char *type, const char *name, const char *module, const char *language) | 
| static char * | xmldoc_get_syntax_cmd (struct ast_xml_node *fixnode, const char *name, int printname) | 
| static char * | xmldoc_get_syntax_config_object (struct ast_xml_node *fixnode, const char *name) | 
| static char * | xmldoc_get_syntax_config_option (struct ast_xml_node *fixnode, const char *name) | 
| static char * | xmldoc_get_syntax_fun (struct ast_xml_node *rootnode, const char *rootname, const char *childname, int printparenthesis, int printrootname) | 
| static char * | xmldoc_get_syntax_manager (struct ast_xml_node *fixnode, const char *name, const char *manager_type) | 
| static enum syntaxtype | xmldoc_get_syntax_type (const char *type) | 
| static int | xmldoc_has_inside (struct ast_xml_node *fixnode, const char *what) | 
| static int | xmldoc_has_nodes (struct ast_xml_node *fixnode) | 
| static int | xmldoc_has_specialtags (struct ast_xml_node *fixnode) | 
| static int | xmldoc_load_documentation (int first_time) | 
| static int | xmldoc_parse_argument (struct ast_xml_node *fixnode, int insideparameter, const char *paramtabs, const char *tabs, struct ast_str **buffer) | 
| static char * | xmldoc_parse_cmd_enumlist (struct ast_xml_node *fixnode) | 
| static int | xmldoc_parse_common_elements (struct ast_xml_node *node, const char *tabs, const char *posttabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_enum (struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_enumlist (struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_example (struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_info (struct ast_xml_node *node, const char *tabs, const char *posttabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_option (struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer) | 
| static void | xmldoc_parse_optionlist (struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_para (struct ast_xml_node *node, const char *tabs, const char *posttabs, struct ast_str **buffer) | 
| static void | xmldoc_parse_parameter (struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_specialtags (struct ast_xml_node *fixnode, const char *tabs, const char *posttabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_variable (struct ast_xml_node *node, const char *tabs, struct ast_str **buffer) | 
| static int | xmldoc_parse_variablelist (struct ast_xml_node *node, const char *tabs, struct ast_str **buffer) | 
| static int | xmldoc_postbrlen (const char *postbr) | 
| static void | xmldoc_purge_documentation (void) | 
| static int | xmldoc_reload_documentation (void) | 
| static void | xmldoc_reverse_helper (int reverse, int *len, char **syntax, const char *fmt,...) | 
| static void | xmldoc_setpostbr (char *postbr, size_t len, const char *text) | 
| static void | xmldoc_string_cleanup (const char *text, struct ast_str **output, int lastspaces, int maintain_newlines) | 
| static char * | xmldoc_string_wrap (const char *text, int columns) | 
| static void | xmldoc_unload_documentation (void) | 
| Close and unload XML documentation. | |
| Variables | |
| static struct ast_cli_entry | cli_dump_xmldocs = { .handler = handle_dump_docs , .summary = "Dump the XML docs to the specified file" ,} | 
| static struct ast_cli_entry | cli_reload_xmldocs = { .handler = handle_reload_docs , .summary = "Reload the XML docs" ,} | 
| static const struct strcolorized_tags | colorized_tags [] | 
| static const char | default_documentation_language [] = "en_US" | 
| Default documentation language. | |
| static char | documentation_language [6] | 
| XML documentation language. | |
| static const struct strspecial_tags | special_tags [] | 
| static struct strsyntaxtype | stxtype [] | 
| static const int | xmldoc_text_columns = 79 | 
| Number of columns to print when showing the XML documentation with a 'core show application/function *' CLI command. Used in text wrapping. | |
| static struct xmldoc_tree | xmldoc_tree = AST_RWLIST_HEAD_INIT_VALUE | 
| #define GOTONEXT | ( | __rev, | |
| __a | |||
| ) | (__rev ? ast_xml_node_get_prev(__a) : ast_xml_node_get_next(__a)) | 
| #define ISLAST | ( | __rev, | |
| __a | |||
| ) | (__rev == 1 ? (ast_xml_node_get_prev(__a) ? 0 : 1) : (ast_xml_node_get_next(__a) ? 0 : 1)) | 
| #define MP | ( | __a | ) | ((multiple ? __a : "")) | 
| enum syntaxtype | 
Types of syntax that we are able to generate.
| Enumerator | |
|---|---|
| FUNCTION_SYNTAX | |
| MANAGER_SYNTAX | |
| MANAGER_EVENT_SYNTAX | |
| CONFIG_INFO_SYNTAX | |
| CONFIG_FILE_SYNTAX | |
| CONFIG_OPTION_SYNTAX | |
| CONFIG_OBJECT_SYNTAX | |
| COMMAND_SYNTAX | |
Definition at line 1153 of file xmldoc.c.
| 
 | static | 
Definition at line 2134 of file xmldoc.c.
References ast_free, ast_str_buffer(), ast_str_create, ast_str_strlen(), ast_str_truncate(), ast_strdup, ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), buf, NULL, and xmldoc_parse_parameter().
Referenced by ast_xmldoc_build_arguments(), ast_xmldoc_regenerate_doc_item(), and xmldoc_build_documentation_item().
| 
 | static | 
Definition at line 2356 of file xmldoc.c.
References _xmldoc_build_field().
Referenced by ast_xmldoc_regenerate_doc_item(), and xmldoc_build_documentation_item().
| 
 | static | 
Definition at line 1645 of file xmldoc.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_str_create, ast_strdup, ast_xml_free_attr(), ast_xml_free_text(), ast_xml_get_attribute(), ast_xml_get_text(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), first, and NULL.
Referenced by ast_xmldoc_build_seealso(), ast_xmldoc_regenerate_doc_item(), and xmldoc_build_documentation_item().
| 
 | static | 
Definition at line 1744 of file xmldoc.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_str_create, ast_strdup, ast_xml_free_text(), ast_xml_get_text(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), first, and NULL.
Referenced by ast_xmldoc_build_since(), and xmldoc_build_documentation_item().
| 
 | static | 
Definition at line 2333 of file xmldoc.c.
References _xmldoc_build_field().
Referenced by ast_xmldoc_regenerate_doc_item(), and xmldoc_build_documentation_item().
| 
 | static | 
Definition at line 1215 of file xmldoc.c.
References ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), COMMAND_SYNTAX, CONFIG_OBJECT_SYNTAX, CONFIG_OPTION_SYNTAX, FUNCTION_SYNTAX, MANAGER_EVENT_SYNTAX, MANAGER_SYNTAX, name, NULL, type, xmldoc_get_syntax_cmd(), xmldoc_get_syntax_config_object(), xmldoc_get_syntax_config_option(), xmldoc_get_syntax_fun(), xmldoc_get_syntax_manager(), and xmldoc_get_syntax_type().
Referenced by ast_xmldoc_build_syntax(), ast_xmldoc_regenerate_doc_item(), and xmldoc_build_documentation_item().
| 
 | static | 
Definition at line 2261 of file xmldoc.c.
References ast_free, ast_str_buffer(), ast_str_strlen(), ast_strdup, ast_xml_find_element(), ast_xml_node_get_children(), NULL, var, and xmldoc_get_formatted().
Referenced by _ast_xmldoc_build_description(), _ast_xmldoc_build_synopsis(), and xmldoc_build_field().
| 
 | static | 
Definition at line 2401 of file xmldoc.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_ref, ast_log, AST_LOG_ERROR, ast_str_create, ast_string_field_init, ast_string_field_set, ast_xml_doc_item_destructor(), item, name, NULL, and type.
Referenced by xmldoc_build_documentation_item().
| 
 | static | 
Definition at line 2454 of file xmldoc.c.
References CMP_MATCH, CMP_STOP, match(), ast_xml_doc_item::name, and OBJ_KEY.
Referenced by ast_xmldoc_build_documentation().
| 
 | static | 
Definition at line 2371 of file xmldoc.c.
References ao2_ref, ast_xml_doc_item::arguments, ast_free, AST_LIST_NEXT, ast_string_field_free_memory, ast_xml_doc_item::description, ast_xml_doc_item::next, NULL, ast_xml_doc_item::seealso, ast_xml_doc_item::since, ast_xml_doc_item::synopsis, and ast_xml_doc_item::syntax.
Referenced by ast_xml_doc_item_alloc().
| 
 | static | 
Definition at line 2442 of file xmldoc.c.
References ast_str_case_hash(), item, name, aco_type::name, and OBJ_KEY.
Referenced by ast_xmldoc_build_documentation().
| char * ast_xmldoc_build_arguments | ( | const char * | type, | 
| const char * | name, | ||
| const char * | module | ||
| ) | 
Generate the [arguments] tag based on type of node ('application', 'function' or 'agi') and name.
| type | 'application', 'function' or 'agi' ? | 
| name | Name of the application or function to build the 'arguments' tag. | 
| module | The module the item is in (optional, can be NULL) | 
| NULL | on error. | 
| Output | buffer with the [arguments] tag content. | 
Definition at line 2174 of file xmldoc.c.
References _ast_xmldoc_build_arguments(), AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_strlen_zero(), ast_xml_node_get_children(), documentation_language, name, NULL, type, and xmldoc_get_node().
Referenced by acf_retrieve_docs(), ast_agi_register(), ast_manager_register2(), and ast_register_application2().
| char * ast_xmldoc_build_description | ( | const char * | type, | 
| const char * | name, | ||
| const char * | module | ||
| ) | 
Generate description documentation from XML.
| type | The source of documentation (application, function, etc). | 
| name | The name of the application, function, etc. | 
| module | The module the item is in (optional, can be NULL) | 
| NULL | on error. | 
| A | malloc'ed string with the formatted description. | 
Definition at line 2361 of file xmldoc.c.
References name, type, and xmldoc_build_field().
Referenced by acf_retrieve_docs(), ast_agi_register(), ast_manager_register2(), and ast_register_application2().
| struct ao2_container * ast_xmldoc_build_documentation | ( | const char * | type | ) | 
Build the documentation for a particular source type.
| type | The source of the documentation items (application, function, etc.) | 
| NULL | on error | 
| An | ao2_container populated with ast_xml_doc instances for each item that exists for the specified source type | 
Definition at line 2783 of file xmldoc.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_link, ao2_t_ref, AST_LIST_FIRST, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_log, AST_LOG_ERROR, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_xml_doc_item_cmp(), ast_xml_doc_item_hash(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_get_root(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), build_config_docs(), CONFIG_INFO_SYNTAX, documentation_tree::doc, documentation_tree::entry, item, MANAGER_EVENT_SYNTAX, name, ast_xml_doc_item::next, NULL, RAII_VAR, type, xmldoc_build_documentation_item(), and xmldoc_get_syntax_type().
Referenced by __init_manager(), and aco_init().
| struct ast_xml_doc_item * ast_xmldoc_build_final_response | ( | const char * | type, | 
| const char * | name, | ||
| const char * | module | ||
| ) | 
Generate the [final response] tag based on type of node ('application', 'function' or 'agi') and name.
| type | 'application', 'function' or 'agi' | 
| name | Name of the application or function to build the 'responses' tag. | 
| module | The module the item is in (optional, can be NULL) | 
Definition at line 2653 of file xmldoc.c.
References AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_strlen_zero(), ast_xml_node_get_children(), documentation_language, name, NULL, type, xmldoc_build_final_response(), and xmldoc_get_node().
Referenced by ast_manager_register2().
| struct ast_xml_doc_item * ast_xmldoc_build_list_responses | ( | const char * | type, | 
| const char * | name, | ||
| const char * | module | ||
| ) | 
Generate the [list responses] tag based on type of node ('application', 'function' or 'agi') and name.
| type | 'application', 'function' or 'agi' | 
| name | Name of the application or function to build the 'responses' tag. | 
| module | The module the item is in (optional, can be NULL) | 
Definition at line 2583 of file xmldoc.c.
References AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_strlen_zero(), ast_xml_node_get_children(), documentation_language, name, NULL, type, xmldoc_build_list_responses(), and xmldoc_get_node().
Referenced by ast_manager_register2().
| char * ast_xmldoc_build_seealso | ( | const char * | type, | 
| const char * | name, | ||
| const char * | module | ||
| ) | 
Parse the <see-also> node content.
| type | 'application', 'function' or 'agi'. | 
| name | Application or functions name. | 
| module | The module the item is in (optional, can be NULL) | 
| NULL | on error. | 
| Content | of the see-also node. | 
Definition at line 1707 of file xmldoc.c.
References _ast_xmldoc_build_seealso(), AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_strlen_zero(), ast_xml_node_get_children(), documentation_language, name, NULL, type, and xmldoc_get_node().
Referenced by acf_retrieve_docs(), ast_agi_register(), ast_manager_register2(), and ast_register_application2().
| char * ast_xmldoc_build_since | ( | const char * | type, | 
| const char * | name, | ||
| const char * | module | ||
| ) | 
Parse the <since> node content.
| type | 'application', 'function' or 'agi'. | 
| name | Application or functions name. | 
| module | The module the item is in (optional, can be NULL) | 
| NULL | on error. | 
| Content | of the since node. | 
Definition at line 1792 of file xmldoc.c.
References _ast_xmldoc_build_since(), AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_strlen_zero(), ast_xml_node_get_children(), documentation_language, name, NULL, type, and xmldoc_get_node().
Referenced by acf_retrieve_docs(), ast_agi_register(), ast_manager_register2(), and ast_register_application2().
| char * ast_xmldoc_build_synopsis | ( | const char * | type, | 
| const char * | name, | ||
| const char * | module | ||
| ) | 
Generate synopsis documentation from XML.
| type | The source of documentation (application, function, etc). | 
| name | The name of the application, function, etc. | 
| module | The module the item is in (optional, can be NULL) | 
| NULL | on error. | 
| A | malloc'ed string with the synopsis. | 
Definition at line 2338 of file xmldoc.c.
References name, type, and xmldoc_build_field().
Referenced by acf_retrieve_docs(), ast_agi_register(), ast_manager_register2(), and ast_register_application2().
| char * ast_xmldoc_build_syntax | ( | const char * | type, | 
| const char * | name, | ||
| const char * | module | ||
| ) | 
Get the syntax for a specified application or function.
| type | Application, Function or AGI ? | 
| name | Name of the application or function. | 
| module | The module the item is in (optional, can be NULL) | 
| NULL | on error. | 
| The | generated syntax in a ast_malloc'ed string. | 
Definition at line 1252 of file xmldoc.c.
References _ast_xmldoc_build_syntax(), AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, documentation_language, name, NULL, type, and xmldoc_get_node().
Referenced by acf_retrieve_docs(), ast_agi_register(), ast_manager_register2(), and ast_register_application2().
| int ast_xmldoc_load_documentation | ( | void | ) | 
Load XML documentation. Provided by xmldoc.c.
| 1 | on error. | 
| 0 | on success. | 
Definition at line 3146 of file xmldoc.c.
References xmldoc_load_documentation().
Referenced by asterisk_daemon().
| char * ast_xmldoc_printable | ( | const char * | bwinput, | 
| int | withcolors | ||
| ) | 
Colorize and put delimiters (instead of tags) to the xmldoc output.
| bwinput | Not colorized input with tags. | 
| withcolors | Result output with colors. | 
| NULL | on error. | 
| New | malloced buffer colorized and with delimiters. | 
Definition at line 241 of file xmldoc.c.
References ARRAY_LEN, ast_copy_string(), ast_free, ast_opt_light_background, ast_str_append(), ast_str_buffer(), ast_str_create, ast_term_color_code(), ast_term_reset(), buf, c, COLOR_CYAN, colorized_tags, end, len(), NULL, strcasestr(), xmldoc_string_wrap(), and xmldoc_text_columns.
Referenced by cli_show_module_options(), cli_show_module_type(), cli_show_module_types(), handle_cli_agi_show(), handle_show_function(), handle_showmancmd(), print_app_docs(), print_event_instance(), and write_htmldump().
| struct ast_xml_xpath_results * ast_xmldoc_query | ( | const char * | fmt, | 
| ... | |||
| ) | 
Execute an XPath query on the loaded XML documentation.
| fmt | The XPath query string to execute | 
| ... | Variable printf style format arguments | 
| An | XPath results object on success | 
| NULL | if no match found | 
Definition at line 2675 of file xmldoc.c.
References AST_DYNSTR_BUILD_FAILED, ast_free, AST_LIST_TRAVERSE, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_str_buffer(), ast_str_create, ast_str_set_va(), ast_xml_query(), documentation_tree::doc, documentation_tree::entry, NULL, and RAII_VAR.
Referenced by load_modules(), xmldoc_update_config_option(), and xmldoc_update_config_type().
| int ast_xmldoc_regenerate_doc_item | ( | struct ast_xml_doc_item * | item | ) | 
Regenerate the documentation for a particular item.
| item | The documentation item to regenerate | 
| -1 | on error | 
| 0 | on success | 
Definition at line 2734 of file xmldoc.c.
References _ast_xmldoc_build_arguments(), _ast_xmldoc_build_description(), _ast_xmldoc_build_seealso(), _ast_xmldoc_build_synopsis(), _ast_xmldoc_build_syntax(), ast_xml_doc_item::arguments, ast_free, ast_str_set(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_doc_item::description, item, name, ast_xml_doc_item::seealso, synopsis, ast_xml_doc_item::syntax, and aco_type::type.
Referenced by xmldoc_update_config_option(), and xmldoc_update_config_type().
| 
 | static | 
Definition at line 2706 of file xmldoc.c.
References AST_LIST_INSERT_TAIL, ast_log, ast_string_field_set, ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), build_config_docs(), item, LOG_ERROR, name, ast_xml_doc_item::next, ast_xml_doc_item::ref, and xmldoc_build_documentation_item().
Referenced by ast_xmldoc_build_documentation(), and build_config_docs().
| 
 | static | 
Definition at line 2917 of file xmldoc.c.
References a, AST_LIST_TRAVERSE, ast_log, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_xml_add_child_list(), ast_xml_close(), ast_xml_copy_node_list(), ast_xml_doc_dump_file(), ast_xml_get_root(), ast_xml_new(), ast_xml_new_node(), ast_xml_node_get_children(), ast_xml_set_root(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, documentation_tree::doc, errno, LOG_ERROR, NULL, and ast_cli_entry::usage.
| 
 | static | 
Definition at line 3156 of file xmldoc.c.
References CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, NULL, ast_cli_entry::usage, and xmldoc_reload_documentation().
| 
 | static | 
Definition at line 411 of file xmldoc.c.
References ast_xml_free_attr(), ast_xml_get_attribute(), match(), and value.
Referenced by xmldoc_get_node().
| 
 | static | 
Definition at line 2474 of file xmldoc.c.
References _ast_xmldoc_build_arguments(), _ast_xmldoc_build_description(), _ast_xmldoc_build_seealso(), _ast_xmldoc_build_since(), _ast_xmldoc_build_synopsis(), _ast_xmldoc_build_syntax(), ast_xml_doc_item::arguments, ast_free, ast_str_set(), ast_xml_doc_item_alloc(), ast_xml_doc_item::description, item, name, ast_xml_doc_item::node, NULL, ast_xml_doc_item::seealso, ast_xml_doc_item::since, synopsis, ast_xml_doc_item::syntax, and type.
Referenced by ast_xmldoc_build_documentation(), build_config_docs(), xmldoc_build_final_response(), and xmldoc_build_list_responses().
| 
 | static | 
Definition at line 2294 of file xmldoc.c.
References _xmldoc_build_field(), ast_log, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_strlen_zero(), documentation_language, LOG_ERROR, LOG_WARNING, name, NULL, type, var, and xmldoc_get_node().
Referenced by ast_xmldoc_build_description(), and ast_xmldoc_build_synopsis().
| 
 | static | 
Definition at line 2619 of file xmldoc.c.
References ast_xml_find_element(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), name, NULL, and xmldoc_build_documentation_item().
Referenced by ast_xmldoc_build_final_response().
| 
 | static | 
Definition at line 2539 of file xmldoc.c.
References ao2_cleanup, AST_LIST_FIRST, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, ast_xml_find_element(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), name, ast_xml_doc_item::next, NULL, RAII_VAR, and xmldoc_build_documentation_item().
Referenced by ast_xmldoc_build_list_responses().
| 
 | static | 
Definition at line 2207 of file xmldoc.c.
References ast_skip_blanks(), ast_str_buffer(), ast_str_create, ast_str_strlen(), ast_str_truncate(), ast_xml_free_text(), ast_xml_get_text(), ast_xml_node_get_children(), ast_xml_node_get_next(), NULL, xmldoc_parse_common_elements(), xmldoc_parse_enumlist(), xmldoc_parse_specialtags(), xmldoc_parse_variablelist(), and xmldoc_string_cleanup().
Referenced by _xmldoc_build_field().
| 
 | static | 
Definition at line 435 of file xmldoc.c.
References AST_LIST_TRAVERSE, ast_strlen_zero(), ast_xml_find_element(), ast_xml_get_root(), ast_xml_node_get_children(), ast_xml_node_get_next(), documentation_tree::doc, documentation_tree::entry, language, name, NULL, type, and xmldoc_attribute_match().
Referenced by ast_xmldoc_build_arguments(), ast_xmldoc_build_final_response(), ast_xmldoc_build_list_responses(), ast_xmldoc_build_seealso(), ast_xmldoc_build_since(), ast_xmldoc_build_syntax(), and xmldoc_build_field().
| 
 | static | 
Definition at line 931 of file xmldoc.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_str_create, ast_strdup, ast_true(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), first, name, NULL, xmldoc_get_syntax_cmd(), xmldoc_has_inside(), and xmldoc_parse_cmd_enumlist().
Referenced by _ast_xmldoc_build_syntax(), xmldoc_get_syntax_cmd(), and xmldoc_parse_cmd_enumlist().
| 
 | static | 
Definition at line 1089 of file xmldoc.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strdup, ast_true(), ast_xml_find_element(), ast_xml_free_attr(), ast_xml_free_text(), ast_xml_get_attribute(), ast_xml_get_text(), ast_xml_node_get_children(), match(), NULL, RAII_VAR, S_OR, and text.
Referenced by _ast_xmldoc_build_syntax().
| 
 | static | 
Definition at line 1125 of file xmldoc.c.
References ast_free, ast_str_buffer(), ast_str_create, ast_str_set(), ast_strdup, ast_xml_free_attr(), ast_xml_get_attribute(), name, NULL, RAII_VAR, regex(), and type.
Referenced by _ast_xmldoc_build_syntax().
| 
 | static | 
Definition at line 637 of file xmldoc.c.
References ast_asprintf, ast_free, ast_log, ast_strdup, ast_strdupa, ast_strlen_zero(), ast_true(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), GOTONEXT, ISLAST, len(), LOG_WARNING, MP, NULL, xmldoc_get_syntax_fun(), xmldoc_has_inside(), and xmldoc_reverse_helper().
Referenced by _ast_xmldoc_build_syntax(), xmldoc_get_syntax_fun(), and xmldoc_parse_optionlist().
| 
 | static | 
Definition at line 1037 of file xmldoc.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_str_create, ast_strdup, ast_true(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), name, and NULL.
Referenced by _ast_xmldoc_build_syntax().
| 
 | static | 
Definition at line 1188 of file xmldoc.c.
References ARRAY_LEN, FUNCTION_SYNTAX, strsyntaxtype::stxtype, stxtype, and type.
Referenced by _ast_xmldoc_build_syntax(), and ast_xmldoc_build_documentation().
| 
 | static | 
Definition at line 567 of file xmldoc.c.
References ast_xml_node_get_children(), ast_xml_node_get_name(), and ast_xml_node_get_next().
Referenced by xmldoc_get_syntax_cmd(), xmldoc_get_syntax_fun(), xmldoc_parse_argument(), and xmldoc_parse_parameter().
| 
 | static | 
Definition at line 588 of file xmldoc.c.
References ast_xml_node_get_children(), ast_xml_node_get_name(), and ast_xml_node_get_next().
Referenced by xmldoc_parse_parameter().
| 
 | static | 
Definition at line 609 of file xmldoc.c.
References ARRAY_LEN, ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), and special_tags.
Referenced by xmldoc_parse_argument().
| 
 | static | 
Definition at line 3019 of file xmldoc.c.
References ast_asprintf, ast_calloc, ast_cli_register, ast_config_AST_DATA_DIR, ast_config_destroy(), ast_config_load2(), ast_debug, ast_free, ast_log, ast_malloc, ast_register_cleanup(), AST_RWLIST_INSERT_TAIL, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_strdup, ast_strlen_zero(), ast_variable_browse(), ast_xml_close(), ast_xml_get_root(), ast_xml_init(), ast_xml_node_get_name(), ast_xml_open(), cli_dump_xmldocs, cli_reload_xmldocs, CONFIG_STATUS_FILEINVALID, default_documentation_language, documentation_tree::doc, documentation_language, documentation_tree::filename, GLOB_ABORTED, LOG_ERROR, LOG_WARNING, MY_GLOB_FLAGS, ast_variable::next, NULL, var, xmldoc_purge_documentation(), and xmldoc_unload_documentation().
Referenced by ast_xmldoc_load_documentation(), and xmldoc_reload_documentation().
| 
 | static | 
Definition at line 1477 of file xmldoc.c.
References ast_str_append(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_next(), xmldoc_has_inside(), xmldoc_has_specialtags(), and xmldoc_parse_common_elements().
Referenced by xmldoc_parse_option(), and xmldoc_parse_parameter().
| 
 | static | 
Definition at line 881 of file xmldoc.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_str_create, ast_strdup, ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), first, and xmldoc_get_syntax_cmd().
Referenced by xmldoc_get_syntax_cmd().
| 
 | static | 
Definition at line 1285 of file xmldoc.c.
References xmldoc_parse_info(), xmldoc_parse_para(), and xmldoc_parse_specialtags().
Referenced by xmldoc_get_formatted(), xmldoc_parse_argument(), xmldoc_parse_enum(), xmldoc_parse_info(), xmldoc_parse_option(), xmldoc_parse_variable(), and xmldoc_parse_variablelist().
| 
 | static | 
Definition at line 1826 of file xmldoc.c.
References ast_asprintf, ast_free, ast_xml_node_get_children(), ast_xml_node_get_next(), xmldoc_parse_common_elements(), xmldoc_parse_enumlist(), and xmldoc_parse_parameter().
Referenced by xmldoc_parse_enumlist().
| 
 | static | 
Definition at line 1861 of file xmldoc.c.
References ast_str_append(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), and xmldoc_parse_enum().
Referenced by xmldoc_get_formatted(), xmldoc_parse_enum(), xmldoc_parse_info(), xmldoc_parse_option(), and xmldoc_parse_parameter().
| 
 | static | 
Definition at line 1362 of file xmldoc.c.
References ast_free, ast_skip_blanks(), ast_str_append(), ast_str_buffer(), ast_xml_free_attr(), ast_xml_free_text(), ast_xml_get_attribute(), ast_xml_get_text(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), and xmldoc_string_cleanup().
Referenced by xmldoc_parse_specialtags().
| 
 | static | 
Definition at line 2080 of file xmldoc.c.
References ast_asprintf, ast_free, ast_str_append(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), xmldoc_parse_common_elements(), xmldoc_parse_enumlist(), and xmldoc_parse_parameter().
Referenced by xmldoc_parse_common_elements(), xmldoc_parse_parameter(), and xmldoc_parse_specialtags().
| 
 | static | 
Definition at line 1900 of file xmldoc.c.
References ast_asprintf, ast_free, ast_str_append(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), NULL, xmldoc_parse_argument(), xmldoc_parse_common_elements(), xmldoc_parse_enumlist(), and xmldoc_parse_variablelist().
Referenced by xmldoc_parse_optionlist().
| 
 | static | 
Definition at line 1944 of file xmldoc.c.
References ast_free, ast_str_append(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), xmldoc_get_syntax_fun(), and xmldoc_parse_option().
Referenced by xmldoc_parse_parameter().
| 
 | static | 
Definition at line 1307 of file xmldoc.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_xml_free_text(), ast_xml_get_text(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), and xmldoc_string_cleanup().
Referenced by xmldoc_parse_common_elements(), xmldoc_parse_parameter(), and xmldoc_parse_specialtags().
| 
 | static | 
Definition at line 1997 of file xmldoc.c.
References ast_asprintf, ast_free, ast_str_append(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), xmldoc_has_inside(), xmldoc_has_nodes(), xmldoc_parse_argument(), xmldoc_parse_enumlist(), xmldoc_parse_info(), xmldoc_parse_optionlist(), xmldoc_parse_para(), and xmldoc_parse_specialtags().
Referenced by _ast_xmldoc_build_arguments(), xmldoc_parse_enum(), and xmldoc_parse_info().
| 
 | static | 
Definition at line 1418 of file xmldoc.c.
References ARRAY_LEN, ast_str_append(), ast_strlen_zero(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), end, special_tags, xmldoc_parse_example(), xmldoc_parse_info(), and xmldoc_parse_para().
Referenced by xmldoc_get_formatted(), xmldoc_parse_common_elements(), and xmldoc_parse_parameter().
| 
 | static | 
Definition at line 1526 of file xmldoc.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_str_strlen(), ast_xml_free_attr(), ast_xml_free_text(), ast_xml_get_attribute(), ast_xml_get_text(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), xmldoc_parse_common_elements(), and xmldoc_string_cleanup().
Referenced by xmldoc_parse_variablelist().
| 
 | static | 
Definition at line 1587 of file xmldoc.c.
References ast_asprintf, ast_free, ast_str_append(), ast_xml_free_attr(), ast_xml_get_attribute(), ast_xml_node_get_children(), ast_xml_node_get_name(), ast_xml_node_get_next(), xmldoc_parse_common_elements(), and xmldoc_parse_variable().
Referenced by xmldoc_get_formatted(), and xmldoc_parse_option().
| 
 | static | 
Definition at line 119 of file xmldoc.c.
Referenced by xmldoc_string_wrap().
| 
 | static | 
Definition at line 2995 of file xmldoc.c.
References ast_free, AST_RWLIST_REMOVE_HEAD, ast_xml_close(), documentation_tree::doc, documentation_tree::entry, and documentation_tree::filename.
Referenced by xmldoc_load_documentation(), and xmldoc_unload_documentation().
| 
 | static | 
Definition at line 3151 of file xmldoc.c.
References xmldoc_load_documentation().
Referenced by handle_reload_docs().
| 
 | static | 
Definition at line 515 of file xmldoc.c.
References ast_free, ast_realloc, ast_vasprintf, and len().
Referenced by xmldoc_get_syntax_fun().
| 
 | static | 
| 
 | static | 
Definition at line 360 of file xmldoc.c.
References ast_log, ast_str_append(), ast_str_create, ast_str_trim_blanks(), LOG_ERROR, NULL, and text.
Referenced by xmldoc_get_formatted(), xmldoc_parse_example(), xmldoc_parse_para(), and xmldoc_parse_variable().
| 
 | static | 
Definition at line 175 of file xmldoc.c.
References ast_free, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_truncate(), ast_strdup, ESC, LOG_WARNING, NULL, text, xmldoc_postbrlen(), and xmldoc_setpostbr().
Referenced by ast_xmldoc_printable().
| 
 | static | 
Close and unload XML documentation.
Definition at line 3007 of file xmldoc.c.
References ast_cli_unregister(), AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_xml_finish(), cli_dump_xmldocs, cli_reload_xmldocs, and xmldoc_purge_documentation().
Referenced by xmldoc_load_documentation().
| 
 | static | 
Definition at line 2989 of file xmldoc.c.
Referenced by xmldoc_load_documentation(), and xmldoc_unload_documentation().
| 
 | static | 
Definition at line 2992 of file xmldoc.c.
Referenced by xmldoc_load_documentation(), and xmldoc_unload_documentation().
| 
 | static | 
Referenced by ast_xmldoc_printable().
| 
 | static | 
Default documentation language.
Definition at line 44 of file xmldoc.c.
Referenced by xmldoc_load_documentation().
| 
 | static | 
XML documentation language.
Definition at line 51 of file xmldoc.c.
Referenced by ast_xmldoc_build_arguments(), ast_xmldoc_build_final_response(), ast_xmldoc_build_list_responses(), ast_xmldoc_build_seealso(), ast_xmldoc_build_since(), ast_xmldoc_build_syntax(), xmldoc_build_field(), and xmldoc_load_documentation().
| 
 | static | 
Referenced by xmldoc_has_specialtags(), and xmldoc_parse_specialtags().
| 
 | static | 
Referenced by xmldoc_get_syntax_type().
| 
 | static | 
Number of columns to print when showing the XML documentation with a 'core show application/function *' CLI command. Used in text wrapping.
Definition at line 48 of file xmldoc.c.
Referenced by ast_xmldoc_printable().
| 
 | static |