diff options
author | Russell Bryant <russell@russellbryant.com> | 2008-11-01 21:10:07 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2008-11-01 21:10:07 +0000 |
commit | 5b168ee34babe562be856ec8f1dd14c0abd7c1a5 (patch) | |
tree | 9c836ac808552d20be6bd2baa3a3c29f642eda53 /include/asterisk/pbx.h | |
parent | 1fef0f63bbbde9530837995c8790b839f73b74e7 (diff) |
Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format. Currently, a new format is available for
applications and dialplan functions. A good number of conversions to the new format
are also included.
For more information, see the following message to asterisk-dev:
http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/pbx.h')
-rw-r--r-- | include/asterisk/pbx.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index d2d95acca..3348bb8d7 100644 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -26,6 +26,7 @@ #include "asterisk/sched.h" #include "asterisk/chanvars.h" #include "asterisk/hashtab.h" +#include "asterisk/stringfields.h" #if defined(__cplusplus) || defined(c_plusplus) extern "C" { @@ -73,12 +74,23 @@ struct ast_sw; /*! \brief Typedef for devicestate and hint callbacks */ typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data); +/*! \brief From where the documentation come from */ +enum ast_doc_src { + AST_XML_DOC, /*!< From XML documentation */ + AST_STATIC_DOC /*!< From application/function registration */ +}; + /*! \brief Data structure associated with a custom dialplan function */ struct ast_custom_function { - const char *name; /*!< Name */ - const char *synopsis; /*!< Short description for "show functions" */ - const char *desc; /*!< Help text that explains it all */ - const char *syntax; /*!< Syntax description */ + const char *name; /*!< Name */ + AST_DECLARE_STRING_FIELDS( + AST_STRING_FIELD(synopsis); /*!< Synopsis text for 'show functions' */ + AST_STRING_FIELD(desc); /*!< Description (help text) for 'show functions <name>' */ + AST_STRING_FIELD(syntax); /*!< Syntax text for 'core show functions' */ + AST_STRING_FIELD(arguments); /*!< Arguments description */ + AST_STRING_FIELD(seealso); /*!< See also */ + ); + enum ast_doc_src docsrc; /*!< Where the documentation come from */ int (*read)(struct ast_channel *, const char *, char *, char *, size_t); /*!< Read function, if read is supported */ int (*write)(struct ast_channel *, const char *, char *, const char *); /*!< Write function, if write is supported */ struct ast_module *mod; /*!< Module this custom function belongs to */ |