Load the proper XML documentation when multiple modules document the same application.

This patch adds an optional "module" attribute to the XML documentation spec
that allows the documentation processor to match apps with identical names from
different modules to their documentation. This patch also fixes a number of
bugs with the documentation processor and should make it a little more
efficient. Support for multiple languages has also been properly implemented.

ASTERISK-18130
Review: https://reviewboard.asterisk.org/r/1485/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@340108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Nicholson
2011-10-10 14:14:48 +00:00
parent 5e05620bb7
commit de9e8e501e
10 changed files with 140 additions and 66 deletions

View File

@@ -3129,10 +3129,10 @@ int AST_OPTIONAL_API_NAME(ast_agi_register)(struct ast_module *mod, agi_command
*((enum ast_doc_src *) &cmd->docsrc) = AST_STATIC_DOC;
if (ast_strlen_zero(cmd->summary) && ast_strlen_zero(cmd->usage)) {
#ifdef AST_XML_DOCS
*((char **) &cmd->summary) = ast_xmldoc_build_synopsis("agi", fullcmd);
*((char **) &cmd->usage) = ast_xmldoc_build_description("agi", fullcmd);
*((char **) &cmd->syntax) = ast_xmldoc_build_syntax("agi", fullcmd);
*((char **) &cmd->seealso) = ast_xmldoc_build_seealso("agi", fullcmd);
*((char **) &cmd->summary) = ast_xmldoc_build_synopsis("agi", fullcmd, NULL);
*((char **) &cmd->usage) = ast_xmldoc_build_description("agi", fullcmd, NULL);
*((char **) &cmd->syntax) = ast_xmldoc_build_syntax("agi", fullcmd, NULL);
*((char **) &cmd->seealso) = ast_xmldoc_build_seealso("agi", fullcmd, NULL);
*((enum ast_doc_src *) &cmd->docsrc) = AST_XML_DOC;
#endif
#ifndef HAVE_NULLSAFE_PRINTF