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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 9 10:22:13 CDT 2008


Author: eliel
Date: Thu Oct  9 10:22:12 2008
New Revision: 147813

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147813
Log:
Introduce PrivacyManager() 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_privacy.c

Modified: team/group/appdocsxml/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_privacy.c?view=diff&rev=147813&r1=147812&r2=147813
==============================================================================
--- team/group/appdocsxml/apps/app_privacy.c (original)
+++ team/group/appdocsxml/apps/app_privacy.c Thu Oct  9 10:22:12 2008
@@ -41,25 +41,41 @@
 #include "asterisk/app.h"
 #include "asterisk/config.h"
 
+/*** DOCUMENTATION
+	<application name="PrivacyManager" language="en_US">
+		<synopsis>
+			Require phone number to be entered, if no CallerID sent
+		</synopsis>
+		<syntax>
+			<parameter name="maxretries">
+				<para>Total tries caller is allowed to input a callerid. Defaults to <literal>3</literal>.</para>
+			</parameter>
+			<parameter name="minlength">
+				<para>Minimum allowable digits in the input callerid number. Defaults to <literal>10</literal>.</para>
+			</parameter>
+			<parameter name="context">
+				<para>Context to check the given callerid against patterns.</para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>If no Caller*ID is sent, PrivacyManager answers the channel and asks
+			the caller to enter their phone number. The caller is given
+			<replaceable>maxretries</replaceable> attempts to do so. The application does
+			<emphasis>nothing</emphasis> if Caller*ID was received on the channel.</para>
+			<para>The application sets the following channel variable upon completion:</para>
+			<variablelist>
+				<variable name="PRIVACYMGRSTATUS">
+					<para>The status of the privacy manager's attempt to collect a phone number from the user.</para>
+					<value name="SUCCESS"/>
+					<value name="FAILED"/>
+				</variable>
+			</variablelist>
+		</description>
+	</application>
+ ***/
+
+
 static char *app = "PrivacyManager";
-
-static char *synopsis = "Require phone number to be entered, if no CallerID sent";
-
-static char *descrip =
-  "  PrivacyManager([maxretries][,minlength][,context]): If no Caller*ID \n"
-  "is sent, PrivacyManager answers the channel and asks the caller to\n"
-  "enter their phone number. The caller is given 'maxretries' attempts to do so.\n"
-  "The application does nothing if Caller*ID was received on the channel.\n"
-  "   maxretries  default 3  -maximum number of attempts the caller is allowed \n"
-  "               to input a callerid.\n"
-  "   minlength   default 10 -minimum allowable digits in the input callerid number.\n"
-  "   context     context to check the given Caller*ID against patterns.\n"
-  "The application sets the following channel variable upon completion: \n"
-  "PRIVACYMGRSTATUS  The status of the privacy manager's attempt to collect \n"
-  "                  a phone number from the user. A text string that is either:\n" 
-  "          SUCCESS | FAILED \n"
-;
-
 
 static int privacy_exec (struct ast_channel *chan, void *data)
 {
@@ -178,7 +194,7 @@
 
 static int load_module(void)
 {
-	return ast_register_application(app, privacy_exec, synopsis, descrip);
+	return ast_register_application_xml(app, privacy_exec);
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Require phone number to be entered, if no CallerID sent");




More information about the svn-commits mailing list