[svn-commits] eliel: branch group/appdocsxml r145327 - /team/group/appdocsxml/apps/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 1 07:03:34 CDT 2008


Author: eliel
Date: Wed Oct  1 07:03:34 2008
New Revision: 145327

URL: http://svn.digium.com/view/asterisk?view=rev&rev=145327
Log:
Introduce SayUnixTime and DateTime XML documentation.

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

Modified: team/group/appdocsxml/apps/app_sayunixtime.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_sayunixtime.c?view=diff&rev=145327&r1=145326&r2=145327
==============================================================================
--- team/group/appdocsxml/apps/app_sayunixtime.c (original)
+++ team/group/appdocsxml/apps/app_sayunixtime.c Wed Oct  1 07:03:34 2008
@@ -36,28 +36,53 @@
 #include "asterisk/say.h"
 #include "asterisk/app.h"
 
+/*** DOCUMENTATION
+	<application name="SayUnixTime" language="en_US">
+		<synopsis>
+			Says a specified time in a custom format.
+		</synopsis>
+		<syntax>
+			<parameter name="unixtime">
+				<para>time, in seconds since Jan 1, 1970.  May be negative. Defaults to now.</para>
+			</parameter>
+			<parameter name="timezone">
+				<para>timezone, see <directory>/usr/share/zoneinfo</directory> for a list. Defaults to machine default.</para>
+			</parameter>
+			<parameter name="format">
+				<para>a format the time is to be said in.  See <filename>voicemail.conf</filename>.
+				Defaults to <literal>ABdY "digits/at" IMp</literal></para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>Uses some of the sound files stored in <directory>/var/lib/asterisk/sounds</directory> to construct a phrase 
+			saying the specified date and/or time in the specified format. </para>
+		</description>
+	</application>
+	<application name="DateTime" language="en_US">
+		<synopsis>
+			Says a specified time in a custom format.
+		</synopsis>
+		<syntax>
+			<parameter name="unixtime">
+				<para>time, in seconds since Jan 1, 1970.  May be negative. Defaults to now.</para>
+			</parameter>
+			<parameter name="timezone">
+				<para>timezone, see <filename>/usr/share/zoneinfo</filename> for a list. Defaults to machine default.</para>
+			</parameter>
+			<parameter name="format">
+				<para>a format the time is to be said in.  See <filename>voicemail.conf</filename>.
+				Defaults to <literal>ABdY "digits/at" IMp</literal></para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>Say the date and time in a specified format.</para>
+		</description>
+	</application>
+
+ ***/
+
 static char *app_sayunixtime = "SayUnixTime";
 static char *app_datetime = "DateTime";
-
-static char *sayunixtime_synopsis = "Says a specified time in a custom format";
-
-static char *sayunixtime_descrip =
-"SayUnixTime([unixtime][,[timezone][,format]])\n"
-"  unixtime  - time, in seconds since Jan 1, 1970.  May be negative.\n"
-"              defaults to now.\n"
-"  timezone  - timezone, see /usr/share/zoneinfo for a list.\n"
-"              defaults to machine default.\n"
-"  format    - a format the time is to be said in.  See voicemail.conf.\n"
-"              defaults to \"ABdY 'digits/at' IMp\"\n";
-static char *datetime_descrip =
-"DateTime([unixtime][,[timezone][,format]])\n"
-"  unixtime  - time, in seconds since Jan 1, 1970.  May be negative.\n"
-"              defaults to now.\n"
-"  timezone  - timezone, see /usr/share/zoneinfo for a list.\n"
-"              defaults to machine default.\n"
-"  format:   - a format the time is to be said in.  See voicemail.conf.\n"
-"              defaults to \"ABdY 'digits/at' IMp\"\n";
-
 
 static int sayunixtime_exec(struct ast_channel *chan, void *data)
 {
@@ -103,8 +128,8 @@
 {
 	int res;
 	
-	res = ast_register_application(app_sayunixtime, sayunixtime_exec, sayunixtime_synopsis, sayunixtime_descrip);
-	res |= ast_register_application(app_datetime, sayunixtime_exec, sayunixtime_synopsis, datetime_descrip);
+	res = ast_register_application_xml(app_sayunixtime, sayunixtime_exec);
+	res |= ast_register_application_xml(app_datetime, sayunixtime_exec);
 	
 	return res;
 }




More information about the svn-commits mailing list