mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -30,22 +30,32 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/manager.h"
|
||||
#include "asterisk/app.h"
|
||||
|
||||
/*** 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: <specified event name></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 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";
|
||||
|
||||
|
||||
static int userevent_exec(struct ast_channel *chan, void *data)
|
||||
{
|
||||
char *parse, buf[2048] = "";
|
||||
@@ -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");
|
||||
|
Reference in New Issue
Block a user