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_version.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_version.c')
-rw-r--r-- | funcs/func_version.c | 56 |
1 files changed, 43 insertions, 13 deletions
diff --git a/funcs/func_version.c b/funcs/func_version.c index 973f866c6..8ed6c218f 100644 --- a/funcs/func_version.c +++ b/funcs/func_version.c @@ -34,6 +34,49 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/ast_version.h" #include "asterisk/build.h" +/*** DOCUMENTATION + <function name="VERSION" language="en_US"> + <synopsis> + Return the Version info for this Asterisk. + </synopsis> + <syntax> + <parameter name="info"> + <para>The possible values are:</para> + <enumlist> + <enum name="ASTERISK_VERSION_NUM"> + <para>A string of digits is returned (right now fixed at 999999).</para> + </enum> + <enum name="BUILD_USER"> + <para>The string representing the user's name whose account + was used to configure Asterisk, is returned.</para> + </enum> + <enum name="BUILD_HOSTNAME"> + <para>The string representing the name of the host on which Asterisk was configured, is returned.</para> + </enum> + <enum name="BUILD_MACHINE"> + <para>The string representing the type of machine on which Asterisk was configured, is returned.</para> + </enum> + <enum name="BUILD_OS"> + <para>The string representing the OS of the machine on which Asterisk was configured, is returned.</para> + </enum> + <enum name="BUILD_DATE"> + <para>The string representing the date on which Asterisk was configured, is returned.</para> + </enum> + <enum name="BUILD_KERNEL"> + <para>The string representing the kernel version of the machine on which Asterisk + was configured, is returned.</para> + </enum> + </enumlist> + </parameter> + </syntax> + <description> + <para>If there are no arguments, return the version of Asterisk in this format: SVN-branch-1.4-r44830M</para> + <para>Example: Set(junky=${VERSION()};</para> + <para>Sets junky to the string <literal>SVN-branch-1.6-r74830M</literal>, or possibly, <literal>SVN-trunk-r45126M</literal>.</para> + </description> + </function> + ***/ + static int acf_version_exec(struct ast_channel *chan, const char *cmd, char *parse, char *buffer, size_t buflen) { @@ -70,19 +113,6 @@ static int acf_version_exec(struct ast_channel *chan, const char *cmd, static struct ast_custom_function acf_version = { .name = "VERSION", - .synopsis = "Return the Version info for this Asterisk", - .syntax = "VERSION([info])", - .desc = - "If there are no arguments, return the version of Asterisk in this format: SVN-branch-1.4-r44830M\n" - "If the argument is 'ASTERISK_VERSION_NUM', a string of digits is returned (right now fixed at 999999).\n" - "If the argument is 'BUILD_USER', the string representing the user's name whose account was used to configure Asterisk, is returned.\n" - "If the argument is 'BUILD_HOSTNAME', the string representing the name of the host on which Asterisk was configured, is returned.\n" - "If the argument is 'BUILD_MACHINE', the string representing the type of machine on which Asterisk was configured, is returned.\n" - "If the argument is 'BUILD_OS', the string representing the OS of the machine on which Asterisk was configured, is returned.\n" - "If the argument is 'BUILD_DATE', the string representing the date on which Asterisk was configured, is returned.\n" - "If the argument is 'BUILD_KERNEL', the string representing the kernel version of the machine on which Asterisk was configured, is returned .\n" - " Example: Set(junky=${VERSION()}; \n" - " Sets junky to the string 'SVN-branch-1.6-r74830M', or possibly, 'SVN-trunk-r45126M'.\n", .read = acf_version_exec, }; |