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 /funcs/func_sha1.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 '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) |