diff options
author | Russell Bryant <russell@russellbryant.com> | 2008-11-01 21:10:07 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2008-11-01 21:10:07 +0000 |
commit | 5b168ee34babe562be856ec8f1dd14c0abd7c1a5 (patch) | |
tree | 9c836ac808552d20be6bd2baa3a3c29f642eda53 /apps/app_while.c | |
parent | 1fef0f63bbbde9530837995c8790b839f73b74e7 (diff) |
Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format. Currently, a new format is available for
applications and dialplan functions. A good number of conversions to the new format
are also included.
For more information, see the following message to asterisk-dev:
http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_while.c')
-rw-r--r-- | apps/app_while.c | 89 |
1 files changed, 66 insertions, 23 deletions
diff --git a/apps/app_while.c b/apps/app_while.c index 822458663..796244702 100644 --- a/apps/app_while.c +++ b/apps/app_while.c @@ -33,29 +33,72 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/channel.h" -static char *start_app = "While"; -static char *start_desc = -" While(<expr>): Start a While Loop. Execution will return to this\n" -"point when EndWhile() is called until expr is no longer true.\n"; - -static char *start_synopsis = "Start a while loop"; - +/*** DOCUMENTATION + <application name="While" language="en_US"> + <synopsis> + Start a while loop. + </synopsis> + <syntax> + <parameter name="expr" required="true" /> + </syntax> + <description> + <para>Start a While Loop. Execution will return to this point when + <literal>EndWhile()</literal> is called until expr is no longer true.</para> + </description> + <see-also> + <ref type="application">EndWhile</ref> + <ref type="application">ExitWhile</ref> + <ref type="application">ContinueWhile</ref> + </see-also> + </application> + <application name="EndWhile" language="en_US"> + <synopsis> + End a while loop. + </synopsis> + <syntax /> + <description> + <para>Return to the previous called <literal>While()</literal>.</para> + </description> + <see-also> + <ref type="application">While</ref> + <ref type="application">ExitWhile</ref> + <ref type="application">ContinueWhile</ref> + </see-also> + </application> + <application name="ExitWhile" language="en_US"> + <synopsis> + End a While loop. + </synopsis> + <syntax /> + <description> + <para>Exits a <literal>While()</literal> loop, whether or not the conditional has been satisfied.</para> + </description> + <see-also> + <ref type="application">While</ref> + <ref type="application">EndWhile</ref> + <ref type="application">ContinueWhile</ref> + </see-also> + </application> + <application name="ContinueWhile" language="en_US"> + <synopsis> + Restart a While loop. + </synopsis> + <syntax /> + <description> + <para>Returns to the top of the while loop and re-evaluates the conditional.</para> + </description> + <see-also> + <ref type="application">While</ref> + <ref type="application">EndWhile</ref> + <ref type="application">ExitWhile</ref> + </see-also> + </application> + ***/ +static char *start_app = "While"; static char *stop_app = "EndWhile"; -static char *stop_desc = -" EndWhile(): Return to the previous called While()\n"; - -static char *stop_synopsis = "End a while loop"; - static char *exit_app = "ExitWhile"; -static char *exit_desc = -" ExitWhile(): Exits a While() loop, whether or not the conditional has been satisfied.\n"; -static char *exit_synopsis = "End a While loop"; - static char *continue_app = "ContinueWhile"; -static char *continue_desc = -" ContinueWhile(): Returns to the top of the while loop and re-evaluates the conditional.\n"; -static char *continue_synopsis = "Restart a While loop"; #define VAR_SIZE 64 @@ -295,10 +338,10 @@ static int load_module(void) { int res; - res = ast_register_application(start_app, while_start_exec, start_synopsis, start_desc); - res |= ast_register_application(stop_app, while_end_exec, stop_synopsis, stop_desc); - res |= ast_register_application(exit_app, while_exit_exec, exit_synopsis, exit_desc); - res |= ast_register_application(continue_app, while_continue_exec, continue_synopsis, continue_desc); + res = ast_register_application_xml(start_app, while_start_exec); + res |= ast_register_application_xml(stop_app, while_end_exec); + res |= ast_register_application_xml(exit_app, while_exit_exec); + res |= ast_register_application_xml(continue_app, while_continue_exec); return res; } |