summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--META2
-rw-r--r--README.txt31
-rw-r--r--XmlRpc.ml60
-rw-r--r--XmlRpc.mli12
-rw-r--r--XmlRpcBase64.ml2
-rw-r--r--XmlRpcBase64.mli2
-rw-r--r--XmlRpcDateTime.ml2
-rw-r--r--XmlRpcDateTime.mli2
-rw-r--r--XmlRpcServer.ml7
-rw-r--r--XmlRpcServer.mli7
-rw-r--r--doc/xmlrpc-light/html/XmlRpc.client.html2
-rw-r--r--doc/xmlrpc-light/html/XmlRpc.html6
-rw-r--r--doc/xmlrpc-light/html/XmlRpcServer.base.html3
-rw-r--r--doc/xmlrpc-light/html/index_methods.html5
-rw-r--r--doc/xmlrpc-light/html/index_values.html6
-rw-r--r--doc/xmlrpc-light/html/type_XmlRpc.html4
-rw-r--r--doc/xmlrpc-light/html/type_XmlRpcServer.base.html3
-rw-r--r--doc/xmlrpc-light/html/type_XmlRpcServer.html6
-rw-r--r--doc/xmlrpc-light/html/type_XmlRpcServer.server.html3
-rw-r--r--doc/xmlrpc-light/latex/doc.aux26
-rw-r--r--doc/xmlrpc-light/latex/doc.dvibin29700 -> 30196 bytes
-rw-r--r--doc/xmlrpc-light/latex/doc.log22
-rw-r--r--doc/xmlrpc-light/latex/doc.pdfbin118785 -> 119656 bytes
-rw-r--r--doc/xmlrpc-light/latex/doc.ps683
-rw-r--r--doc/xmlrpc-light/latex/doc.tex34
-rw-r--r--doc/xmlrpc-light/latex/doc.toc8
-rw-r--r--doc/xmlrpc-light/svn-commit.tmp~5
-rw-r--r--examples/README.txt1
-rw-r--r--examples/adder/adder.ml2
-rw-r--r--examples/genclient/genclient.ml94
-rw-r--r--examples/ubigraph/Makefile7
-rw-r--r--examples/ubigraph/OCamlMakefile1154
-rw-r--r--examples/ubigraph/Ubigraph.ml169
-rw-r--r--examples/ubigraph/Ubigraph.mli51
-rw-r--r--examples/ubigraph/test.ml54
-rw-r--r--examples/wordpress/WordPress.ml372
-rw-r--r--examples/wordpress/WordPress.mli94
-rw-r--r--examples/wordpress/test.ml2
-rw-r--r--test/test.ml2
-rw-r--r--test/test_base64.ml2
-rw-r--r--test/test_datetime.ml2
-rw-r--r--test/test_message.ml2
-rw-r--r--test/test_serve.ml2
-rw-r--r--test/test_value.ml25
44 files changed, 2525 insertions, 453 deletions
diff --git a/META b/META
index 71fc4ea..9e153c9 100644
--- a/META
+++ b/META
@@ -1,5 +1,5 @@
name = "xmlrpc-light"
-version = "0.6"
+version = "0.6.1"
description = "XML-RPC client based on Xml-Light"
requires = "xml-light,netclient,nethttpd-for-netcgi2"
archive(byte) = "xmlrpc-light.cma"
diff --git a/README.txt b/README.txt
index e4184f0..6ec8b74 100644
--- a/README.txt
+++ b/README.txt
@@ -1,5 +1,5 @@
-XmlRpc Light, a small XmlRpc client based on Xml Light and Ocamlnet
-===================================================================
+XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
+====================================================================
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -18,25 +18,31 @@ XmlRpc Light, a small XmlRpc client based on Xml Light and Ocamlnet
What is XmlRpc Light?
---------------------
-XmlRpc Light is an XmlRpc client written in OCaml. It requires Xml-Light and
-Ocamlnet. This code should be considered Alpha software, and the interface may
-change to better fit the needs of the community.
+XmlRpc-Light is an XmlRpc client and server library written in
+OCaml. It is based on the the Xml-Light and Ocamlnet libraries.
Installation:
-------------
-For Debian users:
+Debian binary:
- sudo apt-get install libxml-light-ocaml-dev libnethttpd-ocaml-dev
+ sudo apt-get install libxmlrpc-light-ocaml-dev
+
+Debian source:
+ sudo apt-get install libxml-light-ocaml-dev libnethttpd-ocaml-dev
make
sudo make install
+Fedora binary:
+
+ sudo yum install ocaml-xmlrpc-light
+
For other environments, install xml-light and ocamlnet from sources available
at the following locations:
Xml-Light: http://tech.motion-twin.com/xmllight.html
- Ocamlnet: http://sourceforge.net/projects/ocamlnet
+ Ocamlnet: http://projects.camlcity.org/projects/ocamlnet.html
And then run, as usual:
@@ -51,12 +57,19 @@ already installed a previous version, type:
Usage:
------
-Simple example:
+Client example:
let rpc = new XmlRpc.client "http://localhost:8000" in
let result = rpc#call "echo" [`String "hello!"] in
print_endline (XmlRpc.dump result) ]}
+Server example:
+
+ let server = new XmlRpcServer.cgi () in
+ server#register "demo.sayHello"
+ (fun _ -> `String "Hello!");
+ server#run ()
+
See the Ocamldoc-generated documentation in the "doc" directory for more
details.
diff --git a/XmlRpc.ml b/XmlRpc.ml
index 6abd951..b398318 100644
--- a/XmlRpc.ml
+++ b/XmlRpc.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)
-let version = "0.6"
+let version = "0.6.1"
exception Error of (int * string)
@@ -144,11 +144,24 @@ let rec value_of_xml_element
(safe_map
(function
| Xml.Element ("member", [],
+ [Xml.Element ("name", [], []);
+ Xml.Element ("value", [], [])]) ->
+ (* Empty value is assumed to be an empty string. *)
+ ("", `String "")
+ | Xml.Element ("member", [],
[Xml.Element ("name", [], [Xml.PCData name]);
Xml.Element ("value", [], [])]) ->
(* Empty value is assumed to be an empty string. *)
(name, `String "")
| Xml.Element ("member", [],
+ [Xml.Element ("name", [], []);
+ Xml.Element ("value", [], [value])]) ->
+ ("",
+ value_of_xml_element
+ ~base64_decoder
+ ~datetime_decoder
+ value)
+ | Xml.Element ("member", [],
[Xml.Element ("name", [], [Xml.PCData name]);
Xml.Element ("value", [], [value])]) ->
(name,
@@ -522,6 +535,17 @@ let default_error_handler e =
let quiet_error_handler e =
raise e
+let serve_message ?(error_handler=default_error_handler) f message =
+ try
+ match message with
+ | MethodCall (name, params) ->
+ (try MethodResponse (f name params) with
+ | Error _ as e -> raise e
+ | e -> error_handler e)
+ | _ -> invalid_xmlrpc ()
+ with Error (code, string) ->
+ Fault (code, string)
+
let serve
?(base64_encoder=fun s -> XmlRpcBase64.str_encode s)
?(base64_decoder=fun s -> XmlRpcBase64.str_decode s)
@@ -529,27 +553,23 @@ let serve
?(datetime_decoder=XmlRpcDateTime.of_string)
?(error_handler=default_error_handler)
f s =
+ fix_dotted_tags s;
try
begin
try
- begin
- fix_dotted_tags s;
- match (message_of_xml_element
- ~base64_decoder
- ~datetime_decoder
- (Xml.parse_string s))
- with
- | MethodCall (name, params) ->
- Xml.to_string_fmt
- (xml_element_of_message
- ~base64_encoder
- ~datetime_encoder
- (try MethodResponse (f name params) with
- | Error _ as e -> raise e
- | e -> error_handler e))
- | _ -> invalid_xmlrpc ()
- end
- with Xml.Error _ -> invalid_xml ()
+ let message =
+ message_of_xml_element
+ ~base64_decoder
+ ~datetime_decoder
+ (Xml.parse_string s) in
+ let response =
+ xml_element_of_message
+ ~base64_encoder
+ ~datetime_encoder
+ (serve_message ~error_handler f message) in
+ Xml.to_string_fmt response
+ with Xml.Error _ ->
+ invalid_xml ()
end
with Error (code, string) ->
Xml.to_string_fmt (xml_element_of_message (Fault (code, string)))
diff --git a/XmlRpc.mli b/XmlRpc.mli
index 7762611..e7ad56e 100644
--- a/XmlRpc.mli
+++ b/XmlRpc.mli
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -24,7 +24,7 @@
It provides a type for values, a client class with a simple calling
interface, and low-level tools that can be used to implement a server.
- {i (c) 2007 Dave Benjamin}
+ {i (c) 2007-2009 Dave Benjamin}
*)
(** Version of XmlRpc-Light as a string. *)
@@ -89,7 +89,7 @@ type value =
User-Agent header, which defaults to "XmlRpc-Light/<version>".
The [debug] setting, if true, will enable verbose debugging output to
- the standard error strem.
+ the standard error stream.
*)
class client :
?debug:bool ->
@@ -316,6 +316,12 @@ val serve :
?error_handler:(exn -> message) ->
(string -> value list -> value) -> string -> string
+(** Performs the same function as [serve], but operates on typed messages
+ instead of strings. *)
+val serve_message :
+ ?error_handler:(exn -> message) ->
+ (string -> value list -> value) -> message -> message
+
(** The default error handler for [serve].
This error handler catches all exceptions and converts them into
diff --git a/XmlRpcBase64.ml b/XmlRpcBase64.ml
index 1a121af..91c53a3 100644
--- a/XmlRpcBase64.ml
+++ b/XmlRpcBase64.ml
@@ -1,6 +1,6 @@
(*
* XmlRpcBase64 - Base64 codec for XmlRpc
- * Copyright (C) 2007 Dave Benjamin
+ * Copyright (C) 2007-2009 Dave Benjamin
* Copyright (C) 2003 Nicolas Cannasse
*
* This library is free software; you can redistribute it and/or
diff --git a/XmlRpcBase64.mli b/XmlRpcBase64.mli
index 443273b..1614d4c 100644
--- a/XmlRpcBase64.mli
+++ b/XmlRpcBase64.mli
@@ -1,6 +1,6 @@
(*
* XmlRpcBase64 - Base64 codec for XmlRpc
- * Copyright (C) 2007 Dave Benjamin
+ * Copyright (C) 2007-2009 Dave Benjamin
* Copyright (C) 2003 Nicolas Cannasse
*
* This library is free software; you can redistribute it and/or
diff --git a/XmlRpcDateTime.ml b/XmlRpcDateTime.ml
index 442379b..d38d7b0 100644
--- a/XmlRpcDateTime.ml
+++ b/XmlRpcDateTime.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/XmlRpcDateTime.mli b/XmlRpcDateTime.mli
index 78d1591..f90cf14 100644
--- a/XmlRpcDateTime.mli
+++ b/XmlRpcDateTime.mli
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/XmlRpcServer.ml b/XmlRpcServer.ml
index fed1875..3d4f130 100644
--- a/XmlRpcServer.ml
+++ b/XmlRpcServer.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -230,6 +230,11 @@ object (self)
~error_handler
f input
+ method serve_message f input =
+ XmlRpc.serve_message
+ ~error_handler
+ f input
+
method register name ?(help="") ?(signature=[]) ?(signatures=[]) f =
if help <> ""
then (Hashtbl.replace method_help name help;
diff --git a/XmlRpcServer.mli b/XmlRpcServer.mli
index ea863b9..52a8615 100644
--- a/XmlRpcServer.mli
+++ b/XmlRpcServer.mli
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -84,6 +84,11 @@ object
method serve :
(string -> XmlRpc.value list -> XmlRpc.value) -> string -> string
+ (** Like [serve], but operates on messages instead of strings. *)
+ method serve_message :
+ (string -> XmlRpc.value list -> XmlRpc.value) ->
+ XmlRpc.message -> XmlRpc.message
+
(** Registers a method with the server.
If a [help] string is specified, its contents will be returned for
diff --git a/doc/xmlrpc-light/html/XmlRpc.client.html b/doc/xmlrpc-light/html/XmlRpc.client.html
index 761ba24..73c8eef 100644
--- a/doc/xmlrpc-light/html/XmlRpc.client.html
+++ b/doc/xmlrpc-light/html/XmlRpc.client.html
@@ -52,7 +52,7 @@
<p>
The <code class="code">debug</code> setting, if true, will enable verbose debugging output to
- the standard error strem.<br>
+ the standard error stream.<br>
<hr width="100%">
<pre><span class="keyword">val</span> <a name="ATTurl"></a>url : <code class="type">string</code></pre><div class="info">
Url of the remote XmlRpc server.<br>
diff --git a/doc/xmlrpc-light/html/XmlRpc.html b/doc/xmlrpc-light/html/XmlRpc.html
index 7365b82..1c58cff 100644
--- a/doc/xmlrpc-light/html/XmlRpc.html
+++ b/doc/xmlrpc-light/html/XmlRpc.html
@@ -39,7 +39,7 @@
interface, and low-level tools that can be used to implement a server.
<p>
- <i>(c) 2007 Dave Benjamin</i><br>
+ <i>(c) 2007-2009 Dave Benjamin</i><br>
<hr width="100%">
<pre><span class="keyword">val</span> <a name="VALversion"></a>version : <code class="type">string</code></pre><div class="info">
Version of XmlRpc-Light as a string.<br>
@@ -155,6 +155,10 @@ Creates a function from string (Xml representing a <code class="code">MethodCall
For a full-featured, easy-to-use, network-capable server implementation,
see the <a href="XmlRpcServer.html"><code class="code">XmlRpcServer</code></a> module.<br>
</div>
+<pre><span class="keyword">val</span> <a name="VALserve_message"></a>serve_message : <code class="type">?error_handler:(exn -> <a href="XmlRpc.html#TYPEmessage">message</a>) -><br> (string -> <a href="XmlRpc.html#TYPEvalue">value</a> list -> <a href="XmlRpc.html#TYPEvalue">value</a>) -><br> <a href="XmlRpc.html#TYPEmessage">message</a> -> <a href="XmlRpc.html#TYPEmessage">message</a></code></pre><div class="info">
+Performs the same function as <code class="code">serve</code>, but operates on typed messages
+ instead of strings.<br>
+</div>
<pre><span class="keyword">val</span> <a name="VALdefault_error_handler"></a>default_error_handler : <code class="type">exn -> <a href="XmlRpc.html#TYPEmessage">message</a></code></pre><div class="info">
The default error handler for <code class="code">serve</code>.
<p>
diff --git a/doc/xmlrpc-light/html/XmlRpcServer.base.html b/doc/xmlrpc-light/html/XmlRpcServer.base.html
index dfedec7..e677dfe 100644
--- a/doc/xmlrpc-light/html/XmlRpcServer.base.html
+++ b/doc/xmlrpc-light/html/XmlRpcServer.base.html
@@ -66,6 +66,9 @@ Sets an alternate handler for unhandled exceptions.
For use in subclasses; calls <a href="XmlRpc.html#VALserve"><code class="code">XmlRpc.serve</code></a> with the current
encoders, decoders, and error handler.<br>
</div>
+<pre><span class="keyword">method</span> <a name="METHODserve_message"></a>serve_message : <code class="type">(string -> <a href="XmlRpc.html#TYPEvalue">XmlRpc.value</a> list -> <a href="XmlRpc.html#TYPEvalue">XmlRpc.value</a>) -><br> <a href="XmlRpc.html#TYPEmessage">XmlRpc.message</a> -> <a href="XmlRpc.html#TYPEmessage">XmlRpc.message</a></code></pre><div class="info">
+Like <code class="code">serve</code>, but operates on messages instead of strings.<br>
+</div>
<pre><span class="keyword">method</span> <a name="METHODregister"></a>register : <code class="type">string -><br> ?help:string -><br> ?signature:<a href="XmlRpcServer.html#TYPEparam_type">param_type</a> list -><br> ?signatures:<a href="XmlRpcServer.html#TYPEparam_type">param_type</a> list list -><br> (<a href="XmlRpc.html#TYPEvalue">XmlRpc.value</a> list -> <a href="XmlRpc.html#TYPEvalue">XmlRpc.value</a>) -> unit</code></pre><div class="info">
Registers a method with the server.
<p>
diff --git a/doc/xmlrpc-light/html/index_methods.html b/doc/xmlrpc-light/html/index_methods.html
index ab6ac92..e8054b5 100644
--- a/doc/xmlrpc-light/html/index_methods.html
+++ b/doc/xmlrpc-light/html/index_methods.html
@@ -93,6 +93,11 @@ For use in subclasses; calls <a href="XmlRpc.html#VALserve"><code class="code">X
encoders, decoders, and error handler.
</div>
</td></tr>
+<tr><td><a href="XmlRpcServer.base.html#METHODserve_message">serve_message</a> [<a href="XmlRpcServer.base.html">XmlRpcServer.base</a>]</td>
+<td><div class="info">
+Like <code class="code">serve</code>, but operates on messages instead of strings.
+</div>
+</td></tr>
<tr><td><a href="XmlRpcServer.base.html#METHODset_base64_decoder">set_base64_decoder</a> [<a href="XmlRpcServer.base.html">XmlRpcServer.base</a>]</td>
<td><div class="info">
Sets an alternate Base-64 binary decoding function.
diff --git a/doc/xmlrpc-light/html/index_values.html b/doc/xmlrpc-light/html/index_values.html
index 62e4591..c8a4bd9 100644
--- a/doc/xmlrpc-light/html/index_values.html
+++ b/doc/xmlrpc-light/html/index_values.html
@@ -140,6 +140,12 @@ Creates a function from string (Xml representing a <code class="code">MethodCall
<code class="code">result</code> is the result value.
</div>
</td></tr>
+<tr><td><a href="XmlRpc.html#VALserve_message">serve_message</a> [<a href="XmlRpc.html">XmlRpc</a>]</td>
+<td><div class="info">
+Performs the same function as <code class="code">serve</code>, but operates on typed messages
+ instead of strings.
+</div>
+</td></tr>
<tr><td><a href="XmlRpcDateTime.html#VALset_tz_offset">set_tz_offset</a> [<a href="XmlRpcDateTime.html">XmlRpcDateTime</a>]</td>
<td><div class="info">
Adjusts the time zone offset, preserving equality.
diff --git a/doc/xmlrpc-light/html/type_XmlRpc.html b/doc/xmlrpc-light/html/type_XmlRpc.html
index b9d85ff..5dcf84a 100644
--- a/doc/xmlrpc-light/html/type_XmlRpc.html
+++ b/doc/xmlrpc-light/html/type_XmlRpc.html
@@ -96,6 +96,10 @@
&nbsp;&nbsp;&nbsp;&nbsp;?datetime_decoder:(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpcDateTime</span>.t)&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;?error_handler:(exn&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message)&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string<br>
+&nbsp;&nbsp;<span class="keyword">val</span>&nbsp;serve_message&nbsp;:<br>
+&nbsp;&nbsp;&nbsp;&nbsp;?error_handler:(exn&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message)&nbsp;<span class="keywordsign">-&gt;</span><br>
+&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span><br>
+&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">XmlRpc</span>.message&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message<br>
&nbsp;&nbsp;<span class="keyword">val</span>&nbsp;default_error_handler&nbsp;:&nbsp;exn&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message<br>
&nbsp;&nbsp;<span class="keyword">val</span>&nbsp;quiet_error_handler&nbsp;:&nbsp;exn&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message<br>
<span class="keyword">end</span></code></body></html> \ No newline at end of file
diff --git a/doc/xmlrpc-light/html/type_XmlRpcServer.base.html b/doc/xmlrpc-light/html/type_XmlRpcServer.base.html
index 19add86..b1a92cb 100644
--- a/doc/xmlrpc-light/html/type_XmlRpcServer.base.html
+++ b/doc/xmlrpc-light/html/type_XmlRpcServer.base.html
@@ -32,6 +32,9 @@
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;<span class="keyword">virtual</span>&nbsp;run&nbsp;:&nbsp;unit&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;serve&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string<br>
+&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;serve_message&nbsp;:<br>
+&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span><br>
+&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">XmlRpc</span>.message&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message<br>
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_base64_decoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_base64_encoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_datetime_decoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpcDateTime</span>.t)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
diff --git a/doc/xmlrpc-light/html/type_XmlRpcServer.html b/doc/xmlrpc-light/html/type_XmlRpcServer.html
index d9c9b02..63936c0 100644
--- a/doc/xmlrpc-light/html/type_XmlRpcServer.html
+++ b/doc/xmlrpc-light/html/type_XmlRpcServer.html
@@ -44,6 +44,9 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;<span class="keyword">virtual</span>&nbsp;run&nbsp;:&nbsp;unit&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;serve&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;serve_message&nbsp;:<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">XmlRpc</span>.message&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_base64_decoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_base64_encoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_datetime_decoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpcDateTime</span>.t)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
@@ -68,6 +71,9 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;run&nbsp;:&nbsp;unit&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;serve&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;serve_message&nbsp;:<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">XmlRpc</span>.message&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_base64_decoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_base64_encoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_datetime_decoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpcDateTime</span>.t)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
diff --git a/doc/xmlrpc-light/html/type_XmlRpcServer.server.html b/doc/xmlrpc-light/html/type_XmlRpcServer.server.html
index 64569a3..b98337f 100644
--- a/doc/xmlrpc-light/html/type_XmlRpcServer.server.html
+++ b/doc/xmlrpc-light/html/type_XmlRpcServer.server.html
@@ -32,6 +32,9 @@
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;run&nbsp;:&nbsp;unit&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;serve&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string<br>
+&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;serve_message&nbsp;:<br>
+&nbsp;&nbsp;&nbsp;&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value&nbsp;list&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.value)&nbsp;<span class="keywordsign">-&gt;</span><br>
+&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">XmlRpc</span>.message&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpc</span>.message<br>
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_base64_decoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_base64_encoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;string)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;<span class="keyword">method</span>&nbsp;set_datetime_decoder&nbsp;:&nbsp;(string&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">XmlRpcDateTime</span>.t)&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
diff --git a/doc/xmlrpc-light/latex/doc.aux b/doc/xmlrpc-light/latex/doc.aux
index cbc0f7e..21e264f 100644
--- a/doc/xmlrpc-light/latex/doc.aux
+++ b/doc/xmlrpc-light/latex/doc.aux
@@ -44,14 +44,15 @@
\newlabel{val:XmlRpc.xml-underscoreelement-underscoreof-underscorevalue}{{1.3}{7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}Server tools}{7}}
\newlabel{val:XmlRpc.serve}{{1.4}{7}}
+\newlabel{val:XmlRpc.serve-underscoremessage}{{1.4}{8}}
\newlabel{val:XmlRpc.default-underscoreerror-underscorehandler}{{1.4}{8}}
\newlabel{val:XmlRpc.quiet-underscoreerror-underscorehandler}{{1.4}{8}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Module {\tt {XmlRpcServer}} : XmlRpc Light server.}{8}}
\newlabel{module:XmlRpcServer}{{2}{8}}
\newlabel{type:XmlRpcServer.param-underscoretype}{{2}{8}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Base classes}{8}}
-\newlabel{class:XmlRpcServer.base}{{2.1}{8}}
-\newlabel{val:XmlRpcServer.base.methods}{{2.1}{8}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Base classes}{9}}
+\newlabel{class:XmlRpcServer.base}{{2.1}{9}}
+\newlabel{val:XmlRpcServer.base.methods}{{2.1}{9}}
\newlabel{val:XmlRpcServer.base.base64-underscoreencoder}{{2.1}{9}}
\newlabel{val:XmlRpcServer.base.base64-underscoredecoder}{{2.1}{9}}
\newlabel{val:XmlRpcServer.base.datetime-underscoreencoder}{{2.1}{9}}
@@ -63,14 +64,15 @@
\newlabel{method:XmlRpcServer.base.set-underscoredatetime-underscoredecoder}{{2.1}{9}}
\newlabel{method:XmlRpcServer.base.set-underscoreerror-underscorehandler}{{2.1}{9}}
\newlabel{method:XmlRpcServer.base.serve}{{2.1}{9}}
+\newlabel{method:XmlRpcServer.base.serve-underscoremessage}{{2.1}{10}}
\newlabel{method:XmlRpcServer.base.register}{{2.1}{10}}
\newlabel{method:XmlRpcServer.base.unregister}{{2.1}{10}}
\newlabel{method:XmlRpcServer.base.run}{{2.1}{10}}
\newlabel{classtype:XmlRpcServer.server}{{2.1}{10}}
\newlabel{method:XmlRpcServer.server.run}{{2.1}{10}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Server implementations}{10}}
-\newlabel{class:XmlRpcServer.cgi}{{2.2}{10}}
-\newlabel{class:XmlRpcServer.netplex}{{2.2}{10}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Server implementations}{11}}
+\newlabel{class:XmlRpcServer.cgi}{{2.2}{11}}
+\newlabel{class:XmlRpcServer.netplex}{{2.2}{11}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Utility functions}{11}}
\newlabel{val:XmlRpcServer.invalid-underscoremethod}{{2.3}{11}}
\newlabel{val:XmlRpcServer.invalid-underscoreparams}{{2.3}{11}}
@@ -83,9 +85,9 @@
\newlabel{val:XmlRpcDateTime.compare}{{3.2}{11}}
\newlabel{val:XmlRpcDateTime.equal}{{3.2}{11}}
\newlabel{val:XmlRpcDateTime.hash}{{3.2}{11}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Current date and time}{11}}
-\newlabel{val:XmlRpcDateTime.now}{{3.3}{11}}
-\newlabel{val:XmlRpcDateTime.now-underscoreutc}{{3.3}{11}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Current date and time}{12}}
+\newlabel{val:XmlRpcDateTime.now}{{3.3}{12}}
+\newlabel{val:XmlRpcDateTime.now-underscoreutc}{{3.3}{12}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Time zone adjustments}{12}}
\newlabel{val:XmlRpcDateTime.set-underscoretz-underscoreoffset}{{3.4}{12}}
\newlabel{val:XmlRpcDateTime.fix-underscoretz-underscoreoffset}{{3.4}{12}}
@@ -98,9 +100,9 @@
\newlabel{val:XmlRpcDateTime.from-underscoreunixtm-underscoreutc}{{3.5}{12}}
\newlabel{val:XmlRpcDateTime.to-underscoreunixtm}{{3.5}{12}}
\newlabel{val:XmlRpcDateTime.to-underscoreunixtm-underscoreutc}{{3.5}{12}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}ISO-8601 parsing and generation}{12}}
-\newlabel{val:XmlRpcDateTime.of-underscorestring}{{3.6}{12}}
-\newlabel{val:XmlRpcDateTime.to-underscorestring}{{3.6}{12}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.6}ISO-8601 parsing and generation}{13}}
+\newlabel{val:XmlRpcDateTime.of-underscorestring}{{3.6}{13}}
+\newlabel{val:XmlRpcDateTime.to-underscorestring}{{3.6}{13}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Module {\tt {XmlRpcBase64}} : Base64 codec.}{13}}
\newlabel{module:XmlRpcBase64}{{4}{13}}
\newlabel{exception:XmlRpcBase64.Invalid-underscorechar}{{4}{13}}
diff --git a/doc/xmlrpc-light/latex/doc.dvi b/doc/xmlrpc-light/latex/doc.dvi
index cd3026c..a92defc 100644
--- a/doc/xmlrpc-light/latex/doc.dvi
+++ b/doc/xmlrpc-light/latex/doc.dvi
Binary files differ
diff --git a/doc/xmlrpc-light/latex/doc.log b/doc/xmlrpc-light/latex/doc.log
index f490876..ae8ed4f 100644
--- a/doc/xmlrpc-light/latex/doc.log
+++ b/doc/xmlrpc-light/latex/doc.log
@@ -1,4 +1,4 @@
-This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=latex 2007.9.16) 25 NOV 2007 13:13
+This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=latex 2008.11.2) 19 JAN 2009 17:36
entering extended mode
%&-line parsing enabled.
**doc.tex
@@ -105,20 +105,24 @@ Overfull \hbox (32.9232pt too wide) in paragraph at lines 514--514
nvalid method parameters").[]
[]
-[6] [7] [8] [9]
-Overfull \hbox (56.47348pt too wide) in paragraph at lines 1051--1051
+[6] [7] [8] [9] [10]
+Overfull \hbox (56.47348pt too wide) in paragraph at lines 1081--1081
[]\T1/cmtt/m/n/10.95 class netplex : ?parallelizer:Netplex_types.parallelizer -
> ?handler:string -> unit -> server
[]
-[10] [11] [12] [13] (./doc.aux) )
+[11] [12] [13] (./doc.aux)
+
+LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
+
+ )
Here is how much of TeX's memory you used:
- 740 strings out of 94102
- 11073 string characters out of 1165833
- 52981 words of memory out of 1500000
- 4058 multiletter control sequences out of 10000+50000
+ 742 strings out of 94102
+ 11159 string characters out of 1165833
+ 53000 words of memory out of 1500000
+ 4060 multiletter control sequences out of 10000+50000
12330 words of font info for 32 fonts, out of 1200000 for 2000
637 hyphenation exceptions out of 8191
22i,5n,20p,232b,304s stack positions out of 5000i,500n,6000p,200000b,5000s
-Output written on doc.dvi (13 pages, 29700 bytes).
+Output written on doc.dvi (13 pages, 30196 bytes).
diff --git a/doc/xmlrpc-light/latex/doc.pdf b/doc/xmlrpc-light/latex/doc.pdf
index f400e5e..e936e7d 100644
--- a/doc/xmlrpc-light/latex/doc.pdf
+++ b/doc/xmlrpc-light/latex/doc.pdf
Binary files differ
diff --git a/doc/xmlrpc-light/latex/doc.ps b/doc/xmlrpc-light/latex/doc.ps
index 0995a73..3b2c002 100644
--- a/doc/xmlrpc-light/latex/doc.ps
+++ b/doc/xmlrpc-light/latex/doc.ps
@@ -1,7 +1,7 @@
%!PS-Adobe-2.0
%%Creator: dvips(k) 5.96.1 Copyright 2007 Radical Eye Software
%%Title: doc.dvi
-%%CreationDate: Sun Nov 25 13:13:19 2007
+%%CreationDate: Mon Jan 19 17:36:42 2009
%%Pages: 13
%%PageOrder: Ascend
%%BoundingBox: 0 0 596 842
@@ -11,7 +11,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips doc.dvi -o doc.ps
%DVIPSParameters: dpi=600
-%DVIPSSource: TeX output 2007.11.25:1313
+%DVIPSSource: TeX output 2009.01.19:1736
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -670,8 +670,8 @@ FFE00F00000000FFE01F00000000FFE03E00000000FFC07C000000007FC1F8000000007F
000FFF80003F001FFF00007F003FFE0000FF003FFE0003FF007FFC001FFE00FFFFFFFFFE
00FFFFFFFFFE00FFFFFFFFFE00FFFFFFFFFE00292C7DAB32>I E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fd ecti1095 10.95 15
-/Fd 15 119 df<000000018000000007800000000F000000001C00000000380000000070
+%DVIPSBitmapFont: Fd ecti1095 10.95 17
+/Fd 17 119 df<000000018000000007800000000F000000001C00000000380000000070
00000000E000000001E000000003C000000007800000000F000000001E000000003E0000
00007C000000007800000000F000000001F000000003E000000003E000000007C0000000
07800000000F800000001F000000001F000000003E000000003E000000007C000000007C
@@ -694,121 +694,133 @@ E0000003E0000007E0000007C0000007C000000F8000000F8000001F8000001F0000003F
0000003E0000003E0000007C0000007C000000F8000000F8000001F0000001E0000003E0
000007C00000078000000F8000001F0000001E0000003C0000007C000000F8000000F000
0001E0000003C00000078000000F0000001E0000003C00000070000000E0000000C00000
-00205A7FC325>I<000000FE00000007FF8000001F07C000007C01F00000F000F00001E0
-00F80003C000780007C0007C000F80007C001F00007C001F00007E003E00007E007E0000
-7E007E00007E00FC00007E00FC00007E01F800007E01F800007E03F80000FE03F80000FE
-03F00000FE07F00000FC07F00000FC07E00001FC0FE00001FC0FE00001FC0FE00001FC1F
-C00003F81FC00003F81FC00003F81FC00003F83F800007F03F800007F03F800007F03F80
-0007F07F00000FE07F00000FE07F00000FE07F00000FC07E00001FC0FE00001FC0FE0000
-1F80FE00003F80FE00003F80FC00003F00FC00003F00FC00007E00FC00007E00FC0000FC
-00FC0000FC00FC0000F800F80001F800F80001F000FC0003E0007C0003E0007C0007C000
-7C000F80003E001F00003E003E00001F007C00000FC1F0000003FFC0000000FE00000027
-3F76BC2E>48 D<000000FE0000000003FFC00000000F01F00000003C00F800000078007C
-000000F0003E000001E0003F000003C0001F00000380001F80000700001F80000F00001F
-80000E0C001F80001E0C001FC0001C0E001FC0003C06001FC0003806001FC0007806001F
-C0007006001FC000700E003FC000F00C003F8000E00C003F8000E01C003F8000E018007F
-8001E018007F0001C038007F0001C07000FE0001C06001FE0001C0E001FC0000E3C003F8
-0000FF0007F000003C000FE0000000001FC0000000001F80000000007F0000000000FC00
-00000001F80000000003F0000000000FC0000000001F00000000007E0000000000F80000
-000003E00000000007C0000000001F00000000003E00000000007C0000180000F000003C
-0001E00000380003C00000380003C0000078000780000078000F000000F0000E000000F0
-001E000001E0003FE00003E0003FFF0007C0007C3FF01FC000780FFFFF80007003FFFF00
-00F001FFFE0000E0007FFC0000E0003FF80000E00007C000002A3F79BC2E>50
-D<00703F0001C00070FF8003C000F3FF80038000EFFFC0078000FFFFC00F0001FFFFC01E
-0001FF83C01E0003FE01C03C0003F801C07C0007F000C0F80007E000E3F0000FC0007FF0
-000F80003FE0001F000001E0001E000003C0001E000007C0003C00000780003800000F80
-007800000F00007000001F0000F000003E0000E000003E0000E000007C00000000007C00
-00000000F80000000000F80000000001F00000000001F00000000003F00000000003E000
-00000007E0000000000FC0000000000FC0000000001FC0000000001F80000000001F8000
-0000003F00000000003F00000000007F00000000007E0000000000FE0000000000FE0000
-000001FC0000000001FC0000000001FC0000000003F80000000003F80000000003F80000
-000007F80000000007F0000000000FF0000000000FF0000000000FE0000000001FE00000
-00001FE0000000001FE0000000001FC0000000003FC0000000003FC0000000003FC00000
-00003F80000000003F00000000001E000000002A3F73BC2E>55 D<0001FFFFFFFF800000
-01FFFFFFFFF0000001FFFFFFFFFC00000003FC0001FE00000003FC00007F00000003F800
-003F80000003F800003FC0000003F800001FC0000007F800001FC0000007F000001FE000
-0007F000001FE0000007F000000FE000000FF000000FE000000FE000001FE000000FE000
-001FE000000FE000001FE000001FE000001FC000001FC000003FC000001FC000003FC000
-001FC000003F8000003FC000007F0000003F800000FF0000003F800001FE0000003F8000
-01FC0000007F800003F80000007F00000FF00000007F00001FC00000007F00007F800000
-00FF0003FE00000000FFFFFFF000000000FFFFFFFE00000000FE00003F80000001FE0000
-1FC0000001FC00000FE0000001FC000007F0000001FC000003F8000003FC000003F80000
-03F8000001FC000003F8000001FC000003F8000001FC000007F8000001FE000007F00000
-01FE000007F0000001FE000007F0000001FE00000FF0000001FC00000FE0000003FC0000
-0FE0000003FC00000FE0000003F800001FE0000007F800001FC0000007F800001FC00000
-0FF000001FC000001FE000003FC000001FE000003F8000003FC000003F8000007F800000
-7F800000FF0000007F800003FE0000007F00000FF8000000FF00003FF000007FFFFFFFFF
-C00000FFFFFFFFFF000000FFFFFFFFF00000003B3E7BBD3F>66 D<0001FFFFFFFF800000
-01FFFFFFFFF0000001FFFFFFFFFC00000003FC0003FE00000003FC00007F80000003F800
-003F80000003F800000FC0000003F800000FE0000007F8000007F0000007F0000003F000
-0007F0000003F8000007F0000001F800000FF0000001F800000FE0000001FC00000FE000
-0000FC00000FE0000000FC00001FE0000000FC00001FC0000000FE00001FC0000000FE00
-001FC0000000FE00003FC0000000FE00003F80000000FE00003F80000000FE00003F8000
-0001FE00007F80000001FE00007F00000001FE00007F00000001FE00007F00000001FC00
-00FF00000001FC0000FE00000003FC0000FE00000003FC0000FE00000003FC0001FE0000
-0003F80001FC00000007F80001FC00000007F80001FC00000007F00003FC0000000FF000
-03F80000000FF00003F80000000FE00003F80000001FE00007F80000001FC00007F00000
-001FC00007F00000003F800007F00000003F80000FF00000007F00000FE00000007E0000
-0FE0000000FE00000FE0000001FC00001FE0000001F800001FC0000003F000001FC00000
-07F000001FC000000FE000003FC000001FC000003F8000003F8000003F8000007F000000
-7F800001FC0000007F800003F80000007F00000FE0000000FF00007FC000007FFFFFFFFF
-000000FFFFFFFFFC000000FFFFFFFFC00000003F3E7BBD44>68 D<00007E00000001FF80
-000007C1C380001F80EFC0003F00FFC0007E007FC000FC007F8001F8003F8003F0003F80
-03F0003F8007E0003F000FE0003F000FC0003F001FC0007F001FC0007E003F80007E003F
-80007E003F8000FE007F8000FC007F0000FC007F0000FC007F0001FC00FF0001F800FE00
-01F800FE0001F800FE0003F800FE0003F038FC0003F038FC0003F038FC0007F038FC0007
-E078FC000FE0707C000FE0707C001FE0F07E003FE0E03E007FE0E03E00F3E1E01F01E3E1
-C00F8781E38003FF00FF0000FC003E00252977A72E>97 D<00001FC00000FFF00003F07C
-000FC01E001F000E003E000F007C001F00FC007F01F8007F03F0007F07F0007E07E0007E
-0FE000381FC000001FC000003F8000003F8000003F8000007F8000007F0000007F000000
-7F000000FF000000FE000000FE000000FE000000FE000000FE000000FC000000FC000006
-FC00000E7E00001E7E00003C7E0000783E0000F03F0001E01F0007C00F800F0007C07E00
-01FFF000007F8000202977A729>99 D<00003F000001FFE00007C0F0001F0078007E0078
-00FC003C01F8003C03F0003C07F0003C0FE0007C0FC000781FC000783F8000F83F8001F0
-7F8007E07F001FC07F01FF007FFFF800FFFF8000FE000000FE000000FE000000FE000000
-FC000000FC000000FC000000FC000000FC000000FC000000FC00000CFC00001CFC00003C
-7C0000787C0000F07E0001E03E0003C01F000F800F001E000780FC0003FFE00000FF0000
-1E2976A729>101 D<0000700001FC0001FC0001FC0001F80001F80000E0000000000000
-000000000000000000000000000000000000000000000000000000000000000000007C00
-01FF00038F800707800E07C01E07C01C07C03C0FC0380FC0380FC0781FC0701F80701F80
-F03F80F03F00003F00007F00007E0000FE0000FC0000FC0001FC0001F80001F80003F800
-03F00003F03807F03807E0380FE0780FC0700FC0700FC0F00F80E00F80E00F81C00F83C0
-0F838007870003FE0000F800163D79BB1C>105 D<00000003800000000FC00000001FC0
-0000001FC00000001FC00000001F800000000F0000000000000000000000000000000000
+00205A7FC325>I<7FFFFC7FFFFC7FFFFCFFFFFCFFFFFC1605799520>45
+D<000000FE00000007FF8000001F07C000007C01F00000F000F00001E000F80003C00078
+0007C0007C000F80007C001F00007C001F00007E003E00007E007E00007E007E00007E00
+FC00007E00FC00007E01F800007E01F800007E03F80000FE03F80000FE03F00000FE07F0
+0000FC07F00000FC07E00001FC0FE00001FC0FE00001FC0FE00001FC1FC00003F81FC000
+03F81FC00003F81FC00003F83F800007F03F800007F03F800007F03F800007F07F00000F
+E07F00000FE07F00000FE07F00000FC07E00001FC0FE00001FC0FE00001F80FE00003F80
+FE00003F80FC00003F00FC00003F00FC00007E00FC00007E00FC0000FC00FC0000FC00FC
+0000F800F80001F800F80001F000FC0003E0007C0003E0007C0007C0007C000F80003E00
+1F00003E003E00001F007C00000FC1F0000003FFC0000000FE000000273F76BC2E>48
+D<000000FE0000000003FFC00000000F01F00000003C00F800000078007C000000F0003E
+000001E0003F000003C0001F00000380001F80000700001F80000F00001F80000E0C001F
+80001E0C001FC0001C0E001FC0003C06001FC0003806001FC0007806001FC0007006001F
+C000700E003FC000F00C003F8000E00C003F8000E01C003F8000E018007F8001E018007F
+0001C038007F0001C07000FE0001C06001FE0001C0E001FC0000E3C003F80000FF0007F0
+00003C000FE0000000001FC0000000001F80000000007F0000000000FC0000000001F800
+00000003F0000000000FC0000000001F00000000007E0000000000F80000000003E00000
+000007C0000000001F00000000003E00000000007C0000180000F000003C0001E0000038
+0003C00000380003C0000078000780000078000F000000F0000E000000F0001E000001E0
+003FE00003E0003FFF0007C0007C3FF01FC000780FFFFF80007003FFFF0000F001FFFE00
+00E0007FFC0000E0003FF80000E00007C000002A3F79BC2E>50 D<00703F0001C00070FF
+8003C000F3FF80038000EFFFC0078000FFFFC00F0001FFFFC01E0001FF83C01E0003FE01
+C03C0003F801C07C0007F000C0F80007E000E3F0000FC0007FF0000F80003FE0001F0000
+01E0001E000003C0001E000007C0003C00000780003800000F80007800000F0000700000
+1F0000F000003E0000E000003E0000E000007C00000000007C0000000000F80000000000
+F80000000001F00000000001F00000000003F00000000003E00000000007E0000000000F
+C0000000000FC0000000001FC0000000001F80000000001F80000000003F00000000003F
+00000000007F00000000007E0000000000FE0000000000FE0000000001FC0000000001FC
+0000000001FC0000000003F80000000003F80000000003F80000000007F80000000007F0
+000000000FF0000000000FF0000000000FE0000000001FE0000000001FE0000000001FE0
+000000001FC0000000003FC0000000003FC0000000003FC0000000003F80000000003F00
+000000001E000000002A3F73BC2E>55 D<0000007F8000000003FFE00000000FFFF00000
+001FC0F80000007F007C000000FC003E000001F8003E000003F0003F000007E0001F0000
+0FE0001F00000FC0001F00001F80001F80003F80001F80003F00001F80007F00001F8000
+7F00001F8000FE00001F8000FE00003F8000FE00003F8001FE00003F8001FC00003F8001
+FC00003F0001FC00007F0003FC00007F0003F800007F0003F80000FF0003F80000FF0003
+F80000FE0003F80001FE0003F00001FE0001F00003FE0001F00003FC0001F80007FC0000
+F8000FFC0000F8001FFC000078003BF800007C0073F800003E00E3F800001F03C7F00000
+07FF07F0000001FC07F0000000000FE0000000000FE0000000000FC0000000001FC00000
+00001F80000000003F00000000003F00000000007E00000000007E0000000000FC00003E
+0001F800007F0003F000007F0003E000007F0007C00000FE000F800000FC001F00000070
+003E0000007800FC0000007E03F80000003FFFE00000000FFF8000000003FC0000000029
+3F78BC2E>57 D<0001FFFFFFFF80000001FFFFFFFFF0000001FFFFFFFFFC00000003FC00
+01FE00000003FC00007F00000003F800003F80000003F800003FC0000003F800001FC000
+0007F800001FC0000007F000001FE0000007F000001FE0000007F000000FE000000FF000
+000FE000000FE000001FE000000FE000001FE000000FE000001FE000001FE000001FC000
+001FC000003FC000001FC000003FC000001FC000003F8000003FC000007F0000003F8000
+00FF0000003F800001FE0000003F800001FC0000007F800003F80000007F00000FF00000
+007F00001FC00000007F00007F80000000FF0003FE00000000FFFFFFF000000000FFFFFF
+FE00000000FE00003F80000001FE00001FC0000001FC00000FE0000001FC000007F00000
+01FC000003F8000003FC000003F8000003F8000001FC000003F8000001FC000003F80000
+01FC000007F8000001FE000007F0000001FE000007F0000001FE000007F0000001FE0000
+0FF0000001FC00000FE0000003FC00000FE0000003FC00000FE0000003F800001FE00000
+07F800001FC0000007F800001FC000000FF000001FC000001FE000003FC000001FE00000
+3F8000003FC000003F8000007F8000007F800000FF0000007F800003FE0000007F00000F
+F8000000FF00003FF000007FFFFFFFFFC00000FFFFFFFFFF000000FFFFFFFFF00000003B
+3E7BBD3F>66 D<0001FFFFFFFF80000001FFFFFFFFF0000001FFFFFFFFFC00000003FC00
+03FE00000003FC00007F80000003F800003F80000003F800000FC0000003F800000FE000
+0007F8000007F0000007F0000003F0000007F0000003F8000007F0000001F800000FF000
+0001F800000FE0000001FC00000FE0000000FC00000FE0000000FC00001FE0000000FC00
+001FC0000000FE00001FC0000000FE00001FC0000000FE00003FC0000000FE00003F8000
+0000FE00003F80000000FE00003F80000001FE00007F80000001FE00007F00000001FE00
+007F00000001FE00007F00000001FC0000FF00000001FC0000FE00000003FC0000FE0000
+0003FC0000FE00000003FC0001FE00000003F80001FC00000007F80001FC00000007F800
+01FC00000007F00003FC0000000FF00003F80000000FF00003F80000000FE00003F80000
+001FE00007F80000001FC00007F00000001FC00007F00000003F800007F00000003F8000
+0FF00000007F00000FE00000007E00000FE0000000FE00000FE0000001FC00001FE00000
+01F800001FC0000003F000001FC0000007F000001FC000000FE000003FC000001FC00000
+3F8000003F8000003F8000007F0000007F800001FC0000007F800003F80000007F00000F
+E0000000FF00007FC000007FFFFFFFFF000000FFFFFFFFFC000000FFFFFFFFC00000003F
+3E7BBD44>68 D<00007E00000001FF80000007C1C380001F80EFC0003F00FFC0007E007F
+C000FC007F8001F8003F8003F0003F8003F0003F8007E0003F000FE0003F000FC0003F00
+1FC0007F001FC0007E003F80007E003F80007E003F8000FE007F8000FC007F0000FC007F
+0000FC007F0001FC00FF0001F800FE0001F800FE0001F800FE0003F800FE0003F038FC00
+03F038FC0003F038FC0007F038FC0007E078FC000FE0707C000FE0707C001FE0F07E003F
+E0E03E007FE0E03E00F3E1E01F01E3E1C00F8781E38003FF00FF0000FC003E00252977A7
+2E>97 D<00001FC00000FFF00003F07C000FC01E001F000E003E000F007C001F00FC007F
+01F8007F03F0007F07F0007E07E0007E0FE000381FC000001FC000003F8000003F800000
+3F8000007F8000007F0000007F0000007F000000FF000000FE000000FE000000FE000000
+FE000000FE000000FC000000FC000006FC00000E7E00001E7E00003C7E0000783E0000F0
+3F0001E01F0007C00F800F0007C07E0001FFF000007F8000202977A729>99
+D<00003F000001FFE00007C0F0001F0078007E007800FC003C01F8003C03F0003C07F000
+3C0FE0007C0FC000781FC000783F8000F83F8001F07F8007E07F001FC07F01FF007FFFF8
+00FFFF8000FE000000FE000000FE000000FE000000FC000000FC000000FC000000FC0000
+00FC000000FC000000FC00000CFC00001CFC00003C7C0000787C0000F07E0001E03E0003
+C01F000F800F001E000780FC0003FFE00000FF00001E2976A729>101
+D<0000700001FC0001FC0001FC0001F80001F80000E00000000000000000000000000000
+00000000000000000000000000000000000000000000000000007C0001FF00038F800707
+800E07C01E07C01C07C03C0FC0380FC0380FC0781FC0701F80701F80F03F80F03F00003F
+00007F00007E0000FE0000FC0000FC0001FC0001F80001F80003F80003F00003F03807F0
+3807E0380FE0780FC0700FC0700FC0F00F80E00F80E00F81C00F83C00F838007870003FE
+0000F800163D79BB1C>105 D<00000003800000000FC00000001FC00000001FC0000000
+1FC00000001F800000000F00000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000007C00000003FF000000078F8000000E07C000001C0
-7C000003C07C000003807E000007007E000007007E00000E00FE00000E00FC00001E00FC
-00001C00FC00003C01FC00003C01FC00000001F800000001F800000003F800000003F800
-000003F000000003F000000007F000000007F000000007E000000007E00000000FE00000
-000FE00000000FC00000000FC00000001FC00000001FC00000001F800000001F80000000
-3F800000003F800000003F000000003F000000007F000000007F000000007E000000007E
-00000000FE00000000FE00000000FC00000000FC00000001FC00000001F800000001F800
-000001F800003C03F000007E03F00000FE07E00000FE07C00000FE0F800000FC1F000000
-F03E000000707C0000003FF00000000FC0000000224F83BB1C>I<01F0003F80007F0000
-07FC01FFE003FFC0000F3E07C1F80F83F0000E1F0F00FC1E01F8001E1F1C007C3800F800
-1C1F38007E7000FC003C1FF0007EE000FC00381FF0007FE000FC00381FE0007FC000FC00
-783FC0007F8000FC00703FC0007F8000FC00703F80007F0000FC00703F00007E0000FC00
-F03F0000FE0001FC00F07F0000FC0001F800007E0000FC0001F800007E0000FC0001F800
-007E0001FC0003F80000FE0001FC0003F00000FC0001F80003F00000FC0001F80003F000
-00FC0003F80007F00001FC0003F80007E00001F80003F00007E00001F80003F0000FE000
-01F80007F0000FC00003F80007F0001FC0E003F00007E0001F80E003F00007E0001F80E0
-03F0000FE0003F81E007F0000FE0003F01C007E0000FC0003F01C007E0000FC0003F01C0
-07E0001FC0003E03800FE0001FC0003E03800FC0001F80003E07000FC0001F80003E0700
-0FC0003F80003E0E001FC0003F80001E1C001F80003F00000FF8000700000E000003E000
-432979A74A>109 D<01F0003F800007FC01FFE0000F3E07C1F8000E1F0F00FC001E1F1C
-007C001C1F38007E003C1FF0007E00381FF0007E00381FE0007E00783FC0007E00703FC0
-007E00703F80007E00703F00007E00F03F0000FE00F07F0000FC00007E0000FC00007E00
-00FC00007E0001FC0000FE0001F80000FC0001F80000FC0001F80000FC0003F80001FC00
-03F00001F80003F00001F80007F00001F80007E00003F8000FE07003F0000FC07003F000
-0FC07003F0001FC0F007F0001F80E007E0001F80E007E0001F81E007E0001F01C00FE000
-1F01C00FC0001F03800FC0001F03800FC0001F07001FC0000F0E001F800007FC00070000
-01F0002C2979A733>I<007C00038001FF0007E0038F800FE00707800FE00E07C00FF01E
-07C00FF01C07C007F03C0FC007F0380FC003F0380FC003E0781FC001E0701F8001E0701F
-8001E0F03F8001E0F03F0001C0003F0001C0007F0001C0007E0003C0007E00038000FE00
-038000FC00038000FC00078001FC00070001F800070001F800070001F8000E0003F8000E
-0003F0000E0003F0001C0003F0001C0003F000380003F000380003F000700003F0007000
-01F000E00001F001C00001F803C00000F8078000007E0F0000001FFC00000007F0000024
-2979A729>118 D E
+0000000000000007C00000003FF000000078F8000000E07C000001C07C000003C07C0000
+03807E000007007E000007007E00000E00FE00000E00FC00001E00FC00001C00FC00003C
+01FC00003C01FC00000001F800000001F800000003F800000003F800000003F000000003
+F000000007F000000007F000000007E000000007E00000000FE00000000FE00000000FC0
+0000000FC00000001FC00000001FC00000001F800000001F800000003F800000003F8000
+00003F000000003F000000007F000000007F000000007E000000007E00000000FE000000
+00FE00000000FC00000000FC00000001FC00000001F800000001F800000001F800003C03
+F000007E03F00000FE07E00000FE07C00000FE0F800000FC1F000000F03E000000707C00
+00003FF00000000FC0000000224F83BB1C>I<01F0003F80007F000007FC01FFE003FFC0
+000F3E07C1F80F83F0000E1F0F00FC1E01F8001E1F1C007C3800F8001C1F38007E7000FC
+003C1FF0007EE000FC00381FF0007FE000FC00381FE0007FC000FC00783FC0007F8000FC
+00703FC0007F8000FC00703F80007F0000FC00703F00007E0000FC00F03F0000FE0001FC
+00F07F0000FC0001F800007E0000FC0001F800007E0000FC0001F800007E0001FC0003F8
+0000FE0001FC0003F00000FC0001F80003F00000FC0001F80003F00000FC0003F80007F0
+0001FC0003F80007E00001F80003F00007E00001F80003F0000FE00001F80007F0000FC0
+0003F80007F0001FC0E003F00007E0001F80E003F00007E0001F80E003F0000FE0003F81
+E007F0000FE0003F01C007E0000FC0003F01C007E0000FC0003F01C007E0001FC0003E03
+800FE0001FC0003E03800FC0001F80003E07000FC0001F80003E07000FC0003F80003E0E
+001FC0003F80001E1C001F80003F00000FF8000700000E000003E000432979A74A>109
+D<01F0003F800007FC01FFE0000F3E07C1F8000E1F0F00FC001E1F1C007C001C1F38007E
+003C1FF0007E00381FF0007E00381FE0007E00783FC0007E00703FC0007E00703F80007E
+00703F00007E00F03F0000FE00F07F0000FC00007E0000FC00007E0000FC00007E0001FC
+0000FE0001F80000FC0001F80000FC0001F80000FC0003F80001FC0003F00001F80003F0
+0001F80007F00001F80007E00003F8000FE07003F0000FC07003F0000FC07003F0001FC0
+F007F0001F80E007E0001F80E007E0001F81E007E0001F01C00FE0001F01C00FC0001F03
+800FC0001F03800FC0001F07001FC0000F0E001F800007FC0007000001F0002C2979A733
+>I<007C00038001FF0007E0038F800FE00707800FE00E07C00FF01E07C00FF01C07C007
+F03C0FC007F0380FC003F0380FC003E0781FC001E0701F8001E0701F8001E0F03F8001E0
+F03F0001C0003F0001C0007F0001C0007E0003C0007E00038000FE00038000FC00038000
+FC00078001FC00070001F800070001F800070001F8000E0003F8000E0003F0000E0003F0
+001C0003F0001C0003F000380003F000380003F000700003F000700001F000E00001F001
+C00001F803C00000F8078000007E0F0000001FFC00000007F00000242979A729>118
+D E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fe ectt1440 14.4 19
/Fe 19 119 df<00000007FE00000000000FFF00000000000FFF00000000001FFF000000
@@ -3173,7 +3185,7 @@ f(.)h(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)92
b(10)136 1288 y(2.3)g(Utilit)m(y)31 b(functions)90 b(.)46
b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
-f(.)h(.)92 b(11)0 1492 y Fh(3)84 b(Mo)s(dule)34 b Fg(XmlRpcDateTime)h
+f(.)h(.)92 b(10)0 1492 y Fh(3)84 b(Mo)s(dule)34 b Fg(XmlRpcDateTime)h
Fh(:)46 b(Date/time)35 b(t)m(yp)s(e.)1777 b(11)136 1605
y Ff(3.1)92 b(T)m(yp)s(es)76 b(.)45 b(.)h(.)g(.)f(.)h(.)f(.)h(.)g(.)f
(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
@@ -3187,14 +3199,14 @@ h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
(.)92 b(11)136 1943 y(3.4)g(Time)32 b(zone)e(adjustmen)m(ts)h(.)46
b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
(.)h(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)92
-b(12)136 2056 y(3.5)g(Con)m(v)m(ersion)i(.)45 b(.)h(.)f(.)h(.)g(.)f(.)h
+b(11)136 2056 y(3.5)g(Con)m(v)m(ersion)i(.)45 b(.)h(.)f(.)h(.)g(.)f(.)h
(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)
h(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)92
b(12)136 2169 y(3.6)g(ISO-8601)32 b(parsing)f(and)f(generation)77
b(.)45 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)92 b(12)0
2372 y Fh(4)84 b(Mo)s(dule)34 b Fg(XmlRpcBase64)h Fh(:)46
-b(Base64)35 b(co)s(dec.)1975 b(13)0 2659 y Fi(1)131 b(Mo)t(dule)44
+b(Base64)35 b(co)s(dec.)1975 b(12)0 2659 y Fi(1)131 b(Mo)t(dule)44
b Fe(XmlRpc)d Fi(:)58 b(XmlRp)t(c)44 b(Ligh)l(t.)0 2862
y Ff(XmlRp)s(c)30 b(Ligh)m(t)i(is)d(a)i(minimal)g(XmlRp)s(c)f(library)h
(based)g(on)f(Xml)g(Ligh)m(t)i(and)f(Ocamlnet.)141 2975
@@ -3202,7 +3214,7 @@ y(It)k(pro)m(vides)i(a)e(t)m(yp)s(e)h(for)f(v)-5 b(alues,)37
b(a)f(clien)m(t)h(class)e(with)h(a)g(simple)g(calling)g(in)m(terface,)j
(and)d(lo)m(w-lev)m(el)h(to)s(ols)0 3088 y(that)31 b(can)g(b)s(e)f
(used)g(to)h(implemen)m(t)h(a)e(serv)m(er.)141 3200 y
-Fd(\(c\))j(2007)f(Dave)i(Benjamin)0 3456 y Fg(val)47
+Fd(\(c\))j(2007-2009)g(Dave)g(Benjamin)0 3456 y Fg(val)47
b(version)g(:)g(string)227 3594 y Ff(V)-8 b(ersion)31
b(of)f(XmlRp)s(c-Ligh)m(t)i(as)e(a)g(string.)0 3912 y
Fc(1.1)112 b(High-lev)m(el)35 b(in)m(terface)0 4084 y
@@ -3283,59 +3295,59 @@ b(an)f(alternate)i(Base-64)f(binary)f(enco)s(ding)i(function.)1927
5400 y(3)p eop end
%%Page: 4 4
TeXDict begin 4 3 bop 227 91 a Fg(method)47 b(set_base64_decoder)g(:)g
-(\(string)f(->)h(string\))g(->)g(unit)427 267 y Ff(Sets)31
+(\(string)f(->)h(string\))g(->)g(unit)427 262 y Ff(Sets)31
b(an)f(alternate)i(Base-64)f(binary)f(deco)s(ding)i(function.)227
-479 y Fg(method)47 b(set_datetime_encoder)g(:)g(\(XmlRpcDateTime.t)f
-(->)h(string\))g(->)g(unit)427 654 y Ff(Sets)31 b(an)f(alternate)i
-(ISO-8601)f(date/time)h(enco)s(ding)f(function.)227 867
+467 y Fg(method)47 b(set_datetime_encoder)g(:)g(\(XmlRpcDateTime.t)f
+(->)h(string\))g(->)g(unit)427 638 y Ff(Sets)31 b(an)f(alternate)i
+(ISO-8601)f(date/time)h(enco)s(ding)f(function.)227 842
y Fg(method)47 b(set_datetime_decoder)g(:)g(\(string)f(->)h
-(XmlRpcDateTime.t\))g(->)g(unit)427 1042 y Ff(Sets)31
+(XmlRpcDateTime.t\))g(->)g(unit)427 1013 y Ff(Sets)31
b(an)f(alternate)i(ISO-8601)f(date/time)h(deco)s(ding)f(function.)227
-1254 y Fg(method)47 b(call)g(:)g(string)g(->)g(XmlRpc.value)f(list)h
-(->)g(XmlRpc.value)427 1430 y(call)g(name)g(params)30
+1217 y Fg(method)47 b(call)g(:)g(string)g(->)g(XmlRpc.value)f(list)h
+(->)g(XmlRpc.value)427 1389 y(call)g(name)g(params)30
b Ff(in)m(v)m(ok)m(es)h(an)g(XmlRp)s(c)f(metho)s(d)h(and)f(returns)h
-(the)g(result,)g(or)f(raises)427 1543 y Fg(XmlRpc.Error)p
-Ff([1.1])h(on)f(error.)90 1768 y Fg(end)227 1955 y Ff(Class)g(for)g
+(the)g(result,)g(or)f(raises)427 1501 y Fg(XmlRpc.Error)p
+Ff([1.1])h(on)f(error.)90 1718 y Fg(end)227 1900 y Ff(Class)g(for)g
(XmlRp)s(c)g(clien)m(ts.)42 b(T)-8 b(ak)m(es)31 b(a)f(single)h
-(mandatory)g(argumen)m(t,)i Fg(url)p Ff(.)227 2105 y(If)d
+(mandatory)g(argumen)m(t,)i Fg(url)p Ff(.)227 2048 y(If)d
Fg(url)g Ff(is)g(of)g(the)g(form)h("h)m(ttp://username:passw)m(ord@)p
Fa(:)15 b(:)g(:)5 b Ff(",)31 b(basic)f(authen)m(tication)k(will)c(b)s
-(e)g(used.)227 2256 y(If)g Fg(url)g Ff(starts)g(with)h("h)m(ttps",)g
+(e)g(used.)227 2196 y(If)g Fg(url)g Ff(starts)g(with)h("h)m(ttps",)g
(Curl)g(will)g(b)s(e)f(used)h(instead)f(of)g(Ocamlnet.)42
-b(The)31 b("curl")g(command-line)227 2369 y(program)h(m)m(ust)f(b)s(e)f
+b(The)31 b("curl")g(command-line)227 2309 y(program)h(m)m(ust)f(b)s(e)f
(in)g(y)m(our)h(path)g(for)f(this)h(to)f(w)m(ork.)41
b(Y)-8 b(ou)31 b(can)g(use)f(the)h Fg(insecure_ssl)f
-Ff(setting)g(to)227 2482 y(allo)m(w)i(connections)f(to)g(serv)m(ers)f
+Ff(setting)g(to)227 2422 y(allo)m(w)i(connections)f(to)g(serv)m(ers)f
(with)h(self-signed)g(certi\034cates;)g(b)m(y)g(default)g(this)f(is)g
-(false)g(and)227 2594 y(certi\034cates)i(m)m(ust)f(b)s(e)f(v)-5
-b(alid.)227 2745 y Fg(timeout)30 b Ff(can)h(b)s(e)f(used)g(to)h(sp)s
+(false)g(and)227 2535 y(certi\034cates)i(m)m(ust)f(b)s(e)f(v)-5
+b(alid.)227 2683 y Fg(timeout)30 b Ff(can)h(b)s(e)f(used)g(to)h(sp)s
(ecify)e(the)i(maxim)m(um)h(amoun)m(t)g(of)e(time)h(elapsed)f(b)s
-(efore)h(a)f(connection)i(is)227 2858 y(cancelled.)42
-b(It)30 b(defaults)h(to)f(300.0)h(seconds.)227 3008 y
+(efore)h(a)f(connection)i(is)227 2796 y(cancelled.)42
+b(It)30 b(defaults)h(to)f(300.0)h(seconds.)227 2944 y
Fg(headers)f Ff(ma)m(y)g(con)m(tain)h(an)f(arra)m(y)g(of)g(\(name,)g(v)
-5 b(alue\))30 b(pairs)g(of)f(additional)j(headers)e(to)g(send)g(with)g
-(eac)m(h)227 3121 y(request.)227 3271 y(The)h Fg(useragent)f
+(eac)m(h)227 3057 y(request.)227 3205 y(The)h Fg(useragent)f
Ff(setting)h(pro)m(vides)g(a)f(con)m(v)m(enien)m(t)j(w)m(a)m(y)f(to)e
(c)m(hange)i(the)f(User-Agen)m(t)g(header,)g(whic)m(h)227
-3384 y(defaults)g(to)f("XmlRp)s(c-Ligh)m(t/)p Fa(<)p
-Ff(v)m(ersion)p Fa(>)p Ff(".)227 3534 y(The)g Fg(debug)f
+3318 y(defaults)g(to)f("XmlRp)s(c-Ligh)m(t/)p Fa(<)p
+Ff(v)m(ersion)p Fa(>)p Ff(".)227 3466 y(The)h Fg(debug)f
Ff(setting,)h(if)f(true,)h(will)g(enable)g(v)m(erb)s(ose)f(debugging)i
-(output)f(to)g(the)f(standard)h(error)g(strem.)0 3747
-y Fg(class)47 b(multicall)g(:)g(client)f(->)90 3860 y(object)227
-4035 y(method)h(call)g(:)g(string)g(->)g(XmlRpc.value)f(list)h(->)g
-(XmlRpc.value)g(Lazy.t)427 4210 y Ff(A)m(dds)31 b(a)f(call)h(to)f(this)
-h Fg(multicall)f Ff(instance.)41 b(If)29 b(the)i(call)g(has)f(already)h
-(executed,)g(the)g(follo)m(wing)427 4323 y(exception)h(will)e(b)s(e)g
-(raised:)41 b(F)-8 b(ailure)32 b("m)m(ulticall)p Fg(#)p
-Ff(call:)43 b(already)31 b(executed".)227 4535 y Fg(method)47
-b(execute)g(:)g(unit)g(->)g(unit)427 4711 y Ff(F)-8 b(orces)31
-b(the)g(call)g(to)f(execute)h(immediately)-8 b(.)43 b(If)29
-b(the)i(call)f(has)h(already)g(executed)g(and)f(completed)427
-4824 y(successfully)-8 b(,)31 b(the)f(follo)m(wing)i(exception)f(will)g
-(b)s(e)f(raised:)41 b(F)-8 b(ailure)31 b("m)m(ulticall)p
-Fg(#)p Ff(execute:)44 b(already)427 4936 y(completed".)227
-5149 y Fg(method)j(result)g(:)g(int)g(->)g(XmlRpc.value)1927
-5400 y Ff(4)p eop end
+(output)g(to)e(the)h(standard)g(error)227 3579 y(stream.)0
+3784 y Fg(class)47 b(multicall)g(:)g(client)f(->)90 3897
+y(object)227 4061 y(method)h(call)g(:)g(string)g(->)g(XmlRpc.value)f
+(list)h(->)g(XmlRpc.value)g(Lazy.t)427 4233 y Ff(A)m(dds)31
+b(a)f(call)h(to)f(this)h Fg(multicall)f Ff(instance.)41
+b(If)29 b(the)i(call)g(has)f(already)h(executed,)g(the)g(follo)m(wing)
+427 4345 y(exception)h(will)e(b)s(e)g(raised:)41 b(F)-8
+b(ailure)32 b("m)m(ulticall)p Fg(#)p Ff(call:)43 b(already)31
+b(executed".)227 4550 y Fg(method)47 b(execute)g(:)g(unit)g(->)g(unit)
+427 4721 y Ff(F)-8 b(orces)31 b(the)g(call)g(to)f(execute)h
+(immediately)-8 b(.)43 b(If)29 b(the)i(call)f(has)h(already)g(executed)
+g(and)f(completed)427 4834 y(successfully)-8 b(,)31 b(the)f(follo)m
+(wing)i(exception)f(will)g(b)s(e)f(raised:)41 b(F)-8
+b(ailure)31 b("m)m(ulticall)p Fg(#)p Ff(execute:)44 b(already)427
+4947 y(completed".)227 5151 y Fg(method)j(result)g(:)g(int)g(->)g
+(XmlRpc.value)1927 5400 y Ff(4)p eop end
%%Page: 5 5
TeXDict begin 5 4 bop 427 91 a Ff(Returns)31 b(a)f Fg(multicall)g
Ff(result,)h(executing)g(the)g(call)f(if)g(necessary)-8
@@ -3467,233 +3479,242 @@ y(escap)s(e.)227 5038 y(F)-8 b(or)31 b(a)g(full-featured,)g
i(see)d(the)227 5151 y Fg(XmlRpcServer)p Ff([2])h(mo)s(dule.)1927
5400 y(7)p eop end
%%Page: 8 8
-TeXDict begin 8 7 bop 0 91 a Fg(val)47 b(default_error_handler)f(:)h
-(exn)g(->)g(message)227 229 y Ff(The)31 b(default)g(error)g(handler)g
-(for)g Fg(serve)p Ff(.)227 379 y(This)g(error)g(handler)g(catc)m(hes)h
-(all)e(exceptions)h(and)g(con)m(v)m(erts)g(them)g(in)m(to)h(faults)e(b)
-m(y)g(wrapping)i(them)f(in)227 492 y Fg(XmlRpc.Error)p
-Ff(.)0 705 y Fg(val)47 b(quiet_error_handler)f(:)h(exn)g(->)g(message)
-227 843 y Ff(A)30 b("quiet")h(error)g(handler)h(for)e
-Fg(serve)p Ff(.)227 993 y(This)h(error)g(handler)g(simply)f(re-raises)h
-(the)g(exception.)41 b(Use)30 b(this)g(if)g(y)m(ou)h(w)m(an)m(t)h
-(exceptions)f(to)f(remain)227 1106 y(unhandled)i(so)e(that)h(they)f
-(will)h(escap)s(e)g(to)f(the)h(error)g(log.)41 b(The)30
-b(clien)m(t)i(will)f(receiv)m(e)g(a)f(generic)227 1219
-y("transp)s(ort)h(error",)h(whic)m(h)f(is)f(more)h(secure)g(since)f(it)
-h(do)s(es)f(not)g(rev)m(eal)i(an)m(y)e(information)i(ab)s(out)f(the)227
-1332 y(sp)s(eci\034c)g(exception)g(that)g(o)s(ccurred.)0
-1693 y Fi(2)131 b(Mo)t(dule)44 b Fe(XmlRpcServer)39 b
-Fi(:)58 b(XmlRp)t(c)44 b(Ligh)l(t)h(serv)l(er.)0 2014
-y Ff(Example:)188 2265 y Fg(let)i(server)g(=)g(new)g(XmlRpcServer.cgi)f
-(\(\))h(in)188 2377 y(server#register)g("demo.sayHello")282
-2490 y(\(fun)g(_)g(->)g(`String)f("Hello!"\);)188 2603
-y(server#run)h(\(\))141 2716 y Ff(By)25 b(inheriting)h(from)g
+TeXDict begin 8 7 bop 0 91 a Fg(val)47 b(serve_message)g(:)94
+204 y(?error_handler:\(exn)f(->)h(message\))g(->)94 317
+y(\(string)g(->)g(value)g(list)f(->)h(value\))g(->)94
+430 y(message)g(->)g(message)227 568 y Ff(P)m(erforms)32
+b(the)e(same)h(function)g(as)f Fg(serve)p Ff(,)g(but)h(op)s(erates)f
+(on)h(t)m(yp)s(ed)g(messages)f(instead)h(of)f(strings.)0
+780 y Fg(val)47 b(default_error_handler)f(:)h(exn)g(->)g(message)227
+918 y Ff(The)31 b(default)g(error)g(handler)g(for)g Fg(serve)p
+Ff(.)227 1068 y(This)g(error)g(handler)g(catc)m(hes)h(all)e(exceptions)
+h(and)g(con)m(v)m(erts)g(them)g(in)m(to)h(faults)e(b)m(y)g(wrapping)i
+(them)f(in)227 1181 y Fg(XmlRpc.Error)p Ff(.)0 1394 y
+Fg(val)47 b(quiet_error_handler)f(:)h(exn)g(->)g(message)227
+1532 y Ff(A)30 b("quiet")h(error)g(handler)h(for)e Fg(serve)p
+Ff(.)227 1682 y(This)h(error)g(handler)g(simply)f(re-raises)h(the)g
+(exception.)41 b(Use)30 b(this)g(if)g(y)m(ou)h(w)m(an)m(t)h(exceptions)
+f(to)f(remain)227 1795 y(unhandled)i(so)e(that)h(they)f(will)h(escap)s
+(e)g(to)f(the)h(error)g(log.)41 b(The)30 b(clien)m(t)i(will)f(receiv)m
+(e)g(a)f(generic)227 1908 y("transp)s(ort)h(error",)h(whic)m(h)f(is)f
+(more)h(secure)g(since)f(it)h(do)s(es)f(not)g(rev)m(eal)i(an)m(y)e
+(information)i(ab)s(out)f(the)227 2021 y(sp)s(eci\034c)g(exception)g
+(that)g(o)s(ccurred.)0 2382 y Fi(2)131 b(Mo)t(dule)44
+b Fe(XmlRpcServer)39 b Fi(:)58 b(XmlRp)t(c)44 b(Ligh)l(t)h(serv)l(er.)0
+2703 y Ff(Example:)188 2954 y Fg(let)i(server)g(=)g(new)g
+(XmlRpcServer.cgi)f(\(\))h(in)188 3067 y(server#register)g
+("demo.sayHello")282 3179 y(\(fun)g(_)g(->)g(`String)f("Hello!"\);)188
+3292 y(server#run)h(\(\))141 3405 y Ff(By)25 b(inheriting)h(from)g
Fg(XmlRpcServer.base)p Ff([2.1],)g(all)g(serv)m(ers)f(pro)m(vide)h(the)
-f(follo)m(wing)i(in)m(trosp)s(ection)g(func-)0 2829 y(tions)49
+f(follo)m(wing)i(in)m(trosp)s(ection)g(func-)0 3518 y(tions)49
b(b)m(y)g(default:)79 b Fg(system.listMethods)p Ff(,)53
b Fg(system.getCapabilities)p Ff(.)96 b(T)-8 b(o)50 b(prev)m(en)m(t)h
-(their)e(use,)54 b(use)0 2942 y Fg(server#unregister)p
-Ff(.)141 3055 y(A)m(dditionally)-8 b(,)52 b(the)46 b(metho)s(ds)g
+(their)e(use,)54 b(use)0 3631 y Fg(server#unregister)p
+Ff(.)141 3744 y(A)m(dditionally)-8 b(,)52 b(the)46 b(metho)s(ds)g
Fg(system.methodHelp)g Ff(and)g Fg(system.methodSignature)f
-Ff(will)i(b)s(e)e(made)0 3168 y(a)m(v)-5 b(ailable)32
+Ff(will)i(b)s(e)e(made)0 3857 y(a)m(v)-5 b(ailable)32
b(if)e(at)g(least)h(one)f(metho)s(d)h(help)g(or)g(metho)s(d)f
-(signature)i(is)e(pro)m(vided.)0 3306 y Fg(type)47 b(param_type)g(=)g
-([)g(`Array)94 3419 y(|)g(`Binary)94 3531 y(|)g(`Boolean)94
-3644 y(|)g(`DateTime)94 3757 y(|)g(`Double)94 3870 y(|)g(`Int)94
-3983 y(|)g(`String)94 4096 y(|)g(`Struct)94 4209 y(|)g(`Undefined)g(])
-227 4347 y Ff(T)m(yp)s(e)31 b(of)f(parameters)h(used)g(in)f(metho)s(d)h
-(signatures.)0 4665 y Fc(2.1)112 b(Base)38 b(classes)0
-4861 y Fg(class)47 b(virtual)g(base)g(:)90 4974 y(object)227
-5149 y(val)g(methods)g(:)g(\(string,)g(XmlRpc.value)f(list)h(->)g
-(XmlRpc.value\))g(Hashtbl.t)1927 5400 y Ff(8)p eop end
+(signature)i(is)e(pro)m(vided.)0 3995 y Fg(type)47 b(param_type)g(=)g
+([)g(`Array)94 4108 y(|)g(`Binary)94 4221 y(|)g(`Boolean)94
+4333 y(|)g(`DateTime)94 4446 y(|)g(`Double)94 4559 y(|)g(`Int)94
+4672 y(|)g(`String)94 4785 y(|)g(`Struct)94 4898 y(|)g(`Undefined)g(])
+227 5036 y Ff(T)m(yp)s(e)31 b(of)f(parameters)h(used)g(in)f(metho)s(d)h
+(signatures.)1927 5400 y(8)p eop end
%%Page: 9 9
-TeXDict begin 9 8 bop 427 91 a Ff(Hash)m(table)32 b(mapping)f(metho)s
-(d)g(names)g(to)f(implemen)m(tation)k(functions.)227
-304 y Fg(val)47 b(mutable)g(base64_encoder)g(:)g(string)f(->)h(string)
-427 479 y Ff(Base-64)31 b(binary)g(enco)s(ding)g(function.)227
-692 y Fg(val)47 b(mutable)g(base64_decoder)g(:)g(string)f(->)h(string)
-427 867 y Ff(Base-64)31 b(binary)g(deco)s(ding)g(function.)227
-1079 y Fg(val)47 b(mutable)g(datetime_encoder)g(:)g(XmlRpcDateTime.t)f
-(->)h(string)427 1254 y Ff(ISO-8601)31 b(date/time)h(enco)s(ding)f
-(function.)227 1467 y Fg(val)47 b(mutable)g(datetime_decoder)g(:)g
-(string)f(->)h(XmlRpcDateTime.t)427 1642 y Ff(ISO-8601)31
-b(date/time)h(deco)s(ding)f(function.)227 1855 y Fg(val)47
+TeXDict begin 9 8 bop 0 91 a Fc(2.1)112 b(Base)38 b(classes)0
+287 y Fg(class)47 b(virtual)g(base)g(:)90 400 y(object)227
+574 y(val)g(methods)g(:)g(\(string,)g(XmlRpc.value)f(list)h(->)g
+(XmlRpc.value\))g(Hashtbl.t)427 748 y Ff(Hash)m(table)32
+b(mapping)f(metho)s(d)g(names)g(to)f(implemen)m(tation)k(functions.)227
+959 y Fg(val)47 b(mutable)g(base64_encoder)g(:)g(string)f(->)h(string)
+427 1133 y Ff(Base-64)31 b(binary)g(enco)s(ding)g(function.)227
+1344 y Fg(val)47 b(mutable)g(base64_decoder)g(:)g(string)f(->)h(string)
+427 1519 y Ff(Base-64)31 b(binary)g(deco)s(ding)g(function.)227
+1730 y Fg(val)47 b(mutable)g(datetime_encoder)g(:)g(XmlRpcDateTime.t)f
+(->)h(string)427 1904 y Ff(ISO-8601)31 b(date/time)h(enco)s(ding)f
+(function.)227 2115 y Fg(val)47 b(mutable)g(datetime_decoder)g(:)g
+(string)f(->)h(XmlRpcDateTime.t)427 2289 y Ff(ISO-8601)31
+b(date/time)h(deco)s(ding)f(function.)227 2500 y Fg(val)47
b(mutable)g(error_handler)g(:)g(exn)g(->)f(XmlRpc.message)427
-2030 y Ff(Handler)31 b(for)f(unhandled)i(exceptions.)227
-2242 y Fg(method)47 b(set_base64_encoder)g(:)g(\(string)f(->)h
-(string\))g(->)g(unit)427 2418 y Ff(Sets)31 b(an)f(alternate)i(Base-64)
-f(binary)f(enco)s(ding)i(function.)227 2630 y Fg(method)47
+2675 y Ff(Handler)31 b(for)f(unhandled)i(exceptions.)227
+2886 y Fg(method)47 b(set_base64_encoder)g(:)g(\(string)f(->)h
+(string\))g(->)g(unit)427 3060 y Ff(Sets)31 b(an)f(alternate)i(Base-64)
+f(binary)f(enco)s(ding)i(function.)227 3271 y Fg(method)47
b(set_base64_decoder)g(:)g(\(string)f(->)h(string\))g(->)g(unit)427
-2805 y Ff(Sets)31 b(an)f(alternate)i(Base-64)f(binary)f(deco)s(ding)i
-(function.)227 3018 y Fg(method)47 b(set_datetime_encoder)g(:)g
-(\(XmlRpcDateTime.t)f(->)h(string\))g(->)g(unit)427 3193
+3445 y Ff(Sets)31 b(an)f(alternate)i(Base-64)f(binary)f(deco)s(ding)i
+(function.)227 3656 y Fg(method)47 b(set_datetime_encoder)g(:)g
+(\(XmlRpcDateTime.t)f(->)h(string\))g(->)g(unit)427 3831
y Ff(Sets)31 b(an)f(alternate)i(ISO-8601)f(date/time)h(enco)s(ding)f
-(function.)227 3406 y Fg(method)47 b(set_datetime_decoder)g(:)g
-(\(string)f(->)h(XmlRpcDateTime.t\))g(->)g(unit)427 3581
+(function.)227 4042 y Fg(method)47 b(set_datetime_decoder)g(:)g
+(\(string)f(->)h(XmlRpcDateTime.t\))g(->)g(unit)427 4216
y Ff(Sets)31 b(an)f(alternate)i(ISO-8601)f(date/time)h(deco)s(ding)f
-(function.)227 3793 y Fg(method)47 b(set_error_handler)g(:)g(\(exn)g
-(->)f(XmlRpc.message\))h(->)g(unit)427 3968 y Ff(Sets)31
+(function.)227 4427 y Fg(method)47 b(set_error_handler)g(:)g(\(exn)g
+(->)f(XmlRpc.message\))h(->)g(unit)427 4601 y Ff(Sets)31
b(an)f(alternate)i(handler)f(for)f(unhandled)i(exceptions.)42
-b(See)427 4081 y Fg(XmlRpc.default_error_handler)p Ff([1.4])31
+b(See)427 4714 y Fg(XmlRpc.default_error_handler)p Ff([1.4])31
b(and)f Fg(XmlRpc.quiet_error_handler)p Ff([1.4])h(for)427
-4194 y(examples.)227 4407 y Fg(method)47 b(serve)g(:)321
-4520 y(\(string)g(->)g(XmlRpc.value)g(list)g(->)f(XmlRpc.value\))h(->)g
-(string)g(->)g(string)427 4695 y Ff(F)-8 b(or)31 b(use)f(in)h(sub)s
-(classes;)e(calls)i Fg(XmlRpc.serve)p Ff([1.4])f(with)h(the)g(curren)m
-(t)h(enco)s(ders,)f(deco)s(ders,)g(and)427 4808 y(error)g(handler.)1927
-5400 y(9)p eop end
+4827 y(examples.)227 5038 y Fg(method)47 b(serve)g(:)321
+5151 y(\(string)g(->)g(XmlRpc.value)g(list)g(->)f(XmlRpc.value\))h(->)g
+(string)g(->)g(string)1927 5400 y Ff(9)p eop end
%%Page: 10 10
-TeXDict begin 10 9 bop 227 91 a Fg(method)47 b(register)g(:)321
-204 y(string)g(->)321 317 y(?help:string)g(->)321 430
-y(?signature:XmlRpcServer.param_type)f(list)h(->)321
-543 y(?signatures:XmlRpcServer.param_type)f(list)h(list)g(->)321
-656 y(\(XmlRpc.value)g(list)g(->)g(XmlRpc.value\))f(->)h(unit)427
-821 y Ff(Registers)30 b(a)h(metho)s(d)g(with)f(the)h(serv)m(er.)427
-946 y(If)f(a)g Fg(help)g Ff(string)h(is)f(sp)s(eci\034ed,)g(its)h(con)m
-(ten)m(ts)h(will)e(b)s(e)g(returned)i(for)e(calls)h(to)427
-1059 y Fg(system.methodHelp)f Ff(for)g(this)g(metho)s(d.)427
-1183 y(If)g Fg(signature)g Ff(is)g(sp)s(eci\034ed,)g(this)h(metho)s
+TeXDict begin 10 9 bop 427 91 a Ff(F)-8 b(or)31 b(use)f(in)h(sub)s
+(classes;)e(calls)i Fg(XmlRpc.serve)p Ff([1.4])f(with)h(the)g(curren)m
+(t)h(enco)s(ders,)f(deco)s(ders,)g(and)427 204 y(error)g(handler.)227
+401 y Fg(method)47 b(serve_message)g(:)321 514 y(\(string)g(->)g
+(XmlRpc.value)g(list)g(->)f(XmlRpc.value\))h(->)321 627
+y(XmlRpc.message)g(->)g(XmlRpc.message)427 795 y Ff(Lik)m(e)31
+b Fg(serve)p Ff(,)g(but)f(op)s(erates)h(on)f(messages)h(instead)f(of)g
+(strings.)227 992 y Fg(method)47 b(register)g(:)321 1104
+y(string)g(->)321 1217 y(?help:string)g(->)321 1330 y
+(?signature:XmlRpcServer.param_type)f(list)h(->)321 1443
+y(?signatures:XmlRpcServer.param_type)f(list)h(list)g(->)321
+1556 y(\(XmlRpc.value)g(list)g(->)g(XmlRpc.value\))f(->)h(unit)427
+1724 y Ff(Registers)30 b(a)h(metho)s(d)g(with)f(the)h(serv)m(er.)427
+1849 y(If)f(a)g Fg(help)g Ff(string)h(is)f(sp)s(eci\034ed,)g(its)h(con)
+m(ten)m(ts)h(will)e(b)s(e)g(returned)i(for)e(calls)h(to)427
+1962 y Fg(system.methodHelp)f Ff(for)g(this)g(metho)s(d.)427
+2088 y(If)g Fg(signature)g Ff(is)g(sp)s(eci\034ed,)g(this)h(metho)s
(d's)f(signature)i(will)e(b)s(e)g(published)i(b)m(y)427
-1296 y Fg(system.methodSignature)e Ff(and)h(\(shallo)m(w\))g(t)m(yp)s
+2201 y Fg(system.methodSignature)e Ff(and)h(\(shallo)m(w\))g(t)m(yp)s
(e-c)m(hec)m(king)i(will)e(b)s(e)f(enabled)h(for)f(parameters)427
-1409 y(passed)h(in)m(to)g(this)f(metho)s(d.)427 1534
+2314 y(passed)h(in)m(to)g(this)f(metho)s(d.)427 2439
y(Multiple)h(signatures)g(can)g(b)s(e)f(supplied)h(via)f
Fg(signatures)g Ff(if)g(desired)h(to)f(pro)m(vide)i(for)e(o)m(v)m
-(erloaded)427 1647 y(metho)s(ds.)427 1771 y(Signatures)i(are)e(of)g
+(erloaded)427 2552 y(metho)s(ds.)427 2678 y(Signatures)i(are)e(of)g
(the)h(form)g Fg(return-type;)46 b(param1-type;)h(param2-type;)g(...)40
-b Ff(where)427 1884 y(eac)m(h)32 b(t)m(yp)s(e)e(is)g(an)h(instance)g
+b Ff(where)427 2791 y(eac)m(h)32 b(t)m(yp)s(e)e(is)g(an)h(instance)g
(of)f(the)g Fg(XmlRpcServer.param_type)p Ff([2])g(v)-5
-b(arian)m(t.)227 2077 y Fg(method)47 b(unregister)g(:)g(string)g(->)g
-(unit)427 2242 y Ff(Remo)m(v)m(es)31 b(a)f(metho)s(d)h(from)g(the)g
-(serv)m(er.)227 2435 y Fg(method)47 b(virtual)g(run)g(:)g(unit)g(->)g
-(unit)427 2601 y Ff(Starts)31 b(the)g(main)g(serv)m(er)f(pro)s(cess.)90
-2806 y Fg(end)227 2979 y Ff(Abstract)h(base)f(class)g(for)g(XmlRp)s(c)g
-(serv)m(ers.)0 3172 y Fg(class)47 b(type)g(server)g(=)90
-3285 y(object)227 3448 y(inherit)g(XmlRpcServer.base)30
-b Ff([2.1])227 3581 y Fg(method)47 b(run)g(:)g(unit)g(->)g(unit)427
-3746 y Ff(Starts)31 b(the)g(main)g(serv)m(er)f(pro)s(cess.)90
-3951 y Fg(end)227 4124 y Ff(T)m(yp)s(e)h(of)f(concrete)h(XmlRp)s(c)f
-(serv)m(er)h(classes.)0 4423 y Fc(2.2)112 b(Serv)m(er)38
-b(implemen)m(tations)0 4615 y Fg(class)47 b(cgi)g(:)g(unit)g(->)g
-(server)227 4747 y Ff(CGI)30 b(XmlRp)s(c)g(serv)m(er)h(based)f(on)h
-(Netcgi2.)0 4940 y Fg(class)47 b(netplex)g(:)g
-(?parallelizer:Netplex_types.parallelizer)f(->)h(?handler:string)f(->)h
-(unit)g(->)g(server)227 5073 y Ff(Stand-alone)32 b(XmlRp)s(c)e(serv)m
-(er)h(based)f(on)h(Netplex.)1905 5400 y(10)p eop end
+b(arian)m(t.)227 2988 y Fg(method)47 b(unregister)g(:)g(string)g(->)g
+(unit)427 3155 y Ff(Remo)m(v)m(es)31 b(a)f(metho)s(d)h(from)g(the)g
+(serv)m(er.)227 3352 y Fg(method)47 b(virtual)g(run)g(:)g(unit)g(->)g
+(unit)427 3520 y Ff(Starts)31 b(the)g(main)g(serv)m(er)f(pro)s(cess.)90
+3729 y Fg(end)227 3905 y Ff(Abstract)h(base)f(class)g(for)g(XmlRp)s(c)g
+(serv)m(ers.)0 4102 y Fg(class)47 b(type)g(server)g(=)90
+4215 y(object)227 4383 y(inherit)g(XmlRpcServer.base)30
+b Ff([2.1])227 4517 y Fg(method)47 b(run)g(:)g(unit)g(->)g(unit)427
+4685 y Ff(Starts)31 b(the)g(main)g(serv)m(er)f(pro)s(cess.)90
+4894 y Fg(end)227 5070 y Ff(T)m(yp)s(e)h(of)f(concrete)h(XmlRp)s(c)f
+(serv)m(er)h(classes.)1905 5400 y(10)p eop end
%%Page: 11 11
-TeXDict begin 11 10 bop 0 91 a Fc(2.3)112 b(Utilit)m(y)34
-b(functions)0 288 y Fg(val)47 b(invalid_method)g(:)g(string)f(->)h('a)
-227 426 y Ff(Raise)30 b(an)h Fg(XmlRpc.Error)p Ff([1.1])f(indicating)i
-(a)e(metho)s(d)h(name)g(not)g(found.)0 638 y Fg(val)47
-b(invalid_params)g(:)g(unit)f(->)h('a)227 776 y Ff(Raise)30
+TeXDict begin 11 10 bop 0 91 a Fc(2.2)112 b(Serv)m(er)38
+b(implemen)m(tations)0 288 y Fg(class)47 b(cgi)g(:)g(unit)g(->)g
+(server)227 426 y Ff(CGI)30 b(XmlRp)s(c)g(serv)m(er)h(based)f(on)h
+(Netcgi2.)0 638 y Fg(class)47 b(netplex)g(:)g
+(?parallelizer:Netplex_types.parallelizer)f(->)h(?handler:string)f(->)h
+(unit)g(->)g(server)227 776 y Ff(Stand-alone)32 b(XmlRp)s(c)e(serv)m
+(er)h(based)f(on)h(Netplex.)0 1094 y Fc(2.3)112 b(Utilit)m(y)34
+b(functions)0 1291 y Fg(val)47 b(invalid_method)g(:)g(string)f(->)h('a)
+227 1428 y Ff(Raise)30 b(an)h Fg(XmlRpc.Error)p Ff([1.1])f(indicating)i
+(a)e(metho)s(d)h(name)g(not)g(found.)0 1641 y Fg(val)47
+b(invalid_params)g(:)g(unit)f(->)h('a)227 1779 y Ff(Raise)30
b(an)h Fg(XmlRpc.Error)p Ff([1.1])f(indicating)i(in)m(v)-5
-b(alid)31 b(metho)s(d)g(parameters.)0 1137 y Fi(3)131
+b(alid)31 b(metho)s(d)g(parameters.)0 2140 y Fi(3)131
b(Mo)t(dule)44 b Fe(XmlRpcDateTime)39 b Fi(:)58 b(Date/time)43
-b(t)l(yp)t(e.)0 1461 y Fc(3.1)112 b(T)m(yp)s(es)0 1658
-y Fg(exception)47 b(Parse_error)f(of)h(string)227 1796
+b(t)l(yp)t(e.)0 2464 y Fc(3.1)112 b(T)m(yp)s(es)0 2661
+y Fg(exception)47 b(Parse_error)f(of)h(string)227 2799
y Ff(Raised)30 b(b)m(y)h Fg(XmlRpcDateTime.of_string)p
Ff([3.6])f(if)g(a)g(string)h(could)g(not)g(b)s(e)f(parsed.)41
-b(The)31 b(exception)227 1909 y(con)m(tains)h(the)f(input)g(string.)0
-2121 y Fg(type)47 b(t)g(=)g(int)g(*)g(int)g(*)g(int)f(*)h(int)g(*)g
-(int)g(*)g(int)g(*)g(int)227 2259 y Ff(T)m(yp)s(e)31
+b(The)31 b(exception)227 2912 y(con)m(tains)h(the)f(input)g(string.)0
+3124 y Fg(type)47 b(t)g(=)g(int)g(*)g(int)g(*)g(int)f(*)h(int)g(*)g
+(int)g(*)g(int)g(*)g(int)227 3262 y Ff(T)m(yp)s(e)31
b(of)f(XmlRp)s(c-compatible)i(date/time)f(v)-5 b(alues.)41
b(\(y)m(ear,)31 b(mon)m(th,)h(da)m(y)-8 b(,)31 b(hour,)g(min)m(ute,)h
-(second,)227 2372 y(time)f(zone)g(o\033set)f(in)h(min)m(utes\))0
-2690 y Fc(3.2)112 b(Comparison)0 2887 y Fg(val)47 b(compare)g(:)g(t)g
-(->)g(t)g(->)f(int)227 3024 y Ff(Standard)32 b(comparator)g(for)e
+(second,)227 3375 y(time)f(zone)g(o\033set)f(in)h(min)m(utes\))0
+3693 y Fc(3.2)112 b(Comparison)0 3889 y Fg(val)47 b(compare)g(:)g(t)g
+(->)g(t)g(->)f(int)227 4027 y Ff(Standard)32 b(comparator)g(for)e
(date/time)i(v)-5 b(alues.)40 b(Con)m(v)m(erts)32 b(all)f(v)-5
b(alues)30 b(to)g(UTC)h(b)s(efore)f(comparing)i(to)227
-3137 y(ensure)f(correct)g(b)s(eha)m(vior)h(with)e(v)-5
-b(alues)31 b(of)f(di\033ering)h(time)g(zones.)0 3350
+4140 y(ensure)f(correct)g(b)s(eha)m(vior)h(with)e(v)-5
+b(alues)31 b(of)f(di\033ering)h(time)g(zones.)0 4353
y Fg(val)47 b(equal)g(:)g(t)g(->)g(t)g(->)f(bool)227
-3488 y Ff(Standard)32 b(equalit)m(y)f(function)g(for)f(date/time)i(v)-5
+4491 y Ff(Standard)32 b(equalit)m(y)f(function)g(for)f(date/time)i(v)-5
b(alues.)40 b(Con)m(v)m(erts)32 b(all)f(v)-5 b(alues)30
-b(to)g(UTC)h(b)s(efore)227 3601 y(comparing.)0 3813 y
-Fg(val)47 b(hash)g(:)g(t)g(->)g(int)227 3951 y Ff(Standard)32
+b(to)g(UTC)h(b)s(efore)227 4603 y(comparing.)0 4816 y
+Fg(val)47 b(hash)g(:)g(t)g(->)g(int)227 4954 y Ff(Standard)32
b(hash)e(function)h(for)g(date/time)g(v)-5 b(alues.)41
b(Con)m(v)m(erts)32 b(v)-5 b(alues)30 b(to)g(UTC)h(b)s(efore)f
-(hashing.)0 4269 y Fc(3.3)112 b(Curren)m(t)37 b(date)h(and)g(time)0
-4466 y Fg(val)47 b(now)g(:)g(unit)g(->)g(t)227 4603 y
-Ff(Returns)31 b(the)f(curren)m(t)i(date)f(and)g(time)g(in)f(the)h(lo)s
-(cal)f(time)h(zone.)0 4816 y Fg(val)47 b(now_utc)g(:)g(unit)g(->)f(t)
-227 4954 y Ff(Returns)31 b(the)f(curren)m(t)i(date)f(and)g(time)g(in)f
-(UTC.)1905 5400 y(11)p eop end
+(hashing.)1905 5400 y(11)p eop end
%%Page: 12 12
-TeXDict begin 12 11 bop 0 91 a Fc(3.4)112 b(Time)36 b(zone)i(adjustmen)
-m(ts)0 287 y Fg(val)47 b(set_tz_offset)g(:)g(int)f(->)h(t)g(->)g(t)227
-424 y Ff(A)m(djusts)30 b(the)h(time)g(zone)g(o\033set,)f(preserving)h
-(equalit)m(y)-8 b(.)0 633 y Fg(val)47 b(fix_tz_offset)g(:)g(int)f(->)h
-(t)g(->)g(t)227 770 y Ff(F)-8 b(orces)31 b(the)g(time)g(zone)g
+TeXDict begin 12 11 bop 0 91 a Fc(3.3)112 b(Curren)m(t)37
+b(date)h(and)g(time)0 287 y Fg(val)47 b(now)g(:)g(unit)g(->)g(t)227
+424 y Ff(Returns)31 b(the)f(curren)m(t)i(date)f(and)g(time)g(in)f(the)h
+(lo)s(cal)f(time)h(zone.)0 633 y Fg(val)47 b(now_utc)g(:)g(unit)g(->)f
+(t)227 770 y Ff(Returns)31 b(the)f(curren)m(t)i(date)f(and)g(time)g(in)
+f(UTC.)0 1084 y Fc(3.4)112 b(Time)36 b(zone)i(adjustmen)m(ts)0
+1280 y Fg(val)47 b(set_tz_offset)g(:)g(int)f(->)h(t)g(->)g(t)227
+1417 y Ff(A)m(djusts)30 b(the)h(time)g(zone)g(o\033set,)f(preserving)h
+(equalit)m(y)-8 b(.)0 1626 y Fg(val)47 b(fix_tz_offset)g(:)g(int)f(->)h
+(t)g(->)g(t)227 1763 y Ff(F)-8 b(orces)31 b(the)g(time)g(zone)g
(o\033set)f(to)g(a)h(di\033eren)m(t)g(v)-5 b(alue,)31
b(ignoring)h(all)e(other)h(\034elds.)41 b(Use)30 b(this)g(to)g(correct)
-227 883 y(the)h(time)g(zone)g(of)f(a)g(date/time)i(v)-5
+227 1875 y(the)h(time)g(zone)g(of)f(a)g(date/time)i(v)-5
b(alue)30 b(that)h(w)m(as)g(receiv)m(ed)h(without)f(a)f(time)h(zone)g
-(o\033set)f(and)h(is)227 995 y(kno)m(wn)h(not)e(to)h(b)s(e)f(UTC.)0
-1310 y Fc(3.5)112 b(Con)m(v)m(ersion)0 1506 y Fg(val)47
-b(from_unixfloat)g(:)g(float)f(->)h(t)227 1643 y Ff(Builds)31
+(o\033set)f(and)h(is)227 1988 y(kno)m(wn)h(not)e(to)h(b)s(e)f(UTC.)0
+2303 y Fc(3.5)112 b(Con)m(v)m(ersion)0 2499 y Fg(val)47
+b(from_unixfloat)g(:)g(float)f(->)h(t)227 2635 y Ff(Builds)31
b(a)f(date/time)i(v)-5 b(alue)30 b(from)h(ep)s(o)s(c)m(h)g(seconds)f
-(in)g(the)h(lo)s(cal)g(time)g(zone.)0 1851 y Fg(val)47
-b(from_unixfloat_utc)f(:)h(float)g(->)g(t)227 1988 y
+(in)g(the)h(lo)s(cal)g(time)g(zone.)0 2844 y Fg(val)47
+b(from_unixfloat_utc)f(:)h(float)g(->)g(t)227 2981 y
Ff(Builds)31 b(a)f(date/time)i(v)-5 b(alue)30 b(from)h(ep)s(o)s(c)m(h)g
-(seconds)f(in)g(UTC.)0 2197 y Fg(val)47 b(to_unixfloat)g(:)g(t)g(->)f
-(float)227 2334 y Ff(Con)m(v)m(erts)32 b(a)e(date/time)i(v)-5
+(seconds)f(in)g(UTC.)0 3190 y Fg(val)47 b(to_unixfloat)g(:)g(t)g(->)f
+(float)227 3327 y Ff(Con)m(v)m(erts)32 b(a)e(date/time)i(v)-5
b(alue)31 b(to)f(ep)s(o)s(c)m(h)h(seconds)f(in)h(the)f(lo)s(cal)h(time)
-g(zone.)0 2543 y Fg(val)47 b(to_unixfloat_utc)g(:)f(t)h(->)g(float)227
-2680 y Ff(Con)m(v)m(erts)32 b(a)e(date/time)i(v)-5 b(alue)31
-b(to)f(ep)s(o)s(c)m(h)h(seconds)f(in)h(UTC.)0 2889 y
-Fg(val)47 b(from_unixtm)g(:)g(Unix.tm)f(->)h(t)227 3026
+g(zone.)0 3536 y Fg(val)47 b(to_unixfloat_utc)g(:)f(t)h(->)g(float)227
+3673 y Ff(Con)m(v)m(erts)32 b(a)e(date/time)i(v)-5 b(alue)31
+b(to)f(ep)s(o)s(c)m(h)h(seconds)f(in)h(UTC.)0 3882 y
+Fg(val)47 b(from_unixtm)g(:)g(Unix.tm)f(->)h(t)227 4019
y Ff(Builds)31 b(a)f(date/time)i(v)-5 b(alue)30 b(from)h(a)f(Unix.tm)h
(v)-5 b(alue)30 b(in)h(the)g(lo)s(cal)f(time)h(zone.)0
-3235 y Fg(val)47 b(from_unixtm_utc)g(:)f(Unix.tm)h(->)g(t)227
-3372 y Ff(Builds)31 b(a)f(date/time)i(v)-5 b(alue)30
-b(from)h(a)f(Unix.tm)h(v)-5 b(alue)30 b(in)h(UTC.)0 3581
-y Fg(val)47 b(to_unixtm)g(:)g(t)g(->)g(Unix.tm)227 3717
+4228 y Fg(val)47 b(from_unixtm_utc)g(:)f(Unix.tm)h(->)g(t)227
+4365 y Ff(Builds)31 b(a)f(date/time)i(v)-5 b(alue)30
+b(from)h(a)f(Unix.tm)h(v)-5 b(alue)30 b(in)h(UTC.)0 4573
+y Fg(val)47 b(to_unixtm)g(:)g(t)g(->)g(Unix.tm)227 4710
y Ff(Con)m(v)m(erts)32 b(a)e(date/time)i(v)-5 b(alue)31
b(to)f(a)h(Unix.tm)f(v)-5 b(alue)31 b(in)f(the)h(lo)s(cal)f(time)h
-(zone.)0 3926 y Fg(val)47 b(to_unixtm_utc)g(:)g(t)f(->)h(Unix.tm)227
-4063 y Ff(Con)m(v)m(erts)32 b(a)e(date/time)i(v)-5 b(alue)31
-b(to)f(a)h(Unix.tm)f(v)-5 b(alue)31 b(in)f(UTC.)0 4378
-y Fc(3.6)112 b(ISO-8601)38 b(parsing)g(and)g(generation)0
-4573 y Fg(val)47 b(of_string)g(:)g(string)f(->)h(t)227
-4710 y Ff(P)m(arses)31 b(an)g(\(XmlRp)s(c-\035a)m(v)m(or\))g(ISO-8601)h
-(date/time)g(v)-5 b(alue)30 b(from)h(a)f(string.)0 4919
-y Fg(val)47 b(to_string)g(:)g(t)g(->)g(string)227 5056
-y Ff(Generates)31 b(an)g(ISO-8601)g(string)g(from)f(a)g(date/time)i(v)
--5 b(alue.)1905 5400 y(12)p eop end
+(zone.)0 4919 y Fg(val)47 b(to_unixtm_utc)g(:)g(t)f(->)h(Unix.tm)227
+5056 y Ff(Con)m(v)m(erts)32 b(a)e(date/time)i(v)-5 b(alue)31
+b(to)f(a)h(Unix.tm)f(v)-5 b(alue)31 b(in)f(UTC.)1905
+5400 y(12)p eop end
%%Page: 13 13
-TeXDict begin 13 12 bop 0 91 a Fi(4)131 b(Mo)t(dule)44
-b Fe(XmlRpcBase64)39 b Fi(:)58 b(Base64)44 b(co)t(dec.)0
-294 y Ff(8-bit)33 b(c)m(haracters)h(are)f(enco)s(ded)h(in)m(to)f(6-bit)
-g(ones)g(using)g(ASCI)s(I)e(lo)s(okup)i(tables.)48 b(Default)32
-b(tables)h(maps)g(0..63)0 407 y(v)-5 b(alues)30 b(on)h(c)m(haracters)h
-(A-Z,)e(a-z,)h(0-9,)g('+')f(and)h('/')g(\(in)f(that)h(order\).)0
-663 y Fg(exception)47 b(Invalid_char)227 801 y Ff(This)31
+TeXDict begin 13 12 bop 0 91 a Fc(3.6)112 b(ISO-8601)38
+b(parsing)g(and)g(generation)0 288 y Fg(val)47 b(of_string)g(:)g
+(string)f(->)h(t)227 426 y Ff(P)m(arses)31 b(an)g(\(XmlRp)s(c-\035a)m
+(v)m(or\))g(ISO-8601)h(date/time)g(v)-5 b(alue)30 b(from)h(a)f(string.)
+0 638 y Fg(val)47 b(to_string)g(:)g(t)g(->)g(string)227
+776 y Ff(Generates)31 b(an)g(ISO-8601)g(string)g(from)f(a)g(date/time)i
+(v)-5 b(alue.)0 1137 y Fi(4)131 b(Mo)t(dule)44 b Fe(XmlRpcBase64)39
+b Fi(:)58 b(Base64)44 b(co)t(dec.)0 1340 y Ff(8-bit)33
+b(c)m(haracters)h(are)f(enco)s(ded)h(in)m(to)f(6-bit)g(ones)g(using)g
+(ASCI)s(I)e(lo)s(okup)i(tables.)48 b(Default)32 b(tables)h(maps)g
+(0..63)0 1453 y(v)-5 b(alues)30 b(on)h(c)m(haracters)h(A-Z,)e(a-z,)h
+(0-9,)g('+')f(and)h('/')g(\(in)f(that)h(order\).)0 1709
+y Fg(exception)47 b(Invalid_char)227 1847 y Ff(This)31
b(exception)g(is)f(raised)h(when)g(reading)g(an)g(in)m(v)-5
b(alid)31 b(c)m(haracter)h(from)f(a)f(base64)h(input.)0
-1013 y Fg(exception)47 b(Invalid_table)227 1151 y Ff(This)31
+2059 y Fg(exception)47 b(Invalid_table)227 2197 y Ff(This)31
b(exception)g(is)f(raised)h(if)e(the)i(enco)s(ding)g(or)g(deco)s(ding)g
-(table)g(size)f(is)g(not)h(correct.)0 1364 y Fg(type)47
-b(encoding_table)g(=)f(char)h(array)227 1502 y Ff(An)30
+(table)g(size)f(is)g(not)h(correct.)0 2410 y Fg(type)47
+b(encoding_table)g(=)f(char)h(array)227 2547 y Ff(An)30
b(enco)s(ding)i(table)f(maps)f(in)m(tegers)i(0..63)f(to)f(the)h
-(corresp)s(onding)g(c)m(har.)0 1714 y Fg(type)47 b(decoding_table)g(=)f
-(int)h(array)227 1852 y Ff(A)30 b(deco)s(ding)h(table)g(maps)g(c)m
+(corresp)s(onding)g(c)m(har.)0 2760 y Fg(type)47 b(decoding_table)g(=)f
+(int)h(array)227 2898 y Ff(A)30 b(deco)s(ding)h(table)g(maps)g(c)m
(hars)g(0..255)g(to)g(the)f(corresp)s(onding)i(0..63)f(v)-5
b(alue)30 b(or)h(-1)f(if)g(the)h(c)m(har)g(is)f(not)227
-1965 y(accepted.)0 2177 y Fg(val)47 b(str_encode)g(:)g
+3011 y(accepted.)0 3223 y Fg(val)47 b(str_encode)g(:)g
(?tbl:encoding_table)f(->)h(string)g(->)g(string)227
-2315 y Ff(Enco)s(de)31 b(a)g(string)f(in)m(to)i(Base64.)0
-2528 y Fg(val)47 b(str_decode)g(:)g(?tbl:decoding_table)f(->)h(string)g
-(->)g(string)227 2666 y Ff(Deco)s(de)30 b(a)f(string)g(enco)s(ded)h(in)
+3361 y Ff(Enco)s(de)31 b(a)g(string)f(in)m(to)i(Base64.)0
+3574 y Fg(val)47 b(str_decode)g(:)g(?tbl:decoding_table)f(->)h(string)g
+(->)g(string)227 3711 y Ff(Deco)s(de)30 b(a)f(string)g(enco)s(ded)h(in)
m(to)g(Base64,)g(raise)f Fg(Invalid_char)g Ff(if)g(a)g(c)m(haracter)i
-(in)e(the)h(input)g(string)f(is)227 2778 y(not)i(a)f(v)-5
-b(alid)31 b(one.)0 2991 y Fg(val)47 b(encode)g(:)g(?tbl:encoding_table)
-f(->)h(char)g(Stream.t)g(->)g(char)g(Stream.t)227 3129
+(in)e(the)h(input)g(string)f(is)227 3824 y(not)i(a)f(v)-5
+b(alid)31 b(one.)0 4037 y Fg(val)47 b(encode)g(:)g(?tbl:encoding_table)
+f(->)h(char)g(Stream.t)g(->)g(char)g(Stream.t)227 4175
y Ff(Generic)31 b(base64)g(enco)s(ding)g(o)m(v)m(er)h(a)e(c)m(haracter)
-i(stream.)0 3341 y Fg(val)47 b(decode)g(:)g(?tbl:decoding_table)f(->)h
-(char)g(Stream.t)g(->)g(char)g(Stream.t)227 3479 y Ff(Generic)31
+i(stream.)0 4387 y Fg(val)47 b(decode)g(:)g(?tbl:decoding_table)f(->)h
+(char)g(Stream.t)g(->)g(char)g(Stream.t)227 4525 y Ff(Generic)31
b(base64)g(deco)s(ding)g(o)m(v)m(er)h(a)e(c)m(haracter)i(stream.)0
-3692 y Fg(val)47 b(make_decoding_table)f(:)h(encoding_table)g(->)g
-(decoding_table)227 3830 y Ff(Create)32 b(a)e(v)-5 b(alid)30
+4738 y Fg(val)47 b(make_decoding_table)f(:)h(encoding_table)g(->)g
+(decoding_table)227 4875 y Ff(Create)32 b(a)e(v)-5 b(alid)30
b(deco)s(ding)i(table)f(from)f(an)h(enco)s(ding)g(one.)1905
5400 y(13)p eop end
%%Trailer
diff --git a/doc/xmlrpc-light/latex/doc.tex b/doc/xmlrpc-light/latex/doc.tex
index a203cb9..f9bde20 100644
--- a/doc/xmlrpc-light/latex/doc.tex
+++ b/doc/xmlrpc-light/latex/doc.tex
@@ -18,7 +18,7 @@
interface, and low-level tools that can be used to implement a server.
- {\it (c) 2007 Dave Benjamin}
+ {\it (c) 2007-2009 Dave Benjamin}
@@ -382,7 +382,7 @@ Class for XmlRpc clients. Takes a single mandatory argument, {\tt{url}}.
The {\tt{debug}} setting, if true, will enable verbose debugging output to
- the standard error strem.
+ the standard error stream.
\end{ocamldocdescription}
@@ -697,6 +697,23 @@ Creates a function from string (Xml representing a {\tt{MethodCall}}) to
+\label{val:XmlRpc.serve-underscoremessage}\begin{ocamldoccode}
+val serve_message :
+ ?error_handler:(exn -> message) ->
+ (string -> value list -> value) ->
+ message -> message
+\end{ocamldoccode}
+\index{serve-underscoremessage@\verb`serve_message`}
+\begin{ocamldocdescription}
+Performs the same function as {\tt{serve}}, but operates on typed messages
+ instead of strings.
+
+
+\end{ocamldocdescription}
+
+
+
+
\label{val:XmlRpc.default-underscoreerror-underscorehandler}\begin{ocamldoccode}
val default_error_handler : exn -> message
\end{ocamldoccode}
@@ -932,6 +949,19 @@ For use in subclasses; calls {\tt{XmlRpc.serve}}[\ref{val:XmlRpc.serve}] with th
\end{ocamldocdescription}
+\label{method:XmlRpcServer.base.serve-underscoremessage}\begin{ocamldoccode}
+method serve_message :
+ (string -> XmlRpc.value list -> XmlRpc.value) ->
+ XmlRpc.message -> XmlRpc.message
+\end{ocamldoccode}
+\index{serve-underscoremessage@\verb`serve_message`}
+\begin{ocamldocdescription}
+Like {\tt{serve}}, but operates on messages instead of strings.
+
+
+\end{ocamldocdescription}
+
+
\label{method:XmlRpcServer.base.register}\begin{ocamldoccode}
method register :
string ->
diff --git a/doc/xmlrpc-light/latex/doc.toc b/doc/xmlrpc-light/latex/doc.toc
index abb904b..e36b64e 100644
--- a/doc/xmlrpc-light/latex/doc.toc
+++ b/doc/xmlrpc-light/latex/doc.toc
@@ -4,14 +4,14 @@
\contentsline {subsection}{\numberline {1.3}Low-level interface}{6}
\contentsline {subsection}{\numberline {1.4}Server tools}{7}
\contentsline {section}{\numberline {2}Module {\tt {XmlRpcServer}} : XmlRpc Light server.}{8}
-\contentsline {subsection}{\numberline {2.1}Base classes}{8}
-\contentsline {subsection}{\numberline {2.2}Server implementations}{10}
+\contentsline {subsection}{\numberline {2.1}Base classes}{9}
+\contentsline {subsection}{\numberline {2.2}Server implementations}{11}
\contentsline {subsection}{\numberline {2.3}Utility functions}{11}
\contentsline {section}{\numberline {3}Module {\tt {XmlRpcDateTime}} : Date/time type.}{11}
\contentsline {subsection}{\numberline {3.1}Types}{11}
\contentsline {subsection}{\numberline {3.2}Comparison}{11}
-\contentsline {subsection}{\numberline {3.3}Current date and time}{11}
+\contentsline {subsection}{\numberline {3.3}Current date and time}{12}
\contentsline {subsection}{\numberline {3.4}Time zone adjustments}{12}
\contentsline {subsection}{\numberline {3.5}Conversion}{12}
-\contentsline {subsection}{\numberline {3.6}ISO-8601 parsing and generation}{12}
+\contentsline {subsection}{\numberline {3.6}ISO-8601 parsing and generation}{13}
\contentsline {section}{\numberline {4}Module {\tt {XmlRpcBase64}} : Base64 codec.}{13}
diff --git a/doc/xmlrpc-light/svn-commit.tmp~ b/doc/xmlrpc-light/svn-commit.tmp~
deleted file mode 100644
index ae892a2..0000000
--- a/doc/xmlrpc-light/svn-commit.tmp~
+++ /dev/null
@@ -1,5 +0,0 @@
-
---This line, and those below, will be ignored--
-
-_M html/XmlRpcDateTime.html
-_M html/type_XmlRpcDateTime.html
diff --git a/examples/README.txt b/examples/README.txt
index 4037961..9ef0b22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -5,4 +5,5 @@ Source code examples:
- adder: simple XmlRpcServer example, adds two numbers
- genclient: code generation tool using introspection methods
+ - ubigraph: bindings to Ubigraph visualization tool
- wordpress: client interface for WordPress blog API
diff --git a/examples/adder/adder.ml b/examples/adder/adder.ml
index 8f84261..f717499 100644
--- a/examples/adder/adder.ml
+++ b/examples/adder/adder.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/examples/genclient/genclient.ml b/examples/genclient/genclient.ml
index cc2e79c..388335e 100644
--- a/examples/genclient/genclient.ml
+++ b/examples/genclient/genclient.ml
@@ -1,14 +1,39 @@
+(*
+ * XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
+ * Copyright (C) 2007-2008 Dave Benjamin (dave@ramenlabs.com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *)
+
open Printf
module StringMap = Map.Make(String)
+let url = ref ""
+
+let use_int32 = ref false
+let use_multicall = ref false
+let verbose = ref false
+
let variant_name = function
| `String "array" -> Some "`Array"
| `String "base64" -> Some "`Binary"
| `String "boolean" -> Some "`Boolean"
| `String "dateTime.iso8601" -> Some "`DateTime"
| `String "double" -> Some "`Double"
- | `String "int" -> Some "`Int"
+ | `String "int" -> Some (if !use_int32 then "`Int32" else "`Int")
| `String "string" -> Some "`String"
| `String "struct" -> Some "`Struct"
| `String "undefined" -> None
@@ -25,12 +50,15 @@ let dot_to_underscore s =
s
let () =
- if Array.length Sys.argv < 2
- then (printf "Usage: %s url\n" Sys.argv.(0); exit 1)
- else ()
+ let specs =
+ ["-i", Arg.Set use_int32, "Use int32 for all integers";
+ "-m", Arg.Set use_multicall, "Generate lazy interface using multicall";
+ "-v", Arg.Set verbose, "Display verbose debugging output"] in
+ let usage = (sprintf "Usage: %s [-i] [-m] [-v] url" Sys.argv.(0)) in
+ Arg.parse specs (fun url' -> url := url') usage;
+ if !url = "" then (Arg.usage specs usage; exit 2)
-let url = Sys.argv.(1)
-let rpc = new XmlRpc.client url
+let rpc = new XmlRpc.client ~debug:!verbose !url
let methods = rpc#call "system.listMethods" []
@@ -111,32 +139,58 @@ let impl_with_signature module_name func_name name =
| None ->
sprintf "_%d" i)
params)) in
+ let mc_init =
+ if !use_multicall
+ then "if mc#executed then mc <- new XmlRpc.multicall rpc;\n "
+ else "" in
+ let rpc_call = if !use_multicall then "mc#call" else "rpc#call" in
+ let begin_lazy_force, lazy_force, end_lazy_force =
+ if !use_multicall
+ then "lazy (", "Lazy.force ", ")"
+ else "", "", "" in
(match variant_name result with
| Some result_type ->
sprintf " method %s %s =
- match rpc#call \"%s.%s\" [%s] with
+ %slet result = %s \"%s.%s\" [%s] in
+ %smatch %sresult with
| %s r -> r
- | other -> raise (Type_error (XmlRpc.dump other))"
+ | other -> raise (Type_error (XmlRpc.dump other))%s"
func_name
(if param_names = "" then "()" else param_names)
+ mc_init
+ rpc_call
module_name
name
param_values
- result_type
+ begin_lazy_force
+ lazy_force
+ (if result_type = "`Int32"
+ then "`Int r -> Int32.of_int r | `Int32"
+ else result_type)
+ end_lazy_force
| None ->
sprintf " method %s %s =
- rpc#call \"%s.%s\" [%s]"
+ %s%s \"%s.%s\" [%s]"
func_name
(if param_names = "" then "()" else param_names)
+ mc_init
+ rpc_call
module_name
name
param_values)
| _ -> failwith "method signature was not an array"
let impl_without_signature module_name func_name name =
+ let mc_init =
+ if !use_multicall
+ then "if mc#executed then mc <- new XmlRpc.multicall rpc;\n "
+ else "" in
+ let rpc_call = if !use_multicall then "mc#call" else "rpc#call" in
sprintf " method %s params =
- rpc#call \"%s.%s\" params"
+ %s%s \"%s.%s\" params"
func_name
+ mc_init
+ rpc_call
module_name
name
@@ -185,9 +239,17 @@ let objects =
(impls module_name meths))
module_map))
+let multicall =
+ if !use_multicall
+ then "
+ val mutable mc = new XmlRpc.multicall rpc
+ method mc = mc
+"
+ else ""
+
let () =
- printf "(* Automatically generated by running genclient with an
- XML-RPC server located at the following URL:
+ printf "(* Automatically generated from an XML-RPC server
+ by running the following command:
%s
*)
@@ -195,10 +257,10 @@ let () =
exception Type_error of string
class client url =
+ let rpc = new XmlRpc.client url in
object (self)
- val rpc = new XmlRpc.client url
method rpc = rpc
-
+%s
%s
end
-" url objects
+" (String.concat " " (Array.to_list Sys.argv)) multicall objects
diff --git a/examples/ubigraph/Makefile b/examples/ubigraph/Makefile
new file mode 100644
index 0000000..fd29771
--- /dev/null
+++ b/examples/ubigraph/Makefile
@@ -0,0 +1,7 @@
+OCAMLMAKEFILE = OCamlMakefile
+
+RESULT = test
+SOURCES = Ubigraph.mli Ubigraph.ml test.ml
+PACKS = xmlrpc-light
+
+include $(OCAMLMAKEFILE)
diff --git a/examples/ubigraph/OCamlMakefile b/examples/ubigraph/OCamlMakefile
new file mode 100644
index 0000000..9adb295
--- /dev/null
+++ b/examples/ubigraph/OCamlMakefile
@@ -0,0 +1,1154 @@
+###########################################################################
+# OCamlMakefile
+# Copyright (C) 1999-2004 Markus Mottl
+#
+# For updates see:
+# http://www.ocaml.info/home/ocaml_sources.html
+#
+# $Id: OCamlMakefile,v 1.72 2005/12/09 15:30:50 mottl Exp $
+#
+###########################################################################
+
+# Modified by damien for .glade.ml compilation
+
+# Set these variables to the names of the sources to be processed and
+# the result variable. Order matters during linkage!
+
+ifndef SOURCES
+ SOURCES := foo.ml
+endif
+export SOURCES
+
+ifndef RES_CLIB_SUF
+ RES_CLIB_SUF := _stubs
+endif
+export RES_CLIB_SUF
+
+ifndef RESULT
+ RESULT := foo
+endif
+export RESULT
+
+export LIB_PACK_NAME
+
+ifndef DOC_FILES
+ DOC_FILES := $(filter %.mli, $(SOURCES))
+endif
+export DOC_FILES
+
+export BCSUFFIX
+export NCSUFFIX
+
+ifndef TOPSUFFIX
+ TOPSUFFIX := .top
+endif
+export TOPSUFFIX
+
+# Eventually set include- and library-paths, libraries to link,
+# additional compilation-, link- and ocamlyacc-flags
+# Path- and library information needs not be written with "-I" and such...
+# Define THREADS if you need it, otherwise leave it unset (same for
+# USE_CAMLP4)!
+
+export THREADS
+export VMTHREADS
+export ANNOTATE
+export USE_CAMLP4
+
+export INCDIRS
+export LIBDIRS
+export EXTLIBDIRS
+export RESULTDEPS
+export OCAML_DEFAULT_DIRS
+
+export LIBS
+export CLIBS
+
+export OCAMLFLAGS
+export OCAMLNCFLAGS
+export OCAMLBCFLAGS
+
+export OCAMLLDFLAGS
+export OCAMLNLDFLAGS
+export OCAMLBLDFLAGS
+
+ifndef OCAMLCPFLAGS
+ OCAMLCPFLAGS := a
+endif
+
+export OCAMLCPFLAGS
+
+export PPFLAGS
+
+export YFLAGS
+export IDLFLAGS
+
+export OCAMLDOCFLAGS
+
+export OCAMLFIND_INSTFLAGS
+
+export DVIPSFLAGS
+
+export STATIC
+
+# Add a list of optional trash files that should be deleted by "make clean"
+export TRASH
+
+#################### variables depending on your OCaml-installation
+
+ifdef MINGW
+ export MINGW
+ WIN32 := 1
+ CFLAGS_WIN32 := -mno-cygwin
+endif
+ifdef MSVC
+ export MSVC
+ WIN32 := 1
+ ifndef STATIC
+ CPPFLAGS_WIN32 := -DCAML_DLL
+ endif
+ CFLAGS_WIN32 += -nologo
+ EXT_OBJ := obj
+ EXT_LIB := lib
+ ifeq ($(CC),gcc)
+ # work around GNU Make default value
+ ifdef THREADS
+ CC := cl -MT
+ else
+ CC := cl
+ endif
+ endif
+ ifeq ($(CXX),g++)
+ # work around GNU Make default value
+ CXX := $(CC)
+ endif
+ CFLAG_O := -Fo
+endif
+ifdef WIN32
+ EXT_CXX := cpp
+ EXE := .exe
+endif
+
+ifndef EXT_OBJ
+ EXT_OBJ := o
+endif
+ifndef EXT_LIB
+ EXT_LIB := a
+endif
+ifndef EXT_CXX
+ EXT_CXX := cc
+endif
+ifndef EXE
+ EXE := # empty
+endif
+ifndef CFLAG_O
+ CFLAG_O := -o # do not delete this comment (preserves trailing whitespace)!
+endif
+
+export CC
+export CXX
+export CFLAGS
+export CXXFLAGS
+export LDFLAGS
+export CPPFLAGS
+
+ifndef RPATH_FLAG
+ RPATH_FLAG := -R
+endif
+export RPATH_FLAG
+
+ifndef MSVC
+ifndef PIC_CFLAGS
+ PIC_CFLAGS := -fPIC
+endif
+ifndef PIC_CPPFLAGS
+ PIC_CPPFLAGS := -DPIC
+endif
+endif
+
+export PIC_CFLAGS
+export PIC_CPPFLAGS
+
+BCRESULT := $(addsuffix $(BCSUFFIX), $(RESULT))
+NCRESULT := $(addsuffix $(NCSUFFIX), $(RESULT))
+TOPRESULT := $(addsuffix $(TOPSUFFIX), $(RESULT))
+
+ifndef OCAMLFIND
+ OCAMLFIND := ocamlfind
+endif
+export OCAMLFIND
+
+ifndef OCAMLC
+ OCAMLC := ocamlc
+endif
+export OCAMLC
+
+ifndef OCAMLOPT
+ OCAMLOPT := ocamlopt
+endif
+export OCAMLOPT
+
+ifndef OCAMLMKTOP
+ OCAMLMKTOP := ocamlmktop
+endif
+export OCAMLMKTOP
+
+ifndef OCAMLCP
+ OCAMLCP := ocamlcp
+endif
+export OCAMLCP
+
+ifndef OCAMLDEP
+ OCAMLDEP := ocamldep
+endif
+export OCAMLDEP
+
+ifndef OCAMLLEX
+ OCAMLLEX := ocamllex
+endif
+export OCAMLLEX
+
+ifndef OCAMLYACC
+ OCAMLYACC := ocamlyacc
+endif
+export OCAMLYACC
+
+ifndef OCAMLMKLIB
+ OCAMLMKLIB := ocamlmklib
+endif
+export OCAMLMKLIB
+
+ifndef OCAML_GLADECC
+ OCAML_GLADECC := lablgladecc2
+endif
+export OCAML_GLADECC
+
+ifndef OCAML_GLADECC_FLAGS
+ OCAML_GLADECC_FLAGS :=
+endif
+export OCAML_GLADECC_FLAGS
+
+ifndef CAMELEON_REPORT
+ CAMELEON_REPORT := report
+endif
+export CAMELEON_REPORT
+
+ifndef CAMELEON_REPORT_FLAGS
+ CAMELEON_REPORT_FLAGS :=
+endif
+export CAMELEON_REPORT_FLAGS
+
+ifndef CAMELEON_ZOGGY
+ CAMELEON_ZOGGY := camlp4o pa_zog.cma pr_o.cmo
+endif
+export CAMELEON_ZOGGY
+
+ifndef CAMELEON_ZOGGY_FLAGS
+ CAMELEON_ZOGGY_FLAGS :=
+endif
+export CAMELEON_ZOGGY_FLAGS
+
+ifndef OXRIDL
+ OXRIDL := oxridl
+endif
+export OXRIDL
+
+ifndef CAMLIDL
+ CAMLIDL := camlidl
+endif
+export CAMLIDL
+
+ifndef CAMLIDLDLL
+ CAMLIDLDLL := camlidldll
+endif
+export CAMLIDLDLL
+
+ifndef NOIDLHEADER
+ MAYBE_IDL_HEADER := -header
+endif
+export NOIDLHEADER
+
+export NO_CUSTOM
+
+ifndef CAMLP4
+ CAMLP4 := camlp4
+endif
+export CAMLP4
+
+ifndef REAL_OCAMLFIND
+ ifdef PACKS
+ ifndef CREATE_LIB
+ ifdef THREADS
+ PACKS += threads
+ endif
+ endif
+ empty :=
+ space := $(empty) $(empty)
+ comma := ,
+ ifdef PREDS
+ PRE_OCAML_FIND_PREDICATES := $(subst $(space),$(comma),$(PREDS))
+ PRE_OCAML_FIND_PACKAGES := $(subst $(space),$(comma),$(PACKS))
+ OCAML_FIND_PREDICATES := -predicates $(PRE_OCAML_FIND_PREDICATES)
+ # OCAML_DEP_PREDICATES := -syntax $(PRE_OCAML_FIND_PREDICATES)
+ OCAML_FIND_PACKAGES := $(OCAML_FIND_PREDICATES) -package $(PRE_OCAML_FIND_PACKAGES)
+ OCAML_DEP_PACKAGES := $(OCAML_DEP_PREDICATES) -package $(PRE_OCAML_FIND_PACKAGES)
+ else
+ OCAML_FIND_PACKAGES := -package $(subst $(space),$(comma),$(PACKS))
+ OCAML_DEP_PACKAGES :=
+ endif
+ OCAML_FIND_LINKPKG := -linkpkg
+ REAL_OCAMLFIND := $(OCAMLFIND)
+ endif
+endif
+
+export OCAML_FIND_PACKAGES
+export OCAML_DEP_PACKAGES
+export OCAML_FIND_LINKPKG
+export REAL_OCAMLFIND
+
+ifndef OCAMLDOC
+ OCAMLDOC := ocamldoc
+endif
+export OCAMLDOC
+
+ifndef LATEX
+ LATEX := latex
+endif
+export LATEX
+
+ifndef DVIPS
+ DVIPS := dvips
+endif
+export DVIPS
+
+ifndef PS2PDF
+ PS2PDF := ps2pdf
+endif
+export PS2PDF
+
+ifndef OCAMLMAKEFILE
+ OCAMLMAKEFILE := OCamlMakefile
+endif
+export OCAMLMAKEFILE
+
+ifndef OCAMLLIBPATH
+ OCAMLLIBPATH := \
+ $(shell $(OCAMLC) 2>/dev/null -where || echo /usr/lib/ocaml)
+endif
+export OCAMLLIBPATH
+
+ifndef OCAML_LIB_INSTALL
+ OCAML_LIB_INSTALL := $(OCAMLLIBPATH)/contrib
+endif
+export OCAML_LIB_INSTALL
+
+###########################################################################
+
+#################### change following sections only if
+#################### you know what you are doing!
+
+# delete target files when a build command fails
+.PHONY: .DELETE_ON_ERROR
+.DELETE_ON_ERROR:
+
+# for pedants using "--warn-undefined-variables"
+export MAYBE_IDL
+export REAL_RESULT
+export CAMLIDLFLAGS
+export THREAD_FLAG
+export RES_CLIB
+export MAKEDLL
+export ANNOT_FLAG
+export C_OXRIDL
+export SUBPROJS
+export CFLAGS_WIN32
+export CPPFLAGS_WIN32
+
+INCFLAGS :=
+
+SHELL := /bin/sh
+
+MLDEPDIR := ._d
+BCDIDIR := ._bcdi
+NCDIDIR := ._ncdi
+
+FILTER_EXTNS := %.mli %.ml %.mll %.mly %.idl %.oxridl %.c %.$(EXT_CXX) %.rep %.zog %.glade
+
+FILTERED := $(filter $(FILTER_EXTNS), $(SOURCES))
+SOURCE_DIRS := $(filter-out ./, $(sort $(dir $(FILTERED))))
+
+FILTERED_REP := $(filter %.rep, $(FILTERED))
+DEP_REP := $(FILTERED_REP:%.rep=$(MLDEPDIR)/%.d)
+AUTO_REP := $(FILTERED_REP:.rep=.ml)
+
+FILTERED_ZOG := $(filter %.zog, $(FILTERED))
+DEP_ZOG := $(FILTERED_ZOG:%.zog=$(MLDEPDIR)/%.d)
+AUTO_ZOG := $(FILTERED_ZOG:.zog=.ml)
+
+FILTERED_GLADE := $(filter %.glade, $(FILTERED))
+DEP_GLADE := $(FILTERED_GLADE:%.glade=$(MLDEPDIR)/%.d)
+AUTO_GLADE := $(FILTERED_GLADE:.glade=.ml)
+
+FILTERED_ML := $(filter %.ml, $(FILTERED))
+DEP_ML := $(FILTERED_ML:%.ml=$(MLDEPDIR)/%.d)
+
+FILTERED_MLI := $(filter %.mli, $(FILTERED))
+DEP_MLI := $(FILTERED_MLI:.mli=.di)
+
+FILTERED_MLL := $(filter %.mll, $(FILTERED))
+DEP_MLL := $(FILTERED_MLL:%.mll=$(MLDEPDIR)/%.d)
+AUTO_MLL := $(FILTERED_MLL:.mll=.ml)
+
+FILTERED_MLY := $(filter %.mly, $(FILTERED))
+DEP_MLY := $(FILTERED_MLY:%.mly=$(MLDEPDIR)/%.d) $(FILTERED_MLY:.mly=.di)
+AUTO_MLY := $(FILTERED_MLY:.mly=.mli) $(FILTERED_MLY:.mly=.ml)
+
+FILTERED_IDL := $(filter %.idl, $(FILTERED))
+DEP_IDL := $(FILTERED_IDL:%.idl=$(MLDEPDIR)/%.d) $(FILTERED_IDL:.idl=.di)
+C_IDL := $(FILTERED_IDL:%.idl=%_stubs.c)
+ifndef NOIDLHEADER
+ C_IDL += $(FILTERED_IDL:.idl=.h)
+endif
+OBJ_C_IDL := $(FILTERED_IDL:%.idl=%_stubs.$(EXT_OBJ))
+AUTO_IDL := $(FILTERED_IDL:.idl=.mli) $(FILTERED_IDL:.idl=.ml) $(C_IDL)
+
+FILTERED_OXRIDL := $(filter %.oxridl, $(FILTERED))
+DEP_OXRIDL := $(FILTERED_OXRIDL:%.oxridl=$(MLDEPDIR)/%.d) $(FILTERED_OXRIDL:.oxridl=.di)
+AUTO_OXRIDL := $(FILTERED_OXRIDL:.oxridl=.mli) $(FILTERED_OXRIDL:.oxridl=.ml) $(C_OXRIDL)
+
+FILTERED_C_CXX := $(filter %.c %.$(EXT_CXX), $(FILTERED))
+OBJ_C_CXX := $(FILTERED_C_CXX:.c=.$(EXT_OBJ))
+OBJ_C_CXX := $(OBJ_C_CXX:.$(EXT_CXX)=.$(EXT_OBJ))
+
+PRE_TARGETS += $(AUTO_MLL) $(AUTO_MLY) $(AUTO_IDL) $(AUTO_OXRIDL) $(AUTO_ZOG) $(AUTO_REP) $(AUTO_GLADE)
+
+ALL_DEPS := $(DEP_ML) $(DEP_MLI) $(DEP_MLL) $(DEP_MLY) $(DEP_IDL) $(DEP_OXRIDL) $(DEP_ZOG) $(DEP_REP) $(DEP_GLADE)
+
+MLDEPS := $(filter %.d, $(ALL_DEPS))
+MLIDEPS := $(filter %.di, $(ALL_DEPS))
+BCDEPIS := $(MLIDEPS:%.di=$(BCDIDIR)/%.di)
+NCDEPIS := $(MLIDEPS:%.di=$(NCDIDIR)/%.di)
+
+ALLML := $(filter %.mli %.ml %.mll %.mly %.idl %.oxridl %.rep %.zog %.glade, $(FILTERED))
+
+IMPLO_INTF := $(ALLML:%.mli=%.mli.__)
+IMPLO_INTF := $(foreach file, $(IMPLO_INTF), \
+ $(basename $(file)).cmi $(basename $(file)).cmo)
+IMPLO_INTF := $(filter-out %.mli.cmo, $(IMPLO_INTF))
+IMPLO_INTF := $(IMPLO_INTF:%.mli.cmi=%.cmi)
+
+IMPLX_INTF := $(IMPLO_INTF:.cmo=.cmx)
+
+INTF := $(filter %.cmi, $(IMPLO_INTF))
+IMPL_CMO := $(filter %.cmo, $(IMPLO_INTF))
+IMPL_CMX := $(IMPL_CMO:.cmo=.cmx)
+IMPL_ASM := $(IMPL_CMO:.cmo=.asm)
+IMPL_S := $(IMPL_CMO:.cmo=.s)
+
+OBJ_LINK := $(OBJ_C_IDL) $(OBJ_C_CXX)
+OBJ_FILES := $(IMPL_CMO:.cmo=.$(EXT_OBJ)) $(OBJ_LINK)
+
+EXECS := $(addsuffix $(EXE), \
+ $(sort $(TOPRESULT) $(BCRESULT) $(NCRESULT)))
+ifdef WIN32
+ EXECS += $(BCRESULT).dll $(NCRESULT).dll
+endif
+
+CLIB_BASE := $(RESULT)$(RES_CLIB_SUF)
+ifneq ($(strip $(OBJ_LINK)),)
+ RES_CLIB := lib$(CLIB_BASE).$(EXT_LIB)
+endif
+
+ifdef WIN32
+DLLSONAME := $(CLIB_BASE).dll
+else
+DLLSONAME := dll$(CLIB_BASE).so
+endif
+
+NONEXECS := $(INTF) $(IMPL_CMO) $(IMPL_CMX) $(IMPL_ASM) $(IMPL_S) \
+ $(OBJ_FILES) $(PRE_TARGETS) $(BCRESULT).cma $(NCRESULT).cmxa \
+ $(NCRESULT).$(EXT_LIB) $(BCRESULT).cmi $(BCRESULT).cmo \
+ $(NCRESULT).cmi $(NCRESULT).cmx $(NCRESULT).o \
+ $(RES_CLIB) $(IMPL_CMO:.cmo=.annot) \
+ $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(LIB_PACK_NAME).cmx $(LIB_PACK_NAME).o
+
+ifndef STATIC
+ NONEXECS += $(DLLSONAME)
+endif
+
+ifndef LIBINSTALL_FILES
+ LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \
+ $(RESULT).cmxa $(RESULT).$(EXT_LIB) $(RES_CLIB)
+ ifndef STATIC
+ ifneq ($(strip $(OBJ_LINK)),)
+ LIBINSTALL_FILES += $(DLLSONAME)
+ endif
+ endif
+endif
+
+export LIBINSTALL_FILES
+
+ifdef WIN32
+ # some extra stuff is created while linking DLLs
+ NONEXECS += $(BCRESULT).$(EXT_LIB) $(BCRESULT).exp $(NCRESULT).exp $(CLIB_BASE).exp $(CLIB_BASE).lib
+endif
+
+TARGETS := $(EXECS) $(NONEXECS)
+
+# If there are IDL-files
+ifneq ($(strip $(FILTERED_IDL)),)
+ MAYBE_IDL := -cclib -lcamlidl
+endif
+
+ifdef USE_CAMLP4
+ CAMLP4PATH := \
+ $(shell $(CAMLP4) -where 2>/dev/null || echo /usr/lib/camlp4)
+ INCFLAGS := -I $(CAMLP4PATH)
+ CINCFLAGS := -I$(CAMLP4PATH)
+endif
+
+DINCFLAGS := $(INCFLAGS) $(SOURCE_DIRS:%=-I %) $(OCAML_DEFAULT_DIRS:%=-I %)
+INCFLAGS := $(DINCFLAGS) $(INCDIRS:%=-I %)
+CINCFLAGS += $(SOURCE_DIRS:%=-I%) $(INCDIRS:%=-I%) $(OCAML_DEFAULT_DIRS:%=-I%)
+
+ifndef MSVC
+CLIBFLAGS += $(SOURCE_DIRS:%=-L%) $(LIBDIRS:%=-L%) \
+ $(EXTLIBDIRS:%=-L%) $(EXTLIBDIRS:%=-Wl,$(RPATH_FLAG)%) \
+ $(OCAML_DEFAULT_DIRS:%=-L%)
+endif
+
+ifndef PROFILING
+ INTF_OCAMLC := $(OCAMLC)
+else
+ ifndef THREADS
+ INTF_OCAMLC := $(OCAMLCP) -p $(OCAMLCPFLAGS)
+ else
+ # OCaml does not support profiling byte code
+ # with threads (yet), therefore we force an error.
+ ifndef REAL_OCAMLC
+ $(error Profiling of multithreaded byte code not yet supported by OCaml)
+ endif
+ INTF_OCAMLC := $(OCAMLC)
+ endif
+endif
+
+ifndef MSVC
+COMMON_LDFLAGS := $(LDFLAGS:%=-ccopt %) $(SOURCE_DIRS:%=-ccopt -L%) \
+ $(LIBDIRS:%=-ccopt -L%) $(EXTLIBDIRS:%=-ccopt -L%) \
+ $(EXTLIBDIRS:%=-ccopt -Wl,$(RPATH_FLAG)%) \
+ $(OCAML_DEFAULT_DIRS:%=-ccopt -L%)
+else
+COMMON_LDFLAGS := -ccopt "/link -NODEFAULTLIB:LIBC $(LDFLAGS:%=%) $(SOURCE_DIRS:%=-LIBPATH:%) \
+ $(LIBDIRS:%=-LIBPATH:%) $(EXTLIBDIRS:%=-LIBPATH:%) \
+ $(OCAML_DEFAULT_DIRS:%=-LIBPATH:%) "
+endif
+
+CLIBS_OPTS := $(CLIBS:%=-cclib -l%)
+ifdef MSVC
+ ifndef STATIC
+ # MSVC libraries do not have 'lib' prefix
+ CLIBS_OPTS := $(CLIBS:%=-cclib %.lib)
+ endif
+endif
+
+ifneq ($(strip $(OBJ_LINK)),)
+ ifdef CREATE_LIB
+ OBJS_LIBS := -cclib -l$(CLIB_BASE) $(CLIBS_OPTS) $(MAYBE_IDL)
+ else
+ OBJS_LIBS := $(OBJ_LINK) $(CLIBS_OPTS) $(MAYBE_IDL)
+ endif
+else
+ OBJS_LIBS := $(CLIBS_OPTS) $(MAYBE_IDL)
+endif
+
+# If we have to make byte-code
+ifndef REAL_OCAMLC
+ BYTE_OCAML := y
+
+ # EXTRADEPS is added dependencies we have to insert for all
+ # executable files we generate. Ideally it should be all of the
+ # libraries we use, but it's hard to find the ones that get searched on
+ # the path since I don't know the paths built into the compiler, so
+ # just include the ones with slashes in their names.
+ EXTRADEPS := $(addsuffix .cma,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
+ SPECIAL_OCAMLFLAGS := $(OCAMLBCFLAGS)
+
+ REAL_OCAMLC := $(INTF_OCAMLC)
+
+ REAL_IMPL := $(IMPL_CMO)
+ REAL_IMPL_INTF := $(IMPLO_INTF)
+ IMPL_SUF := .cmo
+
+ DEPFLAGS :=
+ MAKE_DEPS := $(MLDEPS) $(BCDEPIS)
+
+ ifdef CREATE_LIB
+ override CFLAGS := $(PIC_CFLAGS) $(CFLAGS)
+ override CPPFLAGS := $(PIC_CPPFLAGS) $(CPPFLAGS)
+ ifndef STATIC
+ ifneq ($(strip $(OBJ_LINK)),)
+ MAKEDLL := $(DLLSONAME)
+ ALL_LDFLAGS := -dllib $(DLLSONAME)
+ endif
+ endif
+ endif
+
+ ifndef NO_CUSTOM
+ ifneq "$(strip $(OBJ_LINK) $(THREADS) $(MAYBE_IDL) $(CLIBS))" ""
+ ALL_LDFLAGS += -custom
+ endif
+ endif
+
+ ALL_LDFLAGS += $(INCFLAGS) $(OCAMLLDFLAGS) $(OCAMLBLDFLAGS) \
+ $(COMMON_LDFLAGS) $(LIBS:%=%.cma)
+ CAMLIDLDLLFLAGS :=
+
+ ifdef THREADS
+ ifdef VMTHREADS
+ THREAD_FLAG := -vmthread
+ else
+ THREAD_FLAG := -thread
+ endif
+ ALL_LDFLAGS := $(THREAD_FLAG) $(ALL_LDFLAGS)
+ ifndef CREATE_LIB
+ ifndef REAL_OCAMLFIND
+ ALL_LDFLAGS := unix.cma threads.cma $(ALL_LDFLAGS)
+ endif
+ endif
+ endif
+
+# we have to make native-code
+else
+ EXTRADEPS := $(addsuffix .cmxa,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
+ ifndef PROFILING
+ SPECIAL_OCAMLFLAGS := $(OCAMLNCFLAGS)
+ PLDFLAGS :=
+ else
+ SPECIAL_OCAMLFLAGS := -p $(OCAMLNCFLAGS)
+ PLDFLAGS := -p
+ endif
+
+ REAL_IMPL := $(IMPL_CMX)
+ REAL_IMPL_INTF := $(IMPLX_INTF)
+ IMPL_SUF := .cmx
+
+ override CPPFLAGS := -DNATIVE_CODE $(CPPFLAGS)
+
+ DEPFLAGS := -native
+ MAKE_DEPS := $(MLDEPS) $(NCDEPIS)
+
+ ALL_LDFLAGS := $(PLDFLAGS) $(INCFLAGS) $(OCAMLLDFLAGS) \
+ $(OCAMLNLDFLAGS) $(COMMON_LDFLAGS)
+ CAMLIDLDLLFLAGS := -opt
+
+ ifndef CREATE_LIB
+ ALL_LDFLAGS += $(LIBS:%=%.cmxa)
+ else
+ override CFLAGS := $(PIC_CFLAGS) $(CFLAGS)
+ override CPPFLAGS := $(PIC_CPPFLAGS) $(CPPFLAGS)
+ endif
+
+ ifdef THREADS
+ THREAD_FLAG := -thread
+ ALL_LDFLAGS := $(THREAD_FLAG) $(ALL_LDFLAGS)
+ ifndef CREATE_LIB
+ ifndef REAL_OCAMLFIND
+ ALL_LDFLAGS := unix.cmxa threads.cmxa $(ALL_LDFLAGS)
+ endif
+ endif
+ endif
+endif
+
+export MAKE_DEPS
+
+ifdef ANNOTATE
+ ANNOT_FLAG := -dtypes
+else
+endif
+
+ALL_OCAMLCFLAGS := $(THREAD_FLAG) $(ANNOT_FLAG) $(OCAMLFLAGS) \
+ $(INCFLAGS) $(SPECIAL_OCAMLFLAGS)
+
+ifdef make_deps
+ -include $(MAKE_DEPS)
+ PRE_TARGETS :=
+endif
+
+###########################################################################
+# USER RULES
+
+# Call "OCamlMakefile QUIET=" to get rid of all of the @'s.
+QUIET=@
+
+# generates byte-code (default)
+byte-code: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
+ REAL_RESULT="$(BCRESULT)" make_deps=yes
+bc: byte-code
+
+byte-code-nolink: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
+ REAL_RESULT="$(BCRESULT)" make_deps=yes
+bcnl: byte-code-nolink
+
+top: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(TOPRESULT) \
+ REAL_RESULT="$(BCRESULT)" make_deps=yes
+
+# generates native-code
+
+native-code: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
+ REAL_RESULT="$(NCRESULT)" \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ make_deps=yes
+nc: native-code
+
+native-code-nolink: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
+ REAL_RESULT="$(NCRESULT)" \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ make_deps=yes
+ncnl: native-code-nolink
+
+# generates byte-code libraries
+byte-code-library: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(RES_CLIB) $(BCRESULT).cma \
+ REAL_RESULT="$(BCRESULT)" \
+ CREATE_LIB=yes \
+ make_deps=yes
+bcl: byte-code-library
+
+# generates native-code libraries
+native-code-library: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(RES_CLIB) $(NCRESULT).cmxa \
+ REAL_RESULT="$(NCRESULT)" \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ CREATE_LIB=yes \
+ make_deps=yes
+ncl: native-code-library
+
+ifdef WIN32
+# generates byte-code dll
+byte-code-dll: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(RES_CLIB) $(BCRESULT).dll \
+ REAL_RESULT="$(BCRESULT)" \
+ make_deps=yes
+bcd: byte-code-dll
+
+# generates native-code dll
+native-code-dll: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(RES_CLIB) $(NCRESULT).dll \
+ REAL_RESULT="$(NCRESULT)" \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ make_deps=yes
+ncd: native-code-dll
+endif
+
+# generates byte-code with debugging information
+debug-code: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
+ REAL_RESULT="$(BCRESULT)" make_deps=yes \
+ OCAMLFLAGS="-g $(OCAMLFLAGS)" \
+ OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
+dc: debug-code
+
+debug-code-nolink: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
+ REAL_RESULT="$(BCRESULT)" make_deps=yes \
+ OCAMLFLAGS="-g $(OCAMLFLAGS)" \
+ OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
+dcnl: debug-code-nolink
+
+# generates byte-code libraries with debugging information
+debug-code-library: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(RES_CLIB) $(BCRESULT).cma \
+ REAL_RESULT="$(BCRESULT)" make_deps=yes \
+ CREATE_LIB=yes \
+ OCAMLFLAGS="-g $(OCAMLFLAGS)" \
+ OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
+dcl: debug-code-library
+
+# generates byte-code for profiling
+profiling-byte-code: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
+ REAL_RESULT="$(BCRESULT)" PROFILING="y" \
+ make_deps=yes
+pbc: profiling-byte-code
+
+# generates native-code
+
+profiling-native-code: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
+ REAL_RESULT="$(NCRESULT)" \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ PROFILING="y" \
+ make_deps=yes
+pnc: profiling-native-code
+
+# generates byte-code libraries
+profiling-byte-code-library: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(RES_CLIB) $(BCRESULT).cma \
+ REAL_RESULT="$(BCRESULT)" PROFILING="y" \
+ CREATE_LIB=yes \
+ make_deps=yes
+pbcl: profiling-byte-code-library
+
+# generates native-code libraries
+profiling-native-code-library: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(RES_CLIB) $(NCRESULT).cmxa \
+ REAL_RESULT="$(NCRESULT)" PROFILING="y" \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ CREATE_LIB=yes \
+ make_deps=yes
+pncl: profiling-native-code-library
+
+# packs byte-code objects
+pack-byte-code: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT).cmo \
+ REAL_RESULT="$(BCRESULT)" \
+ PACK_LIB=yes make_deps=yes
+pabc: pack-byte-code
+
+# packs native-code objects
+pack-native-code: $(PRE_TARGETS)
+ $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
+ $(NCRESULT).cmx $(NCRESULT).o \
+ REAL_RESULT="$(NCRESULT)" \
+ REAL_OCAMLC="$(OCAMLOPT)" \
+ PACK_LIB=yes make_deps=yes
+panc: pack-native-code
+
+# generates HTML-documentation
+htdoc: doc/$(RESULT)/html
+
+# generates Latex-documentation
+ladoc: doc/$(RESULT)/latex
+
+# generates PostScript-documentation
+psdoc: doc/$(RESULT)/latex/doc.ps
+
+# generates PDF-documentation
+pdfdoc: doc/$(RESULT)/latex/doc.pdf
+
+# generates all supported forms of documentation
+doc: htdoc ladoc psdoc pdfdoc
+
+###########################################################################
+# LOW LEVEL RULES
+
+$(REAL_RESULT): $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS) $(RESULTDEPS)
+ $(REAL_OCAMLFIND) $(REAL_OCAMLC) \
+ $(OCAML_FIND_PACKAGES) $(OCAML_FIND_LINKPKG) \
+ $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@$(EXE) \
+ $(REAL_IMPL)
+
+nolink: $(REAL_IMPL_INTF) $(OBJ_LINK)
+
+ifdef WIN32
+$(REAL_RESULT).dll: $(REAL_IMPL_INTF) $(OBJ_LINK)
+ $(CAMLIDLDLL) $(CAMLIDLDLLFLAGS) $(OBJ_LINK) $(CLIBS) \
+ -o $@ $(REAL_IMPL)
+endif
+
+%$(TOPSUFFIX): $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS)
+ $(REAL_OCAMLFIND) $(OCAMLMKTOP) \
+ $(OCAML_FIND_PACKAGES) $(OCAML_FIND_LINKPKG) \
+ $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@$(EXE) \
+ $(REAL_IMPL)
+
+.SUFFIXES: .mli .ml .cmi .cmo .cmx .cma .cmxa .$(EXT_OBJ) \
+ .mly .di .d .$(EXT_LIB) .idl %.oxridl .c .$(EXT_CXX) .h .so \
+ .rep .zog .glade
+
+ifndef STATIC
+ifdef MINGW
+$(DLLSONAME): $(OBJ_LINK)
+ $(CC) $(CFLAGS) $(CFLAGS_WIN32) $(OBJ_LINK) -shared -o $@ \
+ -Wl,--whole-archive $(wildcard $(foreach dir,$(LIBDIRS),$(CLIBS:%=$(dir)/lib%.a))) \
+ $(OCAMLLIBPATH)/ocamlrun.a \
+ -Wl,--export-all-symbols \
+ -Wl,--no-whole-archive
+else
+ifdef MSVC
+$(DLLSONAME): $(OBJ_LINK)
+ link /NOLOGO /DLL /OUT:$@ $(OBJ_LINK) \
+ $(wildcard $(foreach dir,$(LIBDIRS),$(CLIBS:%=$(dir)/%.lib))) \
+ $(OCAMLLIBPATH)/ocamlrun.lib
+
+else
+$(DLLSONAME): $(OBJ_LINK)
+ $(OCAMLMKLIB) $(INCFLAGS) $(CLIBFLAGS) \
+ -o $(CLIB_BASE) $(OBJ_LINK) $(CLIBS:%=-l%) \
+ $(OCAMLMKLIB_FLAGS)
+endif
+endif
+endif
+
+ifndef LIB_PACK_NAME
+$(RESULT).cma: $(REAL_IMPL_INTF) $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
+ $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) \
+ $(OBJS_LIBS) -o $@ $(OCAMLBLDFLAGS) $(REAL_IMPL)
+
+$(RESULT).cmxa $(RESULT).$(EXT_LIB): $(REAL_IMPL_INTF) $(EXTRADEPS) $(RESULTDEPS)
+ $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(ALL_LDFLAGS) $(OBJS_LIBS) \
+ $(OCAMLNLDFLAGS) -o $@ $(REAL_IMPL)
+else
+ifdef BYTE_OCAML
+$(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo: $(REAL_IMPL_INTF)
+ $(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack -o $(LIB_PACK_NAME).cmo $(REAL_IMPL)
+else
+$(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx: $(REAL_IMPL_INTF)
+ $(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack -o $(LIB_PACK_NAME).cmx $(REAL_IMPL)
+endif
+
+$(RESULT).cma: $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
+ $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) \
+ $(OBJS_LIBS) -o $@ $(OCAMLBLDFLAGS) $(LIB_PACK_NAME).cmo
+
+$(RESULT).cmxa $(RESULT).$(EXT_LIB): $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx $(EXTRADEPS) $(RESULTDEPS)
+ $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(ALL_LDFLAGS) $(OBJS_LIBS) \
+ $(OCAMLNLDFLAGS) -o $@ $(LIB_PACK_NAME).cmx
+endif
+
+$(RES_CLIB): $(OBJ_LINK)
+ifndef MSVC
+ ifneq ($(strip $(OBJ_LINK)),)
+ $(AR) rcs $@ $(OBJ_LINK)
+ endif
+else
+ ifneq ($(strip $(OBJ_LINK)),)
+ lib -nologo -debugtype:cv -out:$(RES_CLIB) $(OBJ_LINK)
+ endif
+endif
+
+.mli.cmi: $(EXTRADEPS)
+ $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
+ if [ -z "$$pp" ]; then \
+ echo $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
+ -c $(THREAD_FLAG) $(ANNOT_FLAG) \
+ $(OCAMLFLAGS) $(INCFLAGS) $<; \
+ $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
+ -c $(THREAD_FLAG) $(ANNOT_FLAG) \
+ $(OCAMLFLAGS) $(INCFLAGS) $<; \
+ else \
+ echo $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
+ -c -pp \"$$pp $(PPFLAGS)\" $(THREAD_FLAG) $(ANNOT_FLAG) \
+ $(OCAMLFLAGS) $(INCFLAGS) $<; \
+ $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
+ -c -pp "$$pp $(PPFLAGS)" $(THREAD_FLAG) $(ANNOT_FLAG) \
+ $(OCAMLFLAGS) $(INCFLAGS) $<; \
+ fi
+
+.ml.cmi .ml.$(EXT_OBJ) .ml.cmx .ml.cmo: $(EXTRADEPS)
+ $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
+ if [ -z "$$pp" ]; then \
+ echo $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
+ -c $(ALL_OCAMLCFLAGS) $<; \
+ $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
+ -c $(ALL_OCAMLCFLAGS) $<; \
+ else \
+ echo $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
+ -c -pp \"$$pp $(PPFLAGS)\" $(ALL_OCAMLCFLAGS) $<; \
+ $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
+ -c -pp "$$pp $(PPFLAGS)" $(ALL_OCAMLCFLAGS) $<; \
+ fi
+
+ifdef PACK_LIB
+$(REAL_RESULT).cmo $(REAL_RESULT).cmx $(REAL_RESULT).o: $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS)
+ $(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack $(ALL_LDFLAGS) \
+ $(OBJS_LIBS) -o $@ $(REAL_IMPL)
+endif
+
+.PRECIOUS: %.ml
+%.ml: %.mll
+ $(OCAMLLEX) $<
+
+.PRECIOUS: %.ml %.mli
+%.ml %.mli: %.mly
+ $(OCAMLYACC) $(YFLAGS) $<
+ $(QUIET)pp=`sed -n -e 's/.*(\*pp \([^*]*\) \*).*/\1/p;q' $<`; \
+ if [ ! -z "$$pp" ]; then \
+ mv $*.ml $*.ml.temporary; \
+ echo "(*pp $$pp $(PPFLAGS)*)" > $*.ml; \
+ cat $*.ml.temporary >> $*.ml; \
+ rm $*.ml.temporary; \
+ mv $*.mli $*.mli.temporary; \
+ echo "(*pp $$pp $(PPFLAGS)*)" > $*.mli; \
+ cat $*.mli.temporary >> $*.mli; \
+ rm $*.mli.temporary; \
+ fi
+
+
+.PRECIOUS: %.ml
+%.ml: %.rep
+ $(CAMELEON_REPORT) $(CAMELEON_REPORT_FLAGS) -gen $<
+
+.PRECIOUS: %.ml
+%.ml: %.zog
+ $(CAMELEON_ZOGGY) $(CAMELEON_ZOGGY_FLAGS) -impl $< > $@
+
+.PRECIOUS: %.ml
+%.ml: %.glade
+ $(OCAML_GLADECC) $(OCAML_GLADECC_FLAGS) $< > $@
+
+.PRECIOUS: %.ml %.mli
+%.ml %.mli: %.oxridl
+ $(OXRIDL) $<
+
+.PRECIOUS: %.ml %.mli %_stubs.c %.h
+%.ml %.mli %_stubs.c %.h: %.idl
+ $(CAMLIDL) $(MAYBE_IDL_HEADER) $(IDLFLAGS) \
+ $(CAMLIDLFLAGS) $<
+ $(QUIET)if [ $(NOIDLHEADER) ]; then touch $*.h; fi
+
+.c.$(EXT_OBJ):
+ $(OCAMLC) -c -cc "$(CC)" -ccopt "$(CFLAGS) \
+ $(CPPFLAGS) $(CPPFLAGS_WIN32) \
+ $(CFLAGS_WIN32) $(CINCFLAGS) $(CFLAG_O)$@ " $<
+
+.$(EXT_CXX).$(EXT_OBJ):
+ $(CXX) -c $(CXXFLAGS) $(CINCFLAGS) $(CPPFLAGS) \
+ -I'$(OCAMLLIBPATH)' \
+ $< $(CFLAG_O)$@
+
+$(MLDEPDIR)/%.d: %.ml
+ $(QUIET)if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
+ $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
+ if [ -z "$$pp" ]; then \
+ echo $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
+ $(DINCFLAGS) $< \> $@; \
+ $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
+ $(DINCFLAGS) $< > $@; \
+ else \
+ echo $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
+ -pp \"$$pp $(PPFLAGS)\" $(DINCFLAGS) $< \> $@; \
+ $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
+ -pp "$$pp $(PPFLAGS)" $(DINCFLAGS) $< > $@; \
+ fi
+
+$(BCDIDIR)/%.di $(NCDIDIR)/%.di: %.mli
+ $(QUIET)if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
+ $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
+ if [ -z "$$pp" ]; then \
+ echo $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) $(DINCFLAGS) $< \> $@; \
+ $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) $(DINCFLAGS) $< > $@; \
+ else \
+ echo $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) \
+ -pp \"$$pp $(PPFLAGS)\" $(DINCFLAGS) $< \> $@; \
+ $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) \
+ -pp "$$pp $(PPFLAGS)" $(DINCFLAGS) $< > $@; \
+ fi
+
+doc/$(RESULT)/html: $(DOC_FILES)
+ #rm -rf $@
+ #mkdir -p $@
+ $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
+ if [ -z "$$pp" ]; then \
+ echo $(OCAMLDOC) -html -d $@ $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES); \
+ $(OCAMLDOC) -html -d $@ $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES); \
+ else \
+ echo $(OCAMLDOC) -pp \"$$pp $(PPFLAGS)\" -html -d $@ $(OCAMLDOCFLAGS) \
+ $(INCFLAGS) $(DOC_FILES); \
+ $(OCAMLDOC) -pp "$$pp $(PPFLAGS)" -html -d $@ $(OCAMLDOCFLAGS) \
+ $(INCFLAGS) $(DOC_FILES); \
+ fi
+
+doc/$(RESULT)/latex: $(DOC_FILES)
+ #rm -rf $@
+ #mkdir -p $@
+ $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
+ if [ -z "$$pp" ]; then \
+ echo $(OCAMLDOC) -latex $(OCAMLDOCFLAGS) $(INCFLAGS) \
+ $(DOC_FILES) -o $@/doc.tex; \
+ $(OCAMLDOC) -latex $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES) \
+ -o $@/doc.tex; \
+ else \
+ echo $(OCAMLDOC) -pp \"$$pp $(PPFLAGS)\" -latex $(OCAMLDOCFLAGS) \
+ $(INCFLAGS) $(DOC_FILES) -o $@/doc.tex; \
+ $(OCAMLDOC) -pp "$$pp $(PPFLAGS)" -latex $(OCAMLDOCFLAGS) \
+ $(INCFLAGS) $(DOC_FILES) -o $@/doc.tex; \
+ fi
+
+doc/$(RESULT)/latex/doc.ps: doc/$(RESULT)/latex
+ cd doc/$(RESULT)/latex && \
+ $(LATEX) doc.tex && \
+ $(LATEX) doc.tex && \
+ $(DVIPS) $(DVIPSFLAGS) doc.dvi -o $(@F)
+
+doc/$(RESULT)/latex/doc.pdf: doc/$(RESULT)/latex/doc.ps
+ cd doc/$(RESULT)/latex && $(PS2PDF) $(<F)
+
+define make_subproj
+.PHONY:
+subproj_$(1):
+ $$(eval $$(call PROJ_$(1)))
+ $(QUIET)if [ "$(SUBTARGET)" != "all" ]; then \
+ $(MAKE) -f $(OCAMLMAKEFILE) $(SUBTARGET); \
+ fi
+endef
+
+$(foreach subproj,$(SUBPROJS),$(eval $(call make_subproj,$(subproj))))
+
+.PHONY:
+subprojs: $(SUBPROJS:%=subproj_%)
+
+###########################################################################
+# (UN)INSTALL RULES FOR LIBRARIES
+
+.PHONY: libinstall
+libinstall: all
+ $(QUIET)printf "\nInstalling library with ocamlfind\n"
+ $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META $(LIBINSTALL_FILES)
+ $(QUIET)printf "\nInstallation successful.\n"
+
+.PHONY: libuninstall
+libuninstall:
+ $(QUIET)printf "\nUninstalling library with ocamlfind\n"
+ $(OCAMLFIND) remove $(OCAMLFIND_INSTFLAGS) $(RESULT)
+ $(QUIET)printf "\nUninstallation successful.\n"
+
+.PHONY: rawinstall
+rawinstall: all
+ $(QUIET)printf "\nInstalling library to: $(OCAML_LIB_INSTALL)\n"
+ -install -d $(OCAML_LIB_INSTALL)
+ for i in $(LIBINSTALL_FILES); do \
+ if [ -f $$i ]; then \
+ install -c -m 0644 $$i $(OCAML_LIB_INSTALL); \
+ fi; \
+ done
+ $(QUIET)printf "\nInstallation successful.\n"
+
+.PHONY: rawuninstall
+rawuninstall:
+ $(QUIET)printf "\nUninstalling library from: $(OCAML_LIB_INSTALL)\n"
+ cd $(OCAML_LIB_INSTALL) && rm $(notdir $(LIBINSTALL_FILES))
+ $(QUIET)printf "\nUninstallation successful.\n"
+
+###########################################################################
+# MAINTAINANCE RULES
+
+.PHONY: clean
+clean::
+ rm -f $(TARGETS) $(TRASH)
+ rm -rf $(BCDIDIR) $(NCDIDIR) $(MLDEPDIR)
+
+.PHONY: cleanup
+cleanup::
+ rm -f $(NONEXECS) $(TRASH)
+ rm -rf $(BCDIDIR) $(NCDIDIR) $(MLDEPDIR)
+
+.PHONY: clean-doc
+clean-doc::
+ rm -rf doc
+
+.PHONY: nobackup
+nobackup:
+ rm -f *.bak *~ *.dup
diff --git a/examples/ubigraph/Ubigraph.ml b/examples/ubigraph/Ubigraph.ml
new file mode 100644
index 0000000..7998eae
--- /dev/null
+++ b/examples/ubigraph/Ubigraph.ml
@@ -0,0 +1,169 @@
+(*
+ * XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
+ * Copyright (C) 2008 Dave Benjamin (dave@ramenlabs.com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *)
+
+(* Automatically generated from an XML-RPC server
+ by running the following command:
+
+ ../genclient/genclient -i http://localhost:20738/RPC2
+*)
+
+exception Type_error of string
+
+class client url =
+ let rpc = new XmlRpc.client url in
+object (self)
+ method rpc = rpc
+
+ method system = object
+ method shutdown _0 =
+ let result = rpc#call "system.shutdown" [`String _0] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method multicall _0 =
+ let result = rpc#call "system.multicall" [`Array _0] in
+ match result with
+ | `Array r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method methodHelp _0 =
+ let result = rpc#call "system.methodHelp" [`String _0] in
+ match result with
+ | `String r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method methodSignature _0 =
+ let result = rpc#call "system.methodSignature" [`String _0] in
+ match result with
+ | `Array r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method listMethods () =
+ let result = rpc#call "system.listMethods" [] in
+ match result with
+ | `Array r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+ end
+
+ method ubigraph = object
+ method change_edge_style _0 _1 =
+ let result = rpc#call "ubigraph.change_edge_style" [`Int32 _0; `Int32 _1] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method new_edge_style_w_id _0 _1 =
+ let result = rpc#call "ubigraph.new_edge_style_w_id" [`Int32 _0; `Int32 _1] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method new_edge_style _0 =
+ let result = rpc#call "ubigraph.new_edge_style" [`Int32 _0] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method set_edge_style_attribute _0 _1 _2 =
+ let result = rpc#call "ubigraph.set_edge_style_attribute" [`Int32 _0; `String _1; `String _2] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method set_edge_attribute _0 _1 _2 =
+ let result = rpc#call "ubigraph.set_edge_attribute" [`Int32 _0; `String _1; `String _2] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method change_vertex_style _0 _1 =
+ let result = rpc#call "ubigraph.change_vertex_style" [`Int32 _0; `Int32 _1] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method new_vertex_style_w_id _0 _1 =
+ let result = rpc#call "ubigraph.new_vertex_style_w_id" [`Int32 _0; `Int32 _1] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method new_vertex_style _0 =
+ let result = rpc#call "ubigraph.new_vertex_style" [`Int32 _0] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method set_vertex_style_attribute _0 _1 _2 =
+ let result = rpc#call "ubigraph.set_vertex_style_attribute" [`Int32 _0; `String _1; `String _2] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method set_vertex_attribute _0 _1 _2 =
+ let result = rpc#call "ubigraph.set_vertex_attribute" [`Int32 _0; `String _1; `String _2] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method clear () =
+ let result = rpc#call "ubigraph.clear" [] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method remove_edge _0 =
+ let result = rpc#call "ubigraph.remove_edge" [`Int32 _0] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method remove_vertex _0 =
+ let result = rpc#call "ubigraph.remove_vertex" [`Int32 _0] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method new_edge _0 _1 =
+ let result = rpc#call "ubigraph.new_edge" [`Int32 _0; `Int32 _1] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method new_edge_w_id _0 _1 _2 =
+ let result = rpc#call "ubigraph.new_edge_w_id" [`Int32 _0; `Int32 _1; `Int32 _2] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method new_vertex () =
+ let result = rpc#call "ubigraph.new_vertex" [] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method new_vertex_w_id _0 =
+ let result = rpc#call "ubigraph.new_vertex_w_id" [`Int32 _0] in
+ match result with
+ | `Int r -> Int32.of_int r | `Int32 r -> r
+ | other -> raise (Type_error (XmlRpc.dump other))
+ end
+
+end
diff --git a/examples/ubigraph/Ubigraph.mli b/examples/ubigraph/Ubigraph.mli
new file mode 100644
index 0000000..363354a
--- /dev/null
+++ b/examples/ubigraph/Ubigraph.mli
@@ -0,0 +1,51 @@
+(*
+ * XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
+ * Copyright (C) 2008 Dave Benjamin (dave@ramenlabs.com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *)
+
+exception Type_error of string
+
+class client : string ->
+object
+ method rpc : XmlRpc.client
+
+ method ubigraph :
+ < change_edge_style : int32 -> int32 -> int32;
+ change_vertex_style : int32 -> int32 -> int32;
+ clear : unit -> int32;
+ new_edge : int32 -> int32 -> int32;
+ new_edge_style : int32 -> int32;
+ new_edge_style_w_id : int32 -> int32 -> int32;
+ new_edge_w_id : int32 -> int32 -> int32 -> int32;
+ new_vertex : unit -> int32;
+ new_vertex_style : int32 -> int32;
+ new_vertex_style_w_id : int32 -> int32 -> int32;
+ new_vertex_w_id : int32 -> int32;
+ remove_edge : int32 -> int32;
+ remove_vertex : int32 -> int32;
+ set_edge_attribute : int32 -> string -> string -> int32;
+ set_edge_style_attribute : int32 -> string -> string -> int32;
+ set_vertex_attribute : int32 -> string -> string -> int32;
+ set_vertex_style_attribute : int32 -> string -> string -> int32 >
+
+ method system :
+ < listMethods : unit -> XmlRpc.value list;
+ methodHelp : string -> string;
+ methodSignature : string -> XmlRpc.value list;
+ multicall : XmlRpc.value list -> XmlRpc.value list;
+ shutdown : string -> int32 >
+end
diff --git a/examples/ubigraph/test.ml b/examples/ubigraph/test.ml
new file mode 100644
index 0000000..892c564
--- /dev/null
+++ b/examples/ubigraph/test.ml
@@ -0,0 +1,54 @@
+(*
+ * XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
+ * Copyright (C) 2008 Dave Benjamin (dave@ramenlabs.com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *)
+
+(* Based on Python example, "examples/Python/ubigraph_example.py",
+ distributed with Ubigraph. For details, see the Ubigraph website:
+ http://ubietylab.net/ubigraph/
+*)
+
+let client = new Ubigraph.client "http://localhost:20738/RPC2"
+let u = client#ubigraph
+let _ = u#clear ()
+
+let x = u#new_vertex ()
+let _ = u#set_vertex_attribute x "shape" "sphere"
+let _ = u#set_vertex_attribute x "color" "#ffff00"
+
+let small_red = u#new_vertex_style 0l
+let _ = u#set_vertex_style_attribute small_red "shape" "sphere"
+let _ = u#set_vertex_style_attribute small_red "color" "#ff0000"
+let _ = u#set_vertex_style_attribute small_red "size" "0.2"
+
+let previous_r = ref None
+let () =
+ for i = 0 to 9 do
+ let r = u#new_vertex () in
+ let _ = u#change_vertex_style r small_red in
+ let _ = u#set_vertex_attribute r "label" (string_of_int i) in
+ let e = u#new_edge x r in
+ let _ = u#set_edge_attribute e "arrow" "true" in
+ match !previous_r with
+ | None ->
+ previous_r := Some r
+ | Some r' ->
+ let e = u#new_edge r r' in
+ let _ = u#set_edge_attribute e "spline" "true" in
+ let _ = u#set_edge_attribute e "stroke" "dashed" in
+ previous_r := Some r
+ done
diff --git a/examples/wordpress/WordPress.ml b/examples/wordpress/WordPress.ml
index d797545..f816848 100644
--- a/examples/wordpress/WordPress.ml
+++ b/examples/wordpress/WordPress.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,13 @@
exception Type_error of string
exception Unknown_field of string
+let strict = ref false
+
+let warn exn =
+ if !strict
+ then raise exn
+ else prerr_endline (Printexc.to_string exn)
+
let map_array f = function
| `Array items -> List.map f items
| other -> raise (Type_error (XmlRpc.dump other))
@@ -33,6 +40,35 @@ let int_value = function
| `String s -> int_of_string s
| other -> raise (Type_error (XmlRpc.dump other))
+module Blog = struct
+ type t = { mutable is_admin : bool;
+ mutable url : string;
+ mutable blog_id : int;
+ mutable blog_name : string;
+ mutable xmlrpc : string; }
+
+ let make () =
+ {is_admin=false;
+ url="";
+ blog_id=0;
+ blog_name="";
+ xmlrpc=""}
+
+ let of_xmlrpc value =
+ let result = make () in
+ iter_struct
+ (function
+ | ("isAdmin", `Boolean v) -> result.is_admin <- v
+ | ("url", `String v) -> result.url <- v
+ | ("blogid", `String v) -> result.blog_id <- int_of_string v
+ | ("blogid", `Int v) -> result.blog_id <- v
+ | ("blogName", `String v) -> result.blog_name <- v
+ | ("xmlrpc", `String v) -> result.xmlrpc <- v
+ | (field, _) -> warn (Unknown_field field))
+ value;
+ result
+end
+
module Category = struct
type t = { mutable category_id : int;
mutable parent_id : int;
@@ -54,12 +90,172 @@ module Category = struct
iter_struct
(function
| ("categoryId", `String v) -> result.category_id <- int_of_string v
+ | ("categoryId", `Int v) -> result.category_id <- v
| ("parentId", `String v) -> result.parent_id <- int_of_string v
+ | ("parentId", `Int v) -> result.parent_id <- v
| ("description", `String v) -> result.description <- v
| ("categoryName", `String v) -> result.category_name <- v
| ("htmlUrl", `String v) -> result.html_url <- v
| ("rssUrl", `String v) -> result.rss_url <- v
- | (field, _) -> raise (Unknown_field field))
+ | (field, _) -> warn (Unknown_field field))
+ value;
+ result
+end
+
+module CommentCount = struct
+ type t = { mutable approved : int;
+ mutable awaiting_moderation : int;
+ mutable spam : int;
+ mutable total_comments : int; }
+
+ let make () =
+ {approved=0;
+ awaiting_moderation=0;
+ spam=0;
+ total_comments=0}
+
+ let of_xmlrpc value =
+ let result = make () in
+ iter_struct
+ (function
+ | ("approved", `String v) -> result.approved <- int_of_string v
+ | ("approved", `Int v) -> result.approved <- v
+ | ("awaiting_moderation", `Int v) -> result.awaiting_moderation <- v
+ | ("spam", `Int v) -> result.spam <- v
+ | ("total_comments", `Int v) -> result.total_comments <- v
+ | (field, _) -> warn (Unknown_field field))
+ value;
+ result
+end
+
+module Comment = struct
+ type t = { mutable date_created : XmlRpcDateTime.t;
+ mutable user_id : int;
+ mutable comment_id : int;
+ mutable parent : int;
+ mutable status : string;
+ mutable content : string;
+ mutable link : string;
+ mutable post_id : int;
+ mutable post_title : string;
+ mutable author : string;
+ mutable author_url : string;
+ mutable author_email : string;
+ mutable author_ip : string;
+ mutable typ : string }
+
+ let make () =
+ {date_created=(0,0,0,0,0,0,0);
+ user_id=0;
+ comment_id=0;
+ parent=0;
+ status="";
+ content="";
+ link="";
+ post_id=0;
+ post_title="";
+ author="";
+ author_url="";
+ author_email="";
+ author_ip="";
+ typ=""}
+
+ let of_xmlrpc value =
+ let result = make () in
+ iter_struct
+ (function
+ | ("date_created_gmt", `DateTime v) -> result.date_created <- v
+ | ("user_id", `String v) -> result.user_id <- int_of_string v
+ | ("user_id", `Int v) -> result.user_id <- v
+ | ("comment_id", `String v) -> result.comment_id <- int_of_string v
+ | ("comment_id", `Int v) -> result.comment_id <- v
+ | ("parent", `String v) -> result.parent <- int_of_string v
+ | ("parent", `Int v) -> result.parent <- v
+ | ("status", `String v) -> result.status <- v
+ | ("content", `String v) -> result.content <- v
+ | ("link", `String v) -> result.link <- v
+ | ("post_id", `String v) -> result.post_id <- int_of_string v
+ | ("post_id", `Int v) -> result.post_id <- v
+ | ("post_title", `String v) -> result.post_title <- v
+ | ("author", `String v) -> result.author <- v
+ | ("author_url", `String v) -> result.author_url <- v
+ | ("author_email", `String v) -> result.author_email <- v
+ | ("author_ip", `String v) -> result.author_ip <- v
+ | ("type", `String v) -> result.typ <- v
+ | (field, _) -> warn (Unknown_field field))
+ value;
+ result
+
+ let to_xmlrpc comment =
+ `Struct ["date_created_gmt", `DateTime (XmlRpcDateTime.set_tz_offset 0
+ comment.date_created);
+ "user_id", `Int comment.user_id;
+ "comment_id", `Int comment.comment_id;
+ "parent", `Int comment.parent;
+ "status", `String comment.status;
+ "content", `String comment.content;
+ "link", `String comment.link;
+ "post_id", `Int comment.post_id;
+ "post_title", `String comment.post_title;
+ "author", `String comment.author;
+ "author_url", `String comment.author_url;
+ "author_email", `String comment.author_email;
+ "author_ip", `String comment.author_ip;
+ "type", `String comment.typ]
+end
+
+module CustomField = struct
+ type t = { mutable id : int option;
+ mutable key : string option;
+ mutable value : string }
+
+ let make () =
+ {id=None;
+ key=None;
+ value=""}
+
+ let of_xmlrpc value =
+ let result = make () in
+ iter_struct
+ (function
+ | ("id", `String v) -> result.id <- Some (int_of_string v)
+ | ("id", `Int v) -> result.id <- Some v
+ | ("key", `String v) -> result.key <- Some v
+ | ("value", `String v) -> result.value <- v
+ | (field, _) -> warn (Unknown_field field))
+ value;
+ result
+
+ let to_xmlrpc field =
+ match field with
+ | {id=None; key=None; value=value} ->
+ `Struct ["value", `String value]
+ | {id=Some id; key=None; value=value} ->
+ `Struct ["id", `Int id; "value", `String value]
+ | {id=None; key=Some key; value=value} ->
+ `Struct ["key", `String key; "value", `String value]
+ | {id=Some id; key=Some key; value=value} ->
+ `Struct ["id", `Int id; "key", `String key; "value", `String value]
+end
+
+module Option = struct
+ type t = { mutable desc : string;
+ mutable readonly : bool;
+ mutable value : string; }
+
+ let make () =
+ {desc="";
+ readonly=false;
+ value=""}
+
+ let of_xmlrpc value =
+ let result = make () in
+ iter_struct
+ (function
+ | ("desc", `String v) -> result.desc <- v
+ | ("readonly", `Boolean v) -> result.readonly <- v
+ | ("value", `String v) -> result.value <- v
+ | (field, _) -> warn (Unknown_field field))
value;
result
end
@@ -83,11 +279,12 @@ module User = struct
iter_struct
(function
| ("user_id", `String v) -> result.user_id <- int_of_string v
+ | ("user_id", `Int v) -> result.user_id <- v
| ("user_login", `String v) -> result.user_login <- v
| ("display_name", `String v) -> result.display_name <- v
| ("user_email", `String v) -> result.user_email <- v
| ("meta_value", `String v) -> result.meta_value <- v
- | (field, _) -> raise (Unknown_field field))
+ | (field, _) -> warn (Unknown_field field))
value;
result
end
@@ -110,11 +307,13 @@ module PageListItem = struct
iter_struct
(function
| ("page_id", `String v) -> result.page_id <- int_of_string v
+ | ("page_id", `Int v) -> result.page_id <- v
| ("page_title", `String v) -> result.page_title <- v
| ("page_parent_id", `String v) -> result.page_parent_id <- int_of_string v
+ | ("page_parent_id", `Int v) -> result.page_parent_id <- v
| ("dateCreated", `DateTime v) -> result.date_created <- v
| ("date_created_gmt", `DateTime v) -> result.date_created <- v
- | (field, _) -> raise (Unknown_field field))
+ | (field, _) -> warn (Unknown_field field))
value;
result
end
@@ -140,7 +339,9 @@ module Page = struct
mutable wp_page_parent_title : string;
mutable wp_page_order : int;
mutable wp_author_id : int;
- mutable wp_author_display_name : string; }
+ mutable wp_author_display_name : string;
+ mutable custom_fields : CustomField.t list;
+ mutable wp_page_template : string; }
let make () =
{date_created=(0,0,0,0,0,0,0);
@@ -163,7 +364,9 @@ module Page = struct
wp_page_parent_title="";
wp_page_order=0;
wp_author_id=0;
- wp_author_display_name=""}
+ wp_author_display_name="";
+ custom_fields=[];
+ wp_page_template=""}
let of_xmlrpc value =
let result = make () in
@@ -172,7 +375,9 @@ module Page = struct
| ("dateCreated", `DateTime v) -> result.date_created <- v
| ("date_created_gmt", `DateTime v) -> result.date_created <- v
| ("userid", `String v) -> result.user_id <- int_of_string v
+ | ("userid", `Int v) -> result.user_id <- v
| ("page_id", `String v) -> result.page_id <- int_of_string v
+ | ("page_id", `Int v) -> result.page_id <- v
| ("page_status", `String v) -> result.page_status <- v
| ("description", `String v) -> result.description <- v
| ("title", `String v) -> result.title <- v
@@ -182,48 +387,75 @@ module Page = struct
result.categories <- List.map XmlRpc.dump v
| ("excerpt", `String v) -> result.excerpt <- v
| ("text_more", `String v) -> result.text_more <- v
+ | ("mt_excerpt", `String v) -> result.excerpt <- v
+ | ("mt_text_more", `String v) -> result.text_more <- v
| ("mt_allow_comments", `Int v) -> result.mt_allow_comments <- v<>0
+ | ("mt_allow_comments", `Boolean v) -> result.mt_allow_comments <- v
| ("mt_allow_pings", `Int v) -> result.mt_allow_pings <- v<>0
+ | ("mt_allow_pings", `Boolean v) -> result.mt_allow_pings <- v
| ("wp_slug", `String v) -> result.wp_slug <- v
| ("wp_password", `String v) -> result.wp_password <- v
| ("wp_author", `String v) -> result.wp_author <- v
- | ("wp_page_parent_id", `Int v) ->
- result.wp_page_parent_id <- v
+ | ("wp_author_display_name", `String v) ->
+ result.wp_author_display_name <- v
| ("wp_page_parent_id", `String v) ->
result.wp_page_parent_id <- int_of_string v
+ | ("wp_page_parent_id", `Int v) ->
+ result.wp_page_parent_id <- v
| ("wp_page_parent_title", `String v) ->
result.wp_page_parent_title <- v
+ | ("wp_page_order", `String v) ->
+ result.wp_page_order <- int_of_string v
| ("wp_page_order", `Int v) ->
result.wp_page_order <- v
| ("wp_author_id", `String v) ->
result.wp_author_id <- int_of_string v
- | ("wp_author_display_name", `String v) ->
- result.wp_author_display_name <- v
- | (field, _) -> raise (Unknown_field field))
+ | ("wp_author_id", `Int v) ->
+ result.wp_author_id <- v
+ | ("custom_fields", `Array v) ->
+ result.custom_fields <- List.map CustomField.of_xmlrpc v
+ | ("wp_page_template", `String v) ->
+ result.wp_page_template <- v
+ | (field, _) -> warn (Unknown_field field))
value;
result
let to_xmlrpc page =
- `Struct ["wp_slug", `String page.wp_slug;
+ `Struct ["userid", `Int page.user_id;
+ "page_id", `Int page.page_id;
+ "page_status", `String page.page_status;
+ "wp_slug", `String page.wp_slug;
"wp_password", `String page.wp_password;
+ "wp_author", `String page.wp_author;
+ "wp_author_display_name", `String page.wp_author_display_name;
"wp_page_parent_id", `Int page.wp_page_parent_id;
+ "wp_page_parent_title", `String page.wp_page_parent_title;
"wp_page_order", `Int page.wp_page_order;
"wp_author_id", `Int page.wp_author_id;
"title", `String page.title;
"description", `String page.description;
+ "link", `String page.link;
+ "permaLink", `String page.permalink;
"mt_excerpt", `String page.excerpt;
"mt_text_more", `String page.text_more;
"mt_allow_comments", `Boolean page.mt_allow_comments;
"mt_allow_pings", `Boolean page.mt_allow_pings;
"dateCreated", `DateTime page.date_created;
+ "date_created_gmt", `DateTime (XmlRpcDateTime.set_tz_offset 0
+ page.date_created);
"categories", `Array (List.map
(fun s -> `String s)
- page.categories)]
+ page.categories);
+ "custom_fields", `Array (List.map
+ CustomField.to_xmlrpc
+ page.custom_fields);
+ "wp_page_template", `String page.wp_page_template]
end
module Post = struct
type t = { mutable user_id : int;
mutable post_id : int;
+ mutable post_status : string;
mutable date_created : XmlRpcDateTime.t;
mutable description : string;
mutable title : string;
@@ -238,12 +470,14 @@ module Post = struct
mutable wp_slug : string;
mutable wp_password : string;
mutable wp_author_id : int;
- mutable wp_author_display_name : string; }
+ mutable wp_author_display_name : string;
+ mutable custom_fields : CustomField.t list; }
let make () =
{date_created=(0,0,0,0,0,0,0);
user_id=0;
post_id=0;
+ post_status="";
description="";
title="";
link="";
@@ -257,7 +491,8 @@ module Post = struct
wp_slug="";
wp_password="";
wp_author_id=0;
- wp_author_display_name=""}
+ wp_author_display_name="";
+ custom_fields=[]}
let of_xmlrpc value =
let result = make () in
@@ -266,7 +501,10 @@ module Post = struct
| ("dateCreated", `DateTime v) -> result.date_created <- v
| ("date_created_gmt", `DateTime v) -> result.date_created <- v
| ("userid", `String v) -> result.user_id <- int_of_string v
+ | ("userid", `Int v) -> result.user_id <- v
| ("postid", `String v) -> result.post_id <- int_of_string v
+ | ("postid", `Int v) -> result.post_id <- v
+ | ("post_status", `String v) -> result.post_status <- v
| ("description", `String v) -> result.description <- v
| ("title", `String v) -> result.title <- v
| ("link", `String v) -> result.link <- v
@@ -276,20 +514,33 @@ module Post = struct
| ("mt_excerpt", `String v) -> result.excerpt <- v
| ("mt_text_more", `String v) -> result.text_more <- v
| ("mt_allow_comments", `Int v) -> result.mt_allow_comments <- v<>0
+ | ("mt_allow_comments", `Boolean v) -> result.mt_allow_comments <- v
| ("mt_allow_pings", `Int v) -> result.mt_allow_pings <- v<>0
+ | ("mt_allow_pings", `Boolean v) -> result.mt_allow_pings <- v
| ("mt_keywords", `String v) -> result.mt_keywords <- v
| ("wp_slug", `String v) -> result.wp_slug <- v
| ("wp_password", `String v) -> result.wp_password <- v
| ("wp_author_id", `String v) -> result.wp_author_id <- int_of_string v
- | ("wp_author_display_name", `String v) -> result.wp_author_display_name <- v
- | (field, _) -> raise (Unknown_field field))
+ | ("wp_author_id", `Int v) -> result.wp_author_id <- v
+ | ("wp_author_display_name", `String v) ->
+ result.wp_author_display_name <- v
+ | ("custom_fields", `Array v) ->
+ result.custom_fields <- List.map CustomField.of_xmlrpc v
+ | (field, _) -> warn (Unknown_field field))
value;
result
let to_xmlrpc post =
`Struct ["dateCreated", `DateTime post.date_created;
+ "date_created_gmt", `DateTime (XmlRpcDateTime.set_tz_offset 0
+ post.date_created);
+ "userid", `Int post.user_id;
+ "postid", `Int post.post_id;
+ "post_status", `String post.post_status;
"description", `String post.description;
"title", `String post.title;
+ "link", `String post.link;
+ "permaLink", `String post.permalink;
"categories", `Array (List.map
(fun s -> `String s)
post.categories);
@@ -300,7 +551,11 @@ module Post = struct
"mt_keywords", `String post.mt_keywords;
"wp_slug", `String post.wp_slug;
"wp_password", `String post.wp_password;
- "wp_author_id", `Int post.wp_author_id]
+ "wp_author_id", `Int post.wp_author_id;
+ "wp_author_display_name", `String post.wp_author_display_name;
+ "custom_fields", `Array (List.map
+ CustomField.to_xmlrpc
+ post.custom_fields)];
end
class api ~url ~blog_id ~username ~password =
@@ -326,6 +581,16 @@ object (self)
method get_page_list () =
map_array PageListItem.of_xmlrpc (rpc#call "wp.getPageList" std_args)
+ method get_page_status_list () =
+ match rpc#call "wp.getPageStatusList" std_args with
+ | `Struct pairs -> List.map (fun (k, v) -> (k, XmlRpc.dump v)) pairs
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method get_page_templates () =
+ match rpc#call "wp.getPageTemplates" std_args with
+ | `Struct pairs -> List.map (fun (k, v) -> (k, XmlRpc.dump v)) pairs
+ | other -> raise (Type_error (XmlRpc.dump other))
+
method new_page content publish =
int_value
(rpc#call "wp.newPage"
@@ -354,6 +619,11 @@ object (self)
map_array Post.of_xmlrpc (rpc#call "metaWeblog.getRecentPosts"
(std_args @ [`Int num_posts]))
+ method get_post_status_list () =
+ match rpc#call "wp.getPostStatusList" std_args with
+ | `Struct pairs -> List.map (fun (k, v) -> (k, XmlRpc.dump v)) pairs
+ | other -> raise (Type_error (XmlRpc.dump other))
+
method new_post content publish =
int_value
(rpc#call "metaWeblog.newPost"
@@ -378,6 +648,47 @@ object (self)
method get_authors () =
map_array User.of_xmlrpc (rpc#call "wp.getAuthors" std_args)
+ method get_blogs () =
+ map_array Blog.of_xmlrpc (rpc#call "wp.getUsersBlogs" [`String username;
+ `String password])
+
+ method get_comment_count post_id =
+ CommentCount.of_xmlrpc
+ (rpc#call "wp.getCommentCount" (std_args @ [`Int post_id]))
+
+ method get_comment_status_list () =
+ match rpc#call "wp.getCommentStatusList" std_args with
+ | `Struct pairs -> List.map (fun (k, v) -> (k, XmlRpc.dump v)) pairs
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method get_comment comment_id =
+ Comment.of_xmlrpc
+ (rpc#call "wp.getComment" (std_args @ [`Int comment_id]))
+
+ method get_comments ?(status="") ?(post_id=0) ?(offset=0) ?(number=10) () =
+ map_array Comment.of_xmlrpc
+ (rpc#call "wp.getComments"
+ (std_args @ [`Struct ["status", `String status;
+ "post_id", `Int post_id;
+ "offset", `Int offset;
+ "number", `Int number]]))
+
+ method new_comment comment =
+ int_value
+ (rpc#call "wp.newComment"
+ (std_args @ [`Int comment.Comment.post_id;
+ Comment.to_xmlrpc comment]))
+
+ method edit_comment comment_id comment =
+ ignore
+ (rpc#call "wp.editComment"
+ (std_args @ [`Int comment_id;
+ Comment.to_xmlrpc comment]))
+
+ method delete_comment comment_id =
+ ignore
+ (rpc#call "wp.deleteComment" (std_args @ [`Int comment_id]))
+
method get_categories () =
map_array Category.of_xmlrpc (rpc#call "wp.getCategories" std_args)
@@ -393,6 +704,29 @@ object (self)
rpc#call "wp.suggestCategories"
(std_args @ [`String category; `Int max_results])
+ method get_options names =
+ let result =
+ rpc#call
+ "wp.getOptions"
+ (std_args @ [`Array (List.map (fun s -> `String s) names)]) in
+ match result with
+ | `Struct pairs ->
+ List.map (fun (name, opt) -> (name, Option.of_xmlrpc opt)) pairs
+ | `Array [] -> []
+ | other -> raise (Type_error (XmlRpc.dump other))
+
+ method set_options options =
+ let result =
+ rpc#call
+ "wp.setOptions"
+ (std_args @ [`Struct (List.map (fun (name, value) ->
+ (name, `String value)) options)]) in
+ match result with
+ | `Struct pairs ->
+ List.map (fun (name, opt) -> (name, Option.of_xmlrpc opt)) pairs
+ | `Array [] -> []
+ | other -> raise (Type_error (XmlRpc.dump other))
+
method upload_file ~name ~typ ~bits ~overwrite =
let value =
rpc#call "wp.uploadFile"
@@ -406,7 +740,7 @@ object (self)
| ("file", `String v) -> file := v
| ("url", `String v) -> url := v
| ("type", `String v) -> typ := v
- | (field, _) -> raise (Unknown_field field))
+ | (field, _) -> warn (Unknown_field field))
value;
(!file, !url, !typ)
end
diff --git a/examples/wordpress/WordPress.mli b/examples/wordpress/WordPress.mli
index 87b71dc..47b5a18 100644
--- a/examples/wordpress/WordPress.mli
+++ b/examples/wordpress/WordPress.mli
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,21 @@
exception Type_error of string
exception Unknown_field of string
+val strict : bool ref
+
+module Blog :
+sig
+ type t = {
+ mutable is_admin : bool;
+ mutable url : string;
+ mutable blog_id : int;
+ mutable blog_name : string;
+ mutable xmlrpc : string;
+ }
+ val make : unit -> t
+ val of_xmlrpc : XmlRpc.value -> t
+end
+
module Category :
sig
type t = {
@@ -34,6 +49,64 @@ sig
val of_xmlrpc : XmlRpc.value -> t
end
+module CommentCount :
+sig
+ type t = {
+ mutable approved : int;
+ mutable awaiting_moderation : int;
+ mutable spam : int;
+ mutable total_comments : int;
+ }
+ val make : unit -> t
+ val of_xmlrpc : XmlRpc.value -> t
+end
+
+module Comment :
+sig
+ type t = {
+ mutable date_created : XmlRpcDateTime.t;
+ mutable user_id : int;
+ mutable comment_id : int;
+ mutable parent : int;
+ mutable status : string;
+ mutable content : string;
+ mutable link : string;
+ mutable post_id : int;
+ mutable post_title : string;
+ mutable author : string;
+ mutable author_url : string;
+ mutable author_email : string;
+ mutable author_ip : string;
+ mutable typ : string;
+ }
+ val make : unit -> t
+ val of_xmlrpc : XmlRpc.value -> t
+ val to_xmlrpc : t -> XmlRpc.value
+end
+
+module CustomField :
+sig
+ type t = {
+ mutable id : int option;
+ mutable key : string option;
+ mutable value : string;
+ }
+ val make : unit -> t
+ val of_xmlrpc : XmlRpc.value -> t
+ val to_xmlrpc : t -> XmlRpc.value
+end
+
+module Option :
+sig
+ type t = {
+ mutable desc : string;
+ mutable readonly : bool;
+ mutable value : string;
+ }
+ val make : unit -> t
+ val of_xmlrpc : XmlRpc.value -> t
+end
+
module User :
sig
type t = {
@@ -83,6 +156,8 @@ sig
mutable wp_page_order : int;
mutable wp_author_id : int;
mutable wp_author_display_name : string;
+ mutable custom_fields : CustomField.t list;
+ mutable wp_page_template : string;
}
val make : unit -> t
val of_xmlrpc : XmlRpc.value -> t
@@ -94,6 +169,7 @@ sig
type t = {
mutable user_id : int;
mutable post_id : int;
+ mutable post_status : string;
mutable date_created : XmlRpcDateTime.t;
mutable description : string;
mutable title : string;
@@ -109,6 +185,7 @@ sig
mutable wp_password : string;
mutable wp_author_id : int;
mutable wp_author_display_name : string;
+ mutable custom_fields : CustomField.t list;
}
val make : unit -> t
val of_xmlrpc : XmlRpc.value -> t
@@ -127,22 +204,37 @@ object
val std_args : XmlRpc.value list
val username : string
method rpc : XmlRpc.client
+ method delete_comment : int -> unit
method delete_page : int -> unit
method delete_post : int -> unit
+ method edit_comment : int -> Comment.t -> unit
method edit_page : int -> Page.t -> bool -> unit
method edit_post : int -> Post.t -> bool -> unit
method get_authors : unit -> User.t list
+ method get_blogs : unit -> Blog.t list
method get_categories : unit -> Category.t list
+ method get_comment : int -> Comment.t
+ method get_comment_count : int -> CommentCount.t
+ method get_comment_status_list : unit -> (string * string) list
+ method get_comments :
+ ?status:string ->
+ ?post_id:int -> ?offset:int -> ?number:int -> unit -> Comment.t list
+ method get_options : string list -> (string * Option.t) list
method get_page : int -> Page.t
method get_page_list : unit -> PageListItem.t list
+ method get_page_status_list : unit -> (string * string) list
+ method get_page_templates : unit -> (string * string) list
method get_pages : unit -> Page.t list
method get_post : int -> Post.t
+ method get_post_status_list : unit -> (string * string) list
method get_recent_posts : int -> Post.t list
method new_category :
name:string ->
slug:string -> parent_id:int -> description:string -> int
+ method new_comment : Comment.t -> int
method new_page : Page.t -> bool -> int
method new_post : Post.t -> bool -> int
+ method set_options : (string * string) list -> (string * Option.t) list
method suggest_categories : string -> int -> XmlRpc.value
method upload_file :
name:string ->
diff --git a/examples/wordpress/test.ml b/examples/wordpress/test.ml
index fe5b487..5bede7b 100644
--- a/examples/wordpress/test.ml
+++ b/examples/wordpress/test.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/test/test.ml b/test/test.ml
index e79ffa4..f1c919d 100644
--- a/test/test.ml
+++ b/test/test.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/test/test_base64.ml b/test/test_base64.ml
index 957c491..e8e11e4 100644
--- a/test/test_base64.ml
+++ b/test/test_base64.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/test/test_datetime.ml b/test/test_datetime.ml
index 3c873f9..4960126 100644
--- a/test/test_datetime.ml
+++ b/test/test_datetime.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/test/test_message.ml b/test/test_message.ml
index da268b2..ef67096 100644
--- a/test/test_message.ml
+++ b/test/test_message.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/test/test_serve.ml b/test/test_serve.ml
index f50047c..aef07a2 100644
--- a/test/test_serve.ml
+++ b/test/test_serve.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/test/test_value.ml b/test/test_value.ml
index 1540471..8c1f61a 100644
--- a/test/test_value.ml
+++ b/test/test_value.ml
@@ -1,6 +1,6 @@
(*
* XmlRpc Light, a small XmlRpc library based on Xml Light and Ocamlnet
- * Copyright (C) 2007 Dave Benjamin (dave@ramenlabs.com)
+ * Copyright (C) 2007-2009 Dave Benjamin (dave@ramenlabs.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -51,11 +51,13 @@ let test = "test_value" >:::
"to_int32" >::
(fun () ->
- assert_equal
- ~printer:XmlRpc.dump
- (`Int32 2000000000l)
- (XmlRpc.value_of_xml_element
- (Xml.Element ("int", [], [Xml.PCData "2000000000"]))));
+ if Sys.word_size = 32
+ then
+ assert_equal
+ ~printer:XmlRpc.dump
+ (`Int32 2000000000l)
+ (XmlRpc.value_of_xml_element
+ (Xml.Element ("int", [], [Xml.PCData "2000000000"]))));
"of_double" >::
(fun () ->
@@ -266,6 +268,17 @@ let test = "test_value" >:::
Xml.Element
("value", [],
[Xml.PCData "rutabega"])])])])])]))));
+ "to_struct_empty_name" >::
+ (fun () ->
+ assert_equal
+ ~printer:XmlRpc.dump
+ (`Struct ["", `String ""; "", `Int 42])
+ (XmlRpc.value_of_xml_element
+ (Xml.parse_string
+ "<struct>
+ <member><name></name><value></value></member>
+ <member><name/><value><int>42</int></value></member>
+ </struct>")));
]
let tests = test :: tests