Ver código fonte

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

Daniel-Constantin Mierla 11 anos atrás
pai
commit
f925ea38f9
2 arquivos alterados com 44 adições e 22 exclusões
  1. 21 13
      doc/rpc/ser_rpc.txt
  2. 23 9
      doc/rpc/ser_rpc.xml

+ 21 - 13
doc/rpc/ser_rpc.txt

@@ -17,7 +17,7 @@
               1.2.4.1. fault
               1.2.4.1. fault
               1.2.4.2. send
               1.2.4.2. send
               1.2.4.3. add
               1.2.4.3. add
-              1.2.4.4. printf
+              1.2.4.4. rpl_printf
               1.2.4.5. struct_add
               1.2.4.5. struct_add
 
 
         1.2.5. Real World Example
         1.2.5. Real World Example
@@ -39,12 +39,19 @@
    implementing RPC transports.
    implementing RPC transports.
 
 
    The RPC transports are implemented by writting a RPC transport module.
    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
    When writing a RPC procedure or function, one needs only use the RPC
    API and it will work automatically with all the transports and
    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
    You can set the attributes of the newly created structure using
    struct_add function described in Section 1.2.4.5, "struct_add".
    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.
    The return value of the function is the same as of add function.
 
 

+ 23 - 9
doc/rpc/ser_rpc.xml

@@ -34,17 +34,30 @@
 	<para>
 	<para>
 		The RPC transports are implemented by writting a RPC
 		The RPC transports are implemented by writting a RPC
 		transport module. The most used transport modules are
 		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>
 		<emphasis>ctl</emphasis>
+		</ulink>,
+		<ulink url='http://www.kamailio.org/docs/modules/devel/modules/xmlrpc/xmlrpc.html'>
+		<emphasis>xmlrpc</emphasis>
 		</ulink>
 		</ulink>
 		and
 		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>.
 		</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).
 		 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).
 		 (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 
 		 For more information about the existing transport modules, please 
 		 refer to their documentation.
 		 refer to their documentation.
 	</para>
 	</para>
@@ -738,15 +751,16 @@ static void rpc_func(rpc_t* rpc, void *ctx)
 		</para>
 		</para>
 	    </section>
 	    </section>
 	    <section>
 	    <section>
-		<title>printf</title>
+		<title>rpl_printf</title>
 		<para>
 		<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
 		    function adds data of type string to the result set. The
 		    first parameter of the function is again a formatting
 		    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>
 		    <programlisting>
 <![CDATA[
 <![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>
 		    </programlisting>
 		    The return value of the function is the same as of
 		    The return value of the function is the same as of