[asterisk-commits] mvanbaak: branch group/appdocsxml r143398 - /team/group/appdocsxml/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 17 14:50:32 CDT 2008


Author: mvanbaak
Date: Wed Sep 17 14:50:32 2008
New Revision: 143398

URL: http://svn.digium.com/view/asterisk?view=rev&rev=143398
Log:
move 3 applications over to the new xml documentation format

Modified:
    team/group/appdocsxml/apps/app_adsiprog.c
    team/group/appdocsxml/apps/app_alarmreceiver.c
    team/group/appdocsxml/apps/app_authenticate.c

Modified: team/group/appdocsxml/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_adsiprog.c?view=diff&rev=143398&r1=143397&r2=143398
==============================================================================
--- team/group/appdocsxml/apps/app_adsiprog.c (original)
+++ team/group/appdocsxml/apps/app_adsiprog.c Wed Sep 17 14:50:32 2008
@@ -47,13 +47,23 @@
 
 static char *app = "ADSIProg";
 
-static char *synopsis = "Load Asterisk ADSI Scripts into phone";
+/*** DOCUMENTATION
+	<application name="ADSIProg" language="en_US">
+		<synopsis>
+			Load Asterisk ADSI Scripts into phone
+		</synopsis>
+		<syntax>
+			<parameter name="script" required="false">
+				<para>adsi script to use. If not given uses the default script <filename>asterisk.adsi</filename></para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>This application programs an ADSI Phone with the given script</para>
+		</description>
+	</application>
+ ***/
 
 /* #define DUMP_MESSAGES */
