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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 9 10:31:50 CDT 2008


Author: eliel
Date: Thu Oct  9 10:31:50 2008
New Revision: 147836

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147836
Log:
Introduce WaitUntil() application XML documentation.
Patch by: snuffy (snuff-home, snuff-work) <- Thanks for all the work!
(minor changes by me)

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

Modified: team/group/appdocsxml/apps/app_waituntil.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_waituntil.c?view=diff&rev=147836&r1=147835&r2=147836
==============================================================================
--- team/group/appdocsxml/apps/app_waituntil.c (original)
+++ team/group/appdocsxml/apps/app_waituntil.c Thu Oct  9 10:31:50 2008
@@ -34,15 +34,38 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 
+/*** DOCUMENTATION
+	<application name="WaitUntil" language="en_US">
+		<synopsis>
+			Wait (sleep) until the current time is the given epoch.
+		</synopsis>
+		<syntax>
+			<parameter name="epoch" required="true" />
+		</syntax>
+		<description>
+			<para>Waits until the given <replaceable>epoch</replaceable>.</para>
+			<para>Sets <variable>WAITUNTILSTATUS</variable> to one of the following values:</para>
+			<variablelist>
+				<variable name="WAITUNTILSTATUS">
+					<value name="OK">
+						Wait succeeded.
+					</value>
+					<value name="FAILURE">
+						Invalid argument.
+					</value>
+					<value name="HANGUP">
+						Channel hungup before time elapsed.
+					</value>
+					<value name="PAST">
+						Time specified had already past.
+					</value>
+				</variable>
+			</variablelist>
+		</description>
+	</application>
+ ***/
+
 static char *app = "WaitUntil";
-static char *synopsis = "Wait (sleep) until the current time is the given epoch";
-static char *descrip =
-"  WaitUntil(<epoch>): Waits until the given time.  Sets WAITUNTILSTATUS to\n"
-"one of the following values:\n"
-"  OK       Wait succeeded\n"
-"  FAILURE  Invalid argument\n"
-"  HANGUP   Channel hung up before time elapsed\n"
-"  PAST     The time specified was already past\n";
 
 static int waituntil_exec(struct ast_channel *chan, void *data)
 {
@@ -89,7 +112,7 @@
 
 static int load_module(void)
 {
-	return ast_register_application(app, waituntil_exec, synopsis, descrip);
+	return ast_register_application_xml(app, waituntil_exec);
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Wait until specified time");




More information about the asterisk-commits mailing list