[asterisk-commits] mjordan: branch mjordan/manager-events r368558 - in /team/mjordan/manager-eve...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 5 16:21:06 CDT 2012
Author: mjordan
Date: Tue Jun 5 16:21:01 2012
New Revision: 368558
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=368558
Log:
General cleanup
Fixing the obvious errors (blobs, documentation, etc.)
Modified:
team/mjordan/manager-events/Makefile
team/mjordan/manager-events/build_tools/post_process_documentation.py
team/mjordan/manager-events/include/asterisk/xmldoc.h
team/mjordan/manager-events/main/manager.c
team/mjordan/manager-events/main/xmldoc.c
Modified: team/mjordan/manager-events/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/Makefile?view=diff&rev=368558&r1=368557&r2=368558
==============================================================================
--- team/mjordan/manager-events/Makefile (original)
+++ team/mjordan/manager-events/Makefile Tue Jun 5 16:21:01 2012
@@ -470,7 +470,6 @@
$(MAKE) -C sounds install
doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
-
@printf "Building Documentation For: "
@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
Modified: team/mjordan/manager-events/build_tools/post_process_documentation.py
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/build_tools/post_process_documentation.py?view=diff&rev=368558&r1=368557&r2=368558
==============================================================================
--- team/mjordan/manager-events/build_tools/post_process_documentation.py (original)
+++ team/mjordan/manager-events/build_tools/post_process_documentation.py Tue Jun 5 16:21:01 2012
@@ -31,7 +31,7 @@
other_parameters = other.getElementsByTagName("parameter")
match = [p for p in other_parameters if p.getAttribute('name') == parameter.getAttribute('name')]
if (match):
- # See who has the better documentation and use it,
+ # See who has the better documentation and use it
if (parameter.hasChildNodes()):
match[0].parentNode.replaceChild(parameter.cloneNode(True), match[0])
elif (match[0].hasChildNodes()):
Modified: team/mjordan/manager-events/include/asterisk/xmldoc.h
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/include/asterisk/xmldoc.h?view=diff&rev=368558&r1=368557&r2=368558
==============================================================================
--- team/mjordan/manager-events/include/asterisk/xmldoc.h (original)
+++ team/mjordan/manager-events/include/asterisk/xmldoc.h Tue Jun 5 16:21:01 2012
@@ -31,10 +31,6 @@
AST_XML_DOC, /*!< From XML documentation */
AST_STATIC_DOC /*!< From application/function registration */
};
-
-#ifndef AST_XML_DOCS
-#define AST_XML_DOCS 1
-#endif
#ifdef AST_XML_DOCS
Modified: team/mjordan/manager-events/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/main/manager.c?view=diff&rev=368558&r1=368557&r2=368558
==============================================================================
--- team/mjordan/manager-events/main/manager.c (original)
+++ team/mjordan/manager-events/main/manager.c Tue Jun 5 16:21:01 2012
@@ -6869,7 +6869,6 @@
" Provides a detailed description a Manager interface event.\n";
return NULL;
case CLI_GENERATE:
- /* TODO: GENERATE NAME */
return NULL;
}
if (a->argc != 4) {
@@ -6986,7 +6985,9 @@
static int __init_manager(int reload)
{
struct ast_config *ucfg = NULL, *cfg = NULL;
+#ifdef AST_XML_DOCS
struct ao2_container *temp_event_docs;
+#endif
const char *val;
char *cat = NULL;
int newhttptimeout = 60;
Modified: team/mjordan/manager-events/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/main/xmldoc.c?view=diff&rev=368558&r1=368557&r2=368558
==============================================================================
--- team/mjordan/manager-events/main/xmldoc.c (original)
+++ team/mjordan/manager-events/main/xmldoc.c Tue Jun 5 16:21:01 2012
@@ -34,10 +34,6 @@
#include "asterisk/term.h"
#include "asterisk/astobj2.h"
#include "asterisk/xmldoc.h"
-
-#ifndef AST_XML_DOCS
-#define AST_XML_DOCS 1
-#endif
#ifdef AST_XML_DOCS
@@ -1116,11 +1112,11 @@
const char *type;
enum syntaxtype stxtype;
} stxtype[] = {
- { "function", FUNCTION_SYNTAX },
- { "application", FUNCTION_SYNTAX },
- { "manager", MANAGER_SYNTAX },
+ { "function", FUNCTION_SYNTAX },
+ { "application", FUNCTION_SYNTAX },
+ { "manager", MANAGER_SYNTAX },
{ "managerEvent", MANAGER_EVENT_SYNTAX },
- { "agi", COMMAND_SYNTAX }
+ { "agi", COMMAND_SYNTAX }
};
/*! \internal
@@ -1140,6 +1136,21 @@
return FUNCTION_SYNTAX;
}
+/*!
+ * \internal
+ * \brief Build syntax information for an item
+ * \param node The syntax node to parse
+ * \param type The source type
+ * \param name The name of the item that the syntax describes
+ *
+ * \note This method exists for when you already have the node. This
+ * prevents having to lock the documentation tree twice
+ *
+ * \returns A malloc'd character pointer to the syntax of the item
+ * \returns NULL on failure
+ *
+ * \since 11
+ */
static char *_ast_xmldoc_build_syntax(struct ast_xml_node *node, const char *type, const char *name)
{
char *syntax = NULL;
@@ -1458,6 +1469,19 @@
return ret;
}
+/*!
+ * \internal
+ * \brief Build seealso information for an item
+ * \param node The seealso node to parse
+ *
+ * \note This method exists for when you already have the node. This
+ * prevents having to lock the documentation tree twice
+ *
+ * \returns A malloc'd character pointer to the seealso information of the item
+ * \returns NULL on failure
+ *
+ * \since 11
+ */
static char *_ast_xmldoc_build_seealso(struct ast_xml_node *node)
{
char *output;
@@ -1515,7 +1539,6 @@
}
output = ast_strdup(ast_str_buffer(outputstr));
- ast_log(AST_LOG_NOTICE, "%s\n", output);
ast_free(outputstr);
return output;
@@ -1767,6 +1790,19 @@
ast_free(internaltabs);
}
+/*!
+ * \internal
+ * \brief Build the arguments for an item
+ * \param node The arguments node to parse
+ *
+ * \note This method exists for when you already have the node. This
+ * prevents having to lock the documentation tree twice
+ *
+ * \returns A malloc'd character pointer to the arguments for the item
+ * \returns NULL on failure
+ *
+ * \since 11
+ */
static char *_ast_xmldoc_build_arguments(struct ast_xml_node *node)
{
char *retstr = NULL;
@@ -1872,6 +1908,7 @@
* \param raw Field only contains text, no other elements inside it.
* \retval NULL On error.
* \retval Field text content on success.
+ * \since 11
*/
static char *_xmldoc_build_field(struct ast_xml_node *node, const char *var, int raw)
{
@@ -1922,6 +1959,17 @@
return _xmldoc_build_field(node, var, raw);
}
+/* \internal
+ * \brief Build the synopsis for an item
+ * \param node The synopsis node
+ *
+ * \note This method exists for when you already have the node. This
+ * prevents having to lock the documentation tree twice
+ *
+ * \returns A malloc'd character pointer to the synopsis information
+ * \returns NULL on failure
+ * \since 11
+ */
static char *_ast_xmldoc_build_synopsis(struct ast_xml_node *node)
{
return _xmldoc_build_field(node, "synopsis", 1);
@@ -1932,6 +1980,18 @@
return xmldoc_build_field(type, name, module, "synopsis", 1);
}
+/*!
+ * \internal
+ * \brief Build the descripton for an item
+ * \param node The description node to parse
+ *
+ * \note This method exists for when you already have the node. This
+ * prevents having to lock the documentation tree twice
+ *
+ * \returns A malloc'd character pointer to the arguments for the item
+ * \returns NULL on failure
+ * \since 11
+ */
static char *_ast_xmldoc_build_description(struct ast_xml_node *node)
{
return _xmldoc_build_field(node, "description", 0);
@@ -1942,6 +2002,9 @@
return xmldoc_build_field(type, name, module, "description", 0);
}
+/*! \internal \brief ast_xml_doc_item ao2 destructor
+ * \since 11
+ */
static void ast_xml_doc_item_destructor(void *obj)
{
struct ast_xml_doc_item *doc = obj;
@@ -1963,6 +2026,12 @@
}
}
+/*! \internal
+ * \brief Create an ao2 ref counted ast_xml_doc_item
+ * \param name The name of the item
+ * \param type The item's source type
+ * \since 11
+ */
static struct ast_xml_doc_item *ast_xml_doc_item_alloc(const char *name, const char *type)
{
struct ast_xml_doc_item *item;
@@ -1995,6 +2064,10 @@
return NULL;
}
+/*! \internal
+ * \brief ao2 item hash function for ast_xml_doc_item
+ * \since 11
+ */
static int ast_xml_doc_item_hash(const void *obj, const int flags)
{
const struct ast_xml_doc_item *item = obj;
@@ -2002,6 +2075,10 @@
return ast_str_case_hash(name);
}
+/*! \internal
+ * \brief ao2 item comparison function for ast_xml_doc_item
+ * \since 11
+ */
static int ast_xml_doc_item_cmp(void *obj, void *arg, int flags)
{
struct ast_xml_doc_item *left = obj;
@@ -2010,6 +2087,16 @@
return strcasecmp(left->name, match) ? 0 : (CMP_MATCH | CMP_STOP);
}
+/* \internal
+ * \brief Build an XML documentation item
+ * \param node The root node for the item
+ * \param name The name of the item
+ * \param type The item's source type
+ *
+ * \returns NULL on failure
+ * \returns An ao2 ref counted object
+ * \since 11
+ */
static struct ast_xml_doc_item *xmldoc_build_documentation_item(struct ast_xml_node *node, const char *name, const char *type)
{
struct ast_xml_doc_item *item;
More information about the asterisk-commits
mailing list