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
This commit is contained in:
Russell Bryant
2008-11-01 21:10:07 +00:00
parent 1fef0f63bb
commit 5b168ee34b
111 changed files with 8063 additions and 2478 deletions

View File

@@ -37,6 +37,53 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
/*** DOCUMENTATION
<function name="LOCK" language="en_US">
<synopsis>
Attempt to obtain a named mutex.
</synopsis>
<syntax>
<parameter name="lockname" required="true" />
</syntax>
<description>
<para>Attempts to grab a named lock exclusively, and prevents other channels from
obtaining the same lock. LOCK will wait for the lock to become available.
Returns <literal>1</literal> if the lock was obtained or <literal>0</literal> on error.</para>
<note><para>To avoid the possibility of a deadlock, LOCK will only attempt to
obtain the lock for 3 seconds if the channel already has another lock.</para></note>
</description>
</function>
<function name="TRYLOCK" language="en_US">
<synopsis>
Attempt to obtain a named mutex.
</synopsis>
<syntax>
<parameter name="lockname" required="true" />
</syntax>
<description>
<para>Attempts to grab a named lock exclusively, and prevents other channels
from obtaining the same lock. Returns <literal>1</literal> if the lock was
available or <literal>0</literal> otherwise.</para>
</description>
</function>
<function name="UNLOCK" language="en_US">
<synopsis>
Unlocks a named mutex.
</synopsis>
<syntax>
<parameter name="lockname" required="true" />
</syntax>
<description>
<para>Unlocks a previously locked mutex. Returns <literal>1</literal> if the channel
had a lock or <literal>0</literal> otherwise.</para>
<note><para>It is generally unnecessary to unlock in a hangup routine, as any locks
held are automatically freed when the channel is destroyed.</para></note>
</description>
</function>
***/
AST_LIST_HEAD_STATIC(locklist, lock_frame);
static void lock_free(void *data);
@@ -276,36 +323,16 @@ static int trylock_read(struct ast_channel *chan, const char *cmd, char *data, c
static struct ast_custom_function lock_function = {
.name = "LOCK",
.synopsis = "Attempt to obtain a named mutex",
.desc =
"Attempts to grab a named lock exclusively, and prevents other channels from\n"
"obtaining the same lock. LOCK will wait for the lock to become available.\n"
"Returns 1 if the lock was obtained or 0 on error.\n\n"
"Note: to avoid the possibility of a deadlock, LOCK will only attempt to\n"
"obtain the lock for 3 seconds if the channel already has another lock.\n",
.syntax = "LOCK(<lockname>)",
.read = lock_read,
};
static struct ast_custom_function trylock_function = {
.name = "TRYLOCK",
.synopsis = "Attempt to obtain a named mutex",
.desc =
"Attempts to grab a named lock exclusively, and prevents other channels\n"
"from obtaining the same lock. Returns 1 if the lock was available or 0\n"
"otherwise.\n",
.syntax = "TRYLOCK(<lockname>)",
.read = trylock_read,
};
static struct ast_custom_function unlock_function = {
.name = "UNLOCK",
.synopsis = "Unlocks a named mutex",
.desc =
"Unlocks a previously locked mutex. Note that it is generally unnecessary to\n"
"unlock in a hangup routine, as any locks held are automatically freed when the\n"
"channel is destroyed. Returns 1 if the channel had a lock or 0 otherwise.\n",
.syntax = "UNLOCK(<lockname>)",
.read = unlock_read,
};