[svn-commits] eliel: branch group/appdocsxml r145474 - in /team/group/appdocsxml: doc/ funcs/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 1 11:44:00 CDT 2008


Author: eliel
Date: Wed Oct  1 11:43:59 2008
New Revision: 145474

URL: http://svn.digium.com/view/asterisk?view=rev&rev=145474
Log:
Introduce GROUP(), GROUP_MATCH_COUNT(), GROUP_LIST and GROUP_COUNT() functions XML documentation.
Fix a missing option in the DTD, we allow the attribute argsep='' in a <syntax> element.

Modified:
    team/group/appdocsxml/doc/appdocsxml.dtd
    team/group/appdocsxml/funcs/func_groupcount.c

Modified: team/group/appdocsxml/doc/appdocsxml.dtd
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/doc/appdocsxml.dtd?view=diff&rev=145474&r1=145473&r2=145474
==============================================================================
--- team/group/appdocsxml/doc/appdocsxml.dtd (original)
+++ team/group/appdocsxml/doc/appdocsxml.dtd Wed Oct  1 11:43:59 2008
@@ -11,6 +11,7 @@
   <!ELEMENT synopsis (#PCDATA)>
   
   <!ELEMENT syntax (parameter*)>
+  <!ATTLIST syntax argsep CDATA ",">
 
   <!ELEMENT description (para|note|warning|variablelist)*>
 

Modified: team/group/appdocsxml/funcs/func_groupcount.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/funcs/func_groupcount.c?view=diff&rev=145474&r1=145473&r2=145474
==============================================================================
--- team/group/appdocsxml/funcs/func_groupcount.c (original)
+++ team/group/appdocsxml/funcs/func_groupcount.c Wed Oct  1 11:43:59 2008
@@ -30,6 +30,67 @@
 #include "asterisk/pbx.h"
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
+
+/*** DOCUMENTATION
+	<function name="GROUP_COUNT" language="en_US">
+		<synopsis>
+			Counts the number of channels in the specified group.
+		</synopsis>
+		<syntax argsep="@">
+			<parameter name="groupname">
+				<para>Group name.</para>
+			</parameter>
+			<parameter name="category">
+				<para>Category name</para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>Calculates the group count for the specified group, or uses the
+			channel's current group if not specifed (and non-empty).</para>
+		</description>
+	</function>
+	<function name="GROUP_MATCH_COUNT" language="en_US">
+		<synopsis>
+			Counts the number of channels in the groups matching the specified pattern.
+		</synopsis>
+		<syntax argsep="@">
+			<parameter name="groupmatch" required="true">
+				<para>A standard regular expression used to match a group name.</para>
+			</parameter>
+			<parameter name="category">
+				<para>Category name.</para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>Calculates the group count for all groups that match the specified pattern.
+			Uses standard regular expression matching (see regex(7)).</para>
+		</description>
+	</function>
+	<function name="GROUP" language="en_US">
+		<synopsis>
+			Gets or sets the channel group.
+		</synopsis>
+		<syntax>
+			<parameter name="category">
+				<para>Category name.</para>
+			</parameter>
+		</syntax>
+		<description>
+			<para><replaceable>category</replaceable> can be employed for more fine grained group management. Each channel 
+			can only be member of exactly one group per <replaceable>category</replaceable>.</para>
+		</description>
+	</function>
+	<function name="GROUP_LIST" language="en_US">
+		<synopsis>
+			Gets a list of the groups set on a channel.
+		</synopsis>
+		<syntax />
+		<description>
+			<para>Gets a list of the groups set on a channel.</para>
+		</description>
+	</function>
+
+ ***/
 
 static int group_count_function_read(struct ast_channel *chan, const char *cmd,
 				     char *data, char *buf, size_t len)
@@ -69,11 +130,6 @@
 
 static struct ast_custom_function group_count_function = {
 	.name = "GROUP_COUNT",
-	.syntax = "GROUP_COUNT([groupname][@category])",
-	.synopsis = "Counts the number of channels in the specified group",
-	.desc =
-		"Calculates the group count for the specified group, or uses the\n"
-		"channel's current group if not specifed (and non-empty).\n",
 	.read = group_count_function_read,
 };
 
@@ -98,12 +154,6 @@
 
 static struct ast_custom_function group_match_count_function = {
 	.name = "GROUP_MATCH_COUNT",
-	.syntax = "GROUP_MATCH_COUNT(groupmatch[@category])",
-	.synopsis =
-		"Counts the number of channels in the groups matching the specified pattern",
-	.desc =
-		"Calculates the group count for all groups that match the specified pattern.\n"
-		"Uses standard regular expression matching (see regex(7)).\n",
 	.read = group_match_count_function_read,
 	.write = NULL,
 };
@@ -152,9 +202,6 @@
 
 static struct ast_custom_function group_function = {
 	.name = "GROUP",
-	.syntax = "GROUP([category])",
-	.synopsis = "Gets or sets the channel group.",
-	.desc = "Gets or sets the channel group.\n",
 	.read = group_function_read,
 	.write = group_function_write,
 };
@@ -197,9 +244,6 @@
 
 static struct ast_custom_function group_list_function = {
 	.name = "GROUP_LIST",
-	.syntax = "GROUP_LIST()",
-	.synopsis = "Gets a list of the groups set on a channel.",
-	.desc = "Gets a list of the groups set on a channel.\n",
 	.read = group_list_function_read,
 	.write = NULL,
 };




More information about the svn-commits mailing list