WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 04 of 17] [rpc-light] Add a function to parse XMLRPC fr

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 04 of 17] [rpc-light] Add a function to parse XMLRPC from an input channel
From: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
Date: Fri, 8 Jan 2010 13:49:17 +0000
Delivery-date: Fri, 08 Jan 2010 05:49:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1262958553@steel>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
# Date 1262958466 0
# Node ID 91091e97839df807f73ddbd9ff40ab1e13d7753d
# Parent  b1d07ffe0323c8e7384c2c7042098d12dac2eb23
[rpc-light] Add a function to parse XMLRPC from an input channel.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>

diff -r b1d07ffe0323 -r 91091e97839d rpc-light/xmlrpc.ml
--- a/rpc-light/xmlrpc.ml       Fri Jan 08 13:47:46 2010 +0000
+++ b/rpc-light/xmlrpc.ml       Fri Jan 08 13:47:46 2010 +0000
@@ -259,8 +259,7 @@
                ) input;
        call !name (List.rev !params)
        
-let response_of_string ?callback str =
-       let input = Xmlm.make_input (`String (0, str)) in
+let response_of_input ?callback input =
        begin match Xmlm.peek input with
        | `Dtd _ -> ignore (Xmlm.input input)
        | _      -> () end;
@@ -274,4 +273,10 @@
                        ) input
                ) input
 
-       
+let response_of_string ?callback str =
+       let input = Xmlm.make_input (`String (0, str)) in
+       response_of_input ?callback input
+
+let response_of_in_channel ?callback chan =
+       let input = Xmlm.make_input (`Channel chan) in
+       response_of_input ?callback input
diff -r b1d07ffe0323 -r 91091e97839d rpc-light/xmlrpc.mli
--- a/rpc-light/xmlrpc.mli      Fri Jan 08 13:47:46 2010 +0000
+++ b/rpc-light/xmlrpc.mli      Fri Jan 08 13:47:46 2010 +0000
@@ -19,4 +19,6 @@
 val call_of_string: ?callback:Rpc.callback -> string -> Rpc.call
 
 val string_of_response: Rpc.response -> string
+
 val response_of_string: ?callback:Rpc.callback -> string -> Rpc.response
+val response_of_in_channel: ?callback:Rpc.callback -> in_channel -> 
Rpc.response
2 files changed, 10 insertions(+), 3 deletions(-)
rpc-light/xmlrpc.ml  |   11 ++++++++---
rpc-light/xmlrpc.mli |    2 ++


Attachment: xen-api-libs.hg-17.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>