diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-01 21:10:07 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-01 21:10:07 +0000 |
commit | b1f91b97d2085cc845d0f57bd9907de50c995105 (patch) | |
tree | 9c836ac808552d20be6bd2baa3a3c29f642eda53 /apps/app_sendtext.c | |
parent | c5d084051f21e943fcbcc347fc80b166885f298d (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: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_sendtext.c')
-rw-r--r-- | apps/app_sendtext.c | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c index e95ff6158..53306aa5a 100644 --- a/apps/app_sendtext.c +++ b/apps/app_sendtext.c @@ -37,19 +37,36 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/app.h" -static const char *app = "SendText"; - -static const char *synopsis = "Send a Text Message"; +/*** DOCUMENTATION + <application name="SendText" language="en_US"> + <synopsis> + Send a Text Message. + </synopsis> + <syntax> + <parameter name="text" required="true" /> + </syntax> + <description> + <para>Sends <replaceable>text</replaceable> to current channel (callee).</para> + <para>Result of transmission will be stored in the <variable>SENDTEXTSTATUS</variable></para> + <variablelist> + <variable name="SENDTEXTSTATUS"> + <value name="SUCCESS"> + Transmission succeeded. + </value> + <value name="FAILURE"> + Transmission failed. + </value> + <value name="UNSUPPORTED"> + Text transmission not supported by channel. + </value> + </variable> + </variablelist> + <note><para>At this moment, text is supposed to be 7 bit ASCII in most channels.</para></note> + </description> + </application> + ***/ -static const char *descrip = -" SendText(text): Sends text to current channel (callee).\n" -"Result of transmission will be stored in the SENDTEXTSTATUS\n" -"channel variable:\n" -" SUCCESS Transmission succeeded\n" -" FAILURE Transmission failed\n" -" UNSUPPORTED Text transmission not supported by channel\n" -"\n" -"At this moment, text is supposed to be 7 bit ASCII in most channels.\n"; +static const char *app = "SendText"; static int sendtext_exec(struct ast_channel *chan, void *data) { @@ -91,7 +108,7 @@ static int unload_module(void) static int load_module(void) { - return ast_register_application(app, sendtext_exec, synopsis, descrip); + return ast_register_application_xml(app, sendtext_exec); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Send Text Applications"); |