[asterisk-commits] eliel: branch group/appdocsxml r147098 - /team/group/appdocsxml/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 7 09:40:27 CDT 2008


Author: eliel
Date: Tue Oct  7 09:40:27 2008
New Revision: 147098

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147098
Log:
Introduce UserEvent() application XML documentation.

Modified:
    team/group/appdocsxml/apps/app_userevent.c

Modified: team/group/appdocsxml/apps/app_userevent.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_userevent.c?view=diff&rev=147098&r1=147097&r2=147098
==============================================================================
--- team/group/appdocsxml/apps/app_userevent.c (original)
+++ team/group/appdocsxml/apps/app_userevent.c Tue Oct  7 09:40:27 2008
@@ -30,21 +30,31 @@
 #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: &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 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)
 {
@@ -83,7 +93,7 @@
 
 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");




More information about the asterisk-commits mailing list