Mon Jun 27 16:50:57 2011

Asterisk developer's documentation


xmldoc.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 2008, Eliel C. Sardanons (LU1ALY) <eliels@gmail.com>
00005  *
00006  * See http://www.asterisk.org for more information about
00007  * the Asterisk project. Please do not directly contact
00008  * any of the maintainers of this project for assistance;
00009  * the project provides a web site, mailing lists and IRC
00010  * channels for your use.
00011  *
00012  * This program is free software, distributed under the terms of
00013  * the GNU General Public License Version 2. See the LICENSE file
00014  * at the top of the source tree.
00015  */
00016 
00017 #ifndef _ASTERISK_XMLDOC_H
00018 #define _ASTERISK_XMLDOC_H
00019 
00020 /*! \file
00021  *  \brief Asterisk XML Documentation API
00022  */
00023 
00024 #include "asterisk/xml.h"
00025 
00026 /*! \brief From where the documentation come from, this structure is useful for
00027  *  use it inside application/functions/manager actions structure. */
00028 enum ast_doc_src {
00029    AST_XML_DOC,            /*!< From XML documentation */
00030    AST_STATIC_DOC          /*!< From application/function registration */
00031 };
00032 
00033 #ifdef AST_XML_DOCS
00034 
00035 /*!
00036  *  \brief Get the syntax for a specified application or function.
00037  *  \param type Application, Function or AGI ?
00038  *  \param name Name of the application or function.
00039  *  \retval NULL on error.
00040  *  \retval The generated syntax in a ast_malloc'ed string.
00041  */
00042 char *ast_xmldoc_build_syntax(const char *type, const char *name);
00043 
00044 /*!
00045  *  \brief Parse the <see-also> node content.
00046  *  \param type 'application', 'function' or 'agi'.
00047  *  \param name Application or functions name.
00048  *  \retval NULL on error.
00049  *  \retval Content of the see-also node.
00050  */
00051 char *ast_xmldoc_build_seealso(const char *type, const char *name);
00052 
00053 /*!
00054  *  \brief Generate the [arguments] tag based on type of node ('application',
00055  *         'function' or 'agi') and name.
00056  *  \param type 'application', 'function' or 'agi' ?
00057  *  \param name Name of the application or function to build the 'arguments' tag.
00058  *  \retval NULL on error.
00059  *  \retval Output buffer with the [arguments] tag content.
00060  */
00061 char *ast_xmldoc_build_arguments(const char *type, const char *name);
00062 
00063 /*!
00064  *  \brief Colorize and put delimiters (instead of tags) to the xmldoc output.
00065  *  \param bwinput Not colorized input with tags.
00066  *  \param withcolors Result output with colors.
00067  *  \retval NULL on error.
00068  *  \retval New malloced buffer colorized and with delimiters.
00069  */
00070 char *ast_xmldoc_printable(const char *bwinput, int withcolors);
00071 
00072 /*!
00073  *  \brief Generate synopsis documentation from XML.
00074  *  \param type The source of documentation (application, function, etc).
00075  *  \param name The name of the application, function, etc.
00076  *  \retval NULL on error.
00077  *  \retval A malloc'ed string with the synopsis.
00078  */
00079 char *ast_xmldoc_build_synopsis(const char *type, const char *name);
00080 
00081 /*!
00082  *  \brief Generate description documentation from XML.
00083  *  \param type The source of documentation (application, function, etc).
00084  *  \param name The name of the application, function, etc.
00085  *  \retval NULL on error.
00086  *  \retval A malloc'ed string with the formatted description.
00087  */
00088 char *ast_xmldoc_build_description(const char *type, const char *name);
00089 
00090 #endif /* AST_XML_DOCS */
00091 
00092 #endif /* _ASTERISK_XMLDOC_H */

Generated on Mon Jun 27 16:50:57 2011 for Asterisk - The Open Source Telephony Project by  doxygen 1.4.7