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 /funcs/func_sha1.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 'funcs/func_sha1.c')
-rw-r--r-- | funcs/func_sha1.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/funcs/func_sha1.c b/funcs/func_sha1.c index 6474140dd..973bc5c07 100644 --- a/funcs/func_sha1.c +++ b/funcs/func_sha1.c @@ -31,6 +31,25 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/pbx.h" +/*** DOCUMENTATION + <function name="SHA1" language="en_US"> + <synopsis> + Computes a SHA1 digest. + </synopsis> + <syntax> + <parameter name="data" required="true"> + <para>Input string</para> + </parameter> + </syntax> + <description> + <para>Generate a SHA1 digest via the SHA1 algorythm.</para> + <para>Example: Set(sha1hash=${SHA1(junky)})</para> + <para>Sets the asterisk variable sha1hash to the string <literal>60fa5675b9303eb62f99a9cd47f9f5837d18f9a0</literal> + which is known as his hash</para> + </description> + </function> + ***/ + static int sha1(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) { @@ -54,13 +73,7 @@ static int sha1(struct ast_channel *chan, const char *cmd, char *data, static struct ast_custom_function sha1_function = { .name = "SHA1", - .synopsis = "Computes a SHA1 digest", - .syntax = "SHA1(<data>)", .read = sha1, - .desc = "Generate a SHA1 digest via the SHA1 algorythm.\n" - " Example: Set(sha1hash=${SHA1(junky)})\n" - " Sets the asterisk variable sha1hash to the string '60fa5675b9303eb62f99a9cd47f9f5837d18f9a0'\n" - " which is known as his hash\n", }; static int unload_module(void) |