[sr-dev] git:master: cfg_db README edits

Olle E. Johansson oej at edvina.net
Thu Dec 20 20:19:14 CET 2012


Module: sip-router
Branch: master
Commit: 78e1f3667d8fa553abde60d9078f395b9c4dcb9a
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=78e1f3667d8fa553abde60d9078f395b9c4dcb9a

Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at edvina.net>
Date:   Thu Dec 20 20:18:34 2012 +0100

cfg_db README edits

---

 modules/cfg_db/README                              |   49 ++++++++++----------
 modules/cfg_db/doc/cfg_db.xml                      |   16 +++---
 .../cfg_db/doc/{params.xml => cfg_db_params.xml}   |    0
 3 files changed, 32 insertions(+), 33 deletions(-)

diff --git a/modules/cfg_db/README b/modules/cfg_db/README
index 48763f1..69108d1 100644
--- a/modules/cfg_db/README
+++ b/modules/cfg_db/README
@@ -1,4 +1,4 @@
-1. cfg_db module
+The configuration database module - cfg_db
 
 Tomas Mandys
 
@@ -7,33 +7,28 @@ Tomas Mandys
    Copyright © 2008 Tomas Mandys
      __________________________________________________________________
 
-   1.1. Overview
-   1.2. Dependencies
-   1.3. Parameters
+   List of Examples
 
-        1.3.1. db_url (string)
-        1.3.2. transl_tbl (string) := "cfg_transl"
-        1.3.3. custom_tbl (string) := "cfg_custom"
+   1. Example db_url
+   2. Content of tables
 
-   1.4. Examples
-
-1.1. Overview
+1. Overview
 
    The module implements a database driver for the configuration
    parameters API. When configuration parameters are being declared
    (typically when starting) API then driver is notified and has chance to
    set value (of any parameter) based on value taken from database. It's
    primarily targeted for interfacing with 3rd party software which is
-   aware of configuration.
+   aware of the Kamailio configuration.
 
-   Parameter is uniquely identified by group_name plus name, which is used
-   by the driver to check if a value can be found. Because configuration
-   parameters may be spread in many tables, a translation table is used to
-   indicate where to start searching. Multiple look-up tables may be
-   defined for single parameter, tables are searched in the first round by
-   exact match until parameter is found, all tables listed with wildcard
-   (asterisk) in group name are searched in the second round. If a
-   parameter is not found then its value is left unchanged.
+   A parameter is uniquely identified by a group_name plus a name, which
+   is used by the driver to check if a value can be found. Because
+   configuration parameters may be spread in many tables, a translation
+   table is used to indicate where to start searching. Multiple look-up
+   tables may be defined for single parameter, tables are searched in the
+   first round by exact match until parameter is found, all tables listed
+   with wildcard (asterisk) in group name are searched in the second
+   round. If a parameter is not found then its value is left unchanged.
 
    Configuration parameters are normally declared in C code and this
    module additionally supports also declaring custom parameters in extra
@@ -46,13 +41,17 @@ Tomas Mandys
    running. It just declares variables and assigns values when SER is
    starting. That's all.
 
-1.2. Dependencies
+2. Dependencies
 
    A loaded database module.
 
-1.3. Parameters
+3. Parameters
+
+   3.1. db_url (string)
+   3.2. transl_tbl (string) := "cfg_transl"
+   3.3. custom_tbl (string) := "cfg_custom"
 
-1.3.1. db_url (string)
+3.1. db_url (string)
 
    Default database URL.
 
@@ -66,7 +65,7 @@ loadmodule("cfg_db.so");
 modparam("cfg_db", "db_url", "mysql://SER:123@127.0.0.1:12345/SER");
 ...
 
-1.3.2. transl_tbl (string) := "cfg_transl"
+3.2. transl_tbl (string) := "cfg_transl"
 
    Name of table used for pointing group_name+name into configuration
    table. If empty/null field values are found then default values will be
@@ -76,12 +75,12 @@ modparam("cfg_db", "db_url", "mysql://SER:123@127.0.0.1:12345/SER");
    matches all parameters and will be used if parameter is not explicitely
    mentioned.
 
-1.3.3. custom_tbl (string) := "cfg_custom"
+3.3. custom_tbl (string) := "cfg_custom"
 
    Name of table used for extra param declaration (group_name, name, type,
    min/max value, description).
 
-1.4. Examples
+4. Examples
 
    Example 2. Content of tables
         cfg_transl table:
diff --git a/modules/cfg_db/doc/cfg_db.xml b/modules/cfg_db/doc/cfg_db.xml
index d6e655c..6b618bb 100644
--- a/modules/cfg_db/doc/cfg_db.xml
+++ b/modules/cfg_db/doc/cfg_db.xml
@@ -7,8 +7,9 @@
 
 ]>
 
-<section id="cfg_db" xmlns:xi="http://www.w3.org/2001/XInclude">
-    <sectioninfo>
+<book id="cfg_db" xmlns:xi="http://www.w3.org/2001/XInclude">
+    <bookinfo>
+    <title>The configuration database module - cfg_db</title>
 	<authorgroup>
 	    <author>
 		<firstname>Tomas</firstname>
@@ -24,9 +25,8 @@
 	    <holder>Tomas Mandys</holder>
 	</copyright>
 
-    </sectioninfo>
+    </bookinfo>
 
-    <title>cfg_db module</title>
 	<section id="cfg_db.overview">
 		<title>Overview</title>
 		<para>
@@ -35,10 +35,10 @@
 		API then driver is notified and has chance to set value (of any
 		parameter) based on value taken from database. It's primarily
 		targeted for interfacing with 3rd party software which is aware
-		of configuration.
+		of the Kamailio configuration.
 		</para>
 		<para>
-		Parameter is uniquely identified by <emphasis>group_name</emphasis> plus 
+		A parameter is uniquely identified by a <emphasis>group_name</emphasis> plus a
 		<emphasis>name</emphasis>, which is used by the driver to check if a value can be found.
 		Because configuration parameters may be spread in many tables, a translation table 
 		is used to indicate where to start searching.  Multiple look-up tables may be 
@@ -67,7 +67,7 @@
 		</para>
 	</section>
 
-	<xi:include href="params.xml"/>
+	<xi:include href="cfg_db_params.xml"/>
 
     <section id="cfg_db.examples">
 		<title>Examples</title>
@@ -108,5 +108,5 @@
 
 		</example>
     </section>
-</section>
+</book>
 
diff --git a/modules/cfg_db/doc/params.xml b/modules/cfg_db/doc/cfg_db_params.xml
similarity index 100%
rename from modules/cfg_db/doc/params.xml
rename to modules/cfg_db/doc/cfg_db_params.xml




More information about the sr-dev mailing list