-
-static char *descrip =
-"  ADSIProg(script): This application programs an ADSI Phone with the given\n"
-"script. If nothing is specified, the default script (asterisk.adsi) is used.\n";
 
 struct adsi_event {
 	int id;
@@ -1570,7 +1580,7 @@
 
 static int load_module(void)
 {
-	if (ast_register_application(app, adsi_exec, synopsis, descrip))
+	if (ast_register_application_xml(app, adsi_exec))
 		return AST_MODULE_LOAD_FAILURE;
 	return AST_MODULE_LOAD_SUCCESS;
 }

Modified: team/group/appdocsxml/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_alarmreceiver.c?view=diff&rev=143398&r1=143397&r2=143398
==============================================================================
--- team/group/appdocsxml/apps/app_alarmreceiver.c (original)
+++ team/group/appdocsxml/apps/app_alarmreceiver.c Wed Sep 17 14:50:32 2008
@@ -63,18 +63,21 @@
 typedef struct event_node event_node_t;
 
 static char *app = "AlarmReceiver";
-
-static char *synopsis = "Provide support for receiving alarm reports from a burglar or fire alarm panel";
-static char *descrip =
-"  AlarmReceiver(): Only 1 signalling format is supported at this time: Ademco\n"
-"Contact ID. This application should be called whenever there is an alarm\n"
-"panel calling in to dump its events. The application will handshake with the\n"
-"alarm panel, and receive events, validate them, handshake them, and store them\n"
-"until the panel hangs up. Once the panel hangs up, the application will run the\n"
-"system command specified by the eventcmd setting in alarmreceiver.conf and pipe\n"
-"the events to the standard input of the application. The configuration file also\n"
-"contains settings for DTMF timing, and for the loudness of the acknowledgement\n"
-"tones.\n";
+/*** DOCUMENTATION
+	<application name="AlarmReceiver" language="en_US">
+		<synopsis>
+			Provide support for receiving alarm reports from a burglar or fire alarm panel
+		</synopsis>
+		<syntax />
+		<description>
+			<para>This application should be called whenever there is an alarm panel calling in to dump its events.
+			The application will handshake with the alarm panel, and receive events, validate them, handshake them, and store them until the panel hangs up.
+			Once the panel hangs up, the application will run the system command specified by the eventcmd setting in <filename>alarmreceiver.conf</filename> and pipe the events to the standard input of the application. 
+			The configuration file also contains settings for DTMF timing, and for the loudness of the acknowledgement tones.</para>
+			<note>Only 1 signalling format is supported at this time: Ademco Contact ID.</note>
+		</description>
+	</application>
+ ***/
 
 /* Config Variables */
 static int fdtimeout = 2000;
@@ -711,7 +714,7 @@
 static int load_module(void)
 {
 	if (load_config()) {
-		if (ast_register_application(app, alarmreceiver_exec, synopsis, descrip))
+		if (ast_register_application_xml(app, alarmreceiver_exec))
 			return AST_MODULE_LOAD_FAILURE;
 		return AST_MODULE_LOAD_SUCCESS;
 	} else

Modified: team/group/appdocsxml/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_authenticate.c?view=diff&rev=143398&r1=143397&r2=143398
==============================================================================
--- team/group/appdocsxml/apps/app_authenticate.c (original)
+++ team/group/appdocsxml/apps/app_authenticate.c Wed Sep 17 14:50:32 2008
@@ -54,29 +54,49 @@
 
 
 static char *app = "Authenticate";
-
-static char *synopsis = "Authenticate a user";
-
-static char *descrip =
-"  Authenticate(password[,options[,maxdigits]]): This application asks the caller\n"
-"to enter a given password in order to continue dialplan execution. If the password\n"
-"begins with the '/' character, it is interpreted as a file which contains a list of\n"
-"valid passwords, listed 1 password per line in the file.\n"
-"  When using a database key, the value associated with the key can be anything.\n"
-"Users have three attempts to authenticate before the channel is hung up.\n"
-"  Options:\n"
-"     a - Set the channels' account code to the password that is entered\n"
-"     d - Interpret the given path as database key, not a literal file\n"
-"     m - Interpret the given path as a file which contains a list of account\n"
-"         codes and password hashes delimited with ':', listed one per line in\n"
-"         the file. When one of the passwords is matched, the channel will have\n"
-"         its account code set to the corresponding account code in the file.\n"
-"     r - Remove the database key upon successful entry (valid with 'd' only)\n"
-"     maxdigits  - maximum acceptable number of digits. Stops reading after\n"
-"         maxdigits have been entered (without requiring the user to\n"
-"         press the '#' key).\n"
-"         Defaults to 0 - no limit - wait for the user press the '#' key.\n"
-;
+/*** DOCUMENTATION
+	<application name="Authenticate" language="en_US">
+		<synopsis>
+			Authenticate a user
+		</synopsis>
+		<syntax>
+			<parameter name="password" required="true">
+				<para>Password the user should know</para>
+			</parameter>
+			<parameter name="options" required="false">
+				<optionlist>
+					<option name="a">
+						<para>Set the channels' account code to the password that is entered</para>
+					</option>
+					<option name="d">
+						<para>Interpret the given path as database key, not a literal file</para>
+					</option>
+					<option name="m">
+						<para>Interpret the given path as a file which contains a list of account
+						codes and password hashes delimited with <literal>:</literal>, listed one per line in
+						the file. When one of the passwords is matched, the channel will have
+						its account code set to the corresponding account code in the file.</para>
+					</option>
+					<option name="r">
+						<para>Remove the database key upon successful entry (valid with <literal>d</literal> only)</para>
+					</option>
+				</optionlist>
+			</parameter>
+			<parameter name="maxdigits" required="false">
+				<para>maximum acceptable number of digits. Stops reading after
+				maxdigits have been entered (without requiring the user to press the <literal>#</literal> key).
+				Defaults to 0 - no limit - wait for the user press the <literal>#</literal> key.</para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>This application asks the caller to enter a given password in order to continue dialplan execution.</para>
+			<para>If the password begins with the <literal>/</literal> character, 
+			it is interpreted as a file which contains a list of valid passwords, listed 1 password per line in the file.</para>
+			<para>When using a database key, the value associated with the key can be anything.</para>
+			<para>Users have three attempts to authenticate before the channel is hung up.</para>
+		</description>
+	</application>
+ ***/
 
 static int auth_exec(struct ast_channel *chan, void *data)
 {
@@ -216,7 +236,7 @@
 
 static int load_module(void)
 {
-	if (ast_register_application(app, auth_exec, synopsis, descrip))
+	if (ast_register_application_xml(app, auth_exec))
 		return AST_MODULE_LOAD_FAILURE;
 	return AST_MODULE_LOAD_SUCCESS;
 }




More information about the asterisk-commits mailing list