summaryrefslogtreecommitdiff
path: root/apps/app_userevent.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-11-01 21:10:07 +0000
committerRussell Bryant <russell@russellbryant.com>2008-11-01 21:10:07 +0000
commit5b168ee34babe562be856ec8f1dd14c0abd7c1a5 (patch)
tree9c836ac808552d20be6bd2baa3a3c29f642eda53 /apps/app_userevent.c
parent1fef0f63bbbde9530837995c8790b839f73b74e7 (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 'apps/app_userevent.c')
-rw-r--r--apps/app_userevent.c40
1 files changed, 25 insertions, 15 deletions
diff --git a/apps/app_userevent.c b/apps/app_userevent.c
index 91d067d54..6d6354af6 100644
--- a/apps/app_userevent.c
+++ b/apps/app_userevent.c
@@ -30,21 +30,31 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/manager.h"
#include "asterisk/app.h"
-static char *app = "UserEvent";
-
-static char *synopsis = "Send an arbitrary event to the manager interface";
-
-static char *descrip =
-" UserEvent(eventname[,body]): Sends an arbitrary event to the manager\n"
-"interface, with an optional body representing additional arguments. The\n"
-"body may be specified as a | delimeted list of headers. Each additional\n"
-"argument will be placed on a new line in the event. The format of the\n"
-"event will be:\n"
-" Event: UserEvent\n"
-" UserEvent: <specified event name>\n"
-" [body]\n"
-"If no body is specified, only Event and UserEvent headers will be present.\n";
+/*** DOCUMENTATION
+ <application name="UserEvent" language="en_US">
+ <synopsis>
+ Send an arbitrary event to the manager interface.
+ </synopsis>
+ <syntax>
+ <parameter name="eventname" required="true" />
+ <parameter name="body" />
+ </syntax>
+ <description>
+ <para>Sends an arbitrary event to the manager interface, with an optional
+ <replaceable>body</replaceable> representing additional arguments. The
+ <replaceable>body</replaceable> may be specified as
+ a <literal>|</literal> delimeted list of headers. Each additional
+ argument will be placed on a new line in the event. The format of the
+ event will be:</para>
+ <para> Event: UserEvent</para>
+ <para> UserEvent: &lt;specified event name&gt;</para>
+ <para> [body]</para>
+ <para>If no <replaceable>body</replaceable> is specified, only Event and UserEvent headers will be present.</para>
+ </description>
+ </application>
+ ***/
+static char *app = "UserEvent";
static int userevent_exec(struct ast_channel *chan, void *data)
{
@@ -83,7 +93,7 @@ static int unload_module(void)
static int load_module(void)
{
- return ast_register_application(app, userevent_exec, synopsis, descrip);
+ return ast_register_application_xml(app, userevent_exec);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Custom User Event Application");