summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/manager.h16
-rw-r--r--include/asterisk/pbx.h7
-rw-r--r--include/asterisk/xmldoc.h7
3 files changed, 20 insertions, 10 deletions
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index d9e33e538..33eb52c04 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -22,6 +22,7 @@
#include "asterisk/network.h"
#include "asterisk/lock.h"
#include "asterisk/datastore.h"
+#include "asterisk/xmldoc.h"
/*!
\file
@@ -116,14 +117,19 @@ struct message {
struct manager_action {
/*! Name of the action */
const char *action;
- /*! Short description of the action */
- const char *synopsis;
- /*! Detailed description of the action */
- const char *description;
+ AST_DECLARE_STRING_FIELDS(
+ AST_STRING_FIELD(synopsis); /*!< Synopsis text (short description). */
+ AST_STRING_FIELD(description); /*!< Description (help text) */
+ AST_STRING_FIELD(syntax); /*!< Syntax text */
+ AST_STRING_FIELD(arguments); /*!< Description of each argument. */
+ AST_STRING_FIELD(seealso); /*!< See also */
+ );
/*! Permission required for action. EVENT_FLAG_* */
int authority;
/*! Function to be called */
int (*func)(struct mansession *s, const struct message *m);
+ /*! Where the documentation come from. */
+ enum ast_doc_src docsrc;
/*! For easy linking */
AST_RWLIST_ENTRY(manager_action) list;
};
@@ -132,6 +138,8 @@ struct manager_action {
* \note Use ast_manager_register2() to register with help text for new manager commands */
#define ast_manager_register(a, b, c, d) ast_manager_register2(a, b, c, d, NULL)
+/*! \brief Register a manager callback using XML documentation to describe the manager. */
+#define ast_manager_register_xml(a, b, c) ast_manager_register2(a, b, c, NULL, NULL)
/*! \brief Register a manager command with the manager interface
\param action Name of the requested Action:
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index c2f999eb6..d086416d8 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -27,6 +27,7 @@
#include "asterisk/chanvars.h"
#include "asterisk/hashtab.h"
#include "asterisk/stringfields.h"
+#include "asterisk/xmldoc.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -73,12 +74,6 @@ 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 */
diff --git a/include/asterisk/xmldoc.h b/include/asterisk/xmldoc.h
index d781e8043..c876b46da 100644
--- a/include/asterisk/xmldoc.h
+++ b/include/asterisk/xmldoc.h
@@ -23,6 +23,13 @@
#include "asterisk/xml.h"
+/*! \brief From where the documentation come from, this structure is useful for
+ * use it inside application/functions/manager actions structure. */
+enum ast_doc_src {
+ AST_XML_DOC, /*!< From XML documentation */
+ AST_STATIC_DOC /*!< From application/function registration */
+};
+
#ifdef AST_XML_DOCS
/*!