[sr-dev] git:master: doc/rpc: updated content to reflect renaming of printf() to rpl_printf()

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 3 18:02:44 CEST 2014


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Sep  3 09:28:53 2014 +0200

doc/rpc: updated content to reflect renaming of printf() to rpl_printf()

---

 doc/rpc/ser_rpc.txt |   34 +++++++++++++++++++++-------------
 doc/rpc/ser_rpc.xml |   32 +++++++++++++++++++++++---------
 2 files changed, 44 insertions(+), 22 deletions(-)

diff --git a/doc/rpc/ser_rpc.txt b/doc/rpc/ser_rpc.txt
index 5d0cb13..06b8044 100644
--- a/doc/rpc/ser_rpc.txt
+++ b/doc/rpc/ser_rpc.txt
@@ -17,7 +17,7 @@
               1.2.4.1. fault
               1.2.4.2. send
               1.2.4.3. add
-              1.2.4.4. printf
+              1.2.4.4. rpl_printf
               1.2.4.5. struct_add
 
         1.2.5. Real World Example
@@ -39,12 +39,19 @@
    implementing RPC transports.
 
    The RPC transports are implemented by writting a RPC transport module.
-   The most used transport modules are ctl and xmlrpc . The first one
-   implements a ser-proprietary fast and space efficient RPC encoding over
-   different protocols (unix sockets, UDP, TCP, fifo). The second one uses
-   the de-facto XML-RPC standard encoding (over HTTP TCP or TLS). For more
-   information about the existing transport modules, please refer to their
-   documentation.
+   The most used transport modules are ctl , xmlrpc and jsonrpc-s .
+
+   ctl implements a proprietary fast and space efficient RPC encoding over
+   different protocols (unix sockets, UDP, TCP, fifo).
+
+   xmlrpc uses the de-facto XML-RPC standard encoding (over HTTP TCP or
+   TLS).
+
+   jsonrpc-s uses the de-facto JSON-RPC standard encoding (over HTTP TCP
+   or TLS).
+
+   For more information about the existing transport modules, please refer
+   to their documentation.
 
    When writing a RPC procedure or function, one needs only use the RPC
    API and it will work automatically with all the transports and
@@ -523,13 +530,14 @@ static void rpc_func(rpc_t* rpc, void *ctx)
    You can set the attributes of the newly created structure using
    struct_add function described in Section 1.2.4.5, "struct_add".
 
-1.2.4.4. printf
+1.2.4.4. rpl_printf
 
-   printf is a convenience function. The function adds data of type string
-   to the result set. The first parameter of the function is again a
-   formatting string, but this time it is printf-like formatting string:
-if (rpc->printf(ctx, "Unable to delete %d entries from table %s", num_entries, t
-able_name) < 0) return;
+   rpl_printf is a convenience function. The function adds data of type
+   string to the result set. The first parameter of the function is again
+   a formatting string, but this time it is standard printf-like
+   formatting string:
+if (rpc->rpl_printf(ctx, "Unable to delete %d entries from table %s", num_entrie
+s, table_name) < 0) return;
 
    The return value of the function is the same as of add function.
 
diff --git a/doc/rpc/ser_rpc.xml b/doc/rpc/ser_rpc.xml
index 2aca3fd..a8355c8 100644
--- a/doc/rpc/ser_rpc.xml
+++ b/doc/rpc/ser_rpc.xml
@@ -34,17 +34,30 @@
 	<para>
 		The RPC transports are implemented by writting a RPC
 		transport module. The most used transport modules are
-		<ulink url='http://sip-router.org/docbook/sip-router/branch/master/modules/ctl/ctl.html'>
+		<ulink url='http://www.kamailio.org/docs/modules/devel/modules/ctl/ctl.html'>
 		<emphasis>ctl</emphasis>
+		</ulink>,
+		<ulink url='http://www.kamailio.org/docs/modules/devel/modules/xmlrpc/xmlrpc.html'>
+		<emphasis>xmlrpc</emphasis>
 		</ulink>
 		and
-		<ulink url='http://sip-router.org/docbook/sip-router/branch/master/modules/xmlrpc/xmlrpc.html'>
-		<emphasis>xmlrpc</emphasis>
+		<ulink url='http://www.kamailio.org/docs/modules/devel/modules/jsonrpc-s/jsonrpc-s.html'>
+		<emphasis>jsonrpc-s</emphasis>
 		</ulink>.
-		The first one implements a ser-proprietary fast and space efficient
+	</para>
+	<para>
+		ctl implements a proprietary fast and space efficient
 		 RPC encoding over different protocols (unix sockets, UDP, TCP, fifo).
-		The second one uses the de-facto XML-RPC standard encoding
+	</para>
+	<para>
+		xmlrpc uses the de-facto XML-RPC standard encoding
 		 (over HTTP TCP or TLS).
+	</para>
+	<para>
+		jsonrpc-s uses the de-facto JSON-RPC standard encoding
+		 (over HTTP TCP or TLS).
+	</para>
+	<para>
 		 For more information about the existing transport modules, please 
 		 refer to their documentation.
 	</para>
@@ -738,15 +751,16 @@ static void rpc_func(rpc_t* rpc, void *ctx)
 		</para>
 	    </section>
 	    <section>
-		<title>printf</title>
+		<title>rpl_printf</title>
 		<para>
-		    <varname>printf</varname> is a convenience function. The
+		    <varname>rpl_printf</varname> is a convenience function. The
 		    function adds data of type string to the result set. The
 		    first parameter of the function is again a formatting
-		    string, but this time it is <function>printf</function>-like formatting string:
+			string, but this time it is standard
+			<function>printf</function>-like formatting string:
 		    <programlisting>
 <![CDATA[
-if (rpc->printf(ctx, "Unable to delete %d entries from table %s", num_entries, table_name) < 0) return;
+if (rpc->rpl_printf(ctx, "Unable to delete %d entries from table %s", num_entries, table_name) < 0) return;
 ]]>
 		    </programlisting>
 		    The return value of the function is the same as of




More information about the sr-dev mailing list