Re: [Vala] xmlrpc-c bindings for vala
- From: Phil Daintree <phil logicworks co nz>
- To: vala-list gnome org
- Subject: Re: [Vala] xmlrpc-c bindings for vala
- Date: Sun, 05 Sep 2010 22:25:34 +1200
Pancake, In the xmlrpc-c docs it refers to a method xmlrpc_decompose_value()
Your binding appears to link to xmlrpc_parse_value()
from the docs
"This deprecated function is the predecessor to
xmlrpc_decompose_value(). It's the same, but xmlrpc_parse_value()
doesn't do proper memory management,"
I particularly need to be able to get at arrays of structs - which does
seem excessively hard!!
I came across libxr, which I built and advertises vala support. It
appears to have vala bindings, but probably for an older version and
compilation of their test program fails as well! I built the latest
version and the vala bindings are gone :-( The documentation is
extremely limited and I would write some up if only I could get a start!
At least with libSoup I can get a message back - maybe I should use
libxml to parse the response.
On 05/09/10 11:13, Phil Daintree wrote:
Pancake, I've have had a go with your bindings for xmlrpc-c - copied
the file to /usr/share/vala/vapi/xmlrpc-c.vapi
I then had a go at compiling the xmlrpc-test.vala
It starts with
using Bincrowd
I don't see any bindings for this lib - so I changed that to
Using Xmlrpc
and compiled with --pkg xmlrpc-c
I get
# valac --pkg xmlrpc-c xmlrpc-test.vala
xmlrpc-test.vala:18.7-18.11: error: The name `ARRAY' does not exist in
the context of `print_value'
case ARRAY:
^^^^^
xmlrpc-test.vala:18.7-18.11: error: Expression must be constant
case ARRAY:
^^^^^
xmlrpc-test.vala:30.7-30.9: error: The name `INT' does not exist in the
context of `print_value'
case INT:
^^^
xmlrpc-test.vala:30.7-30.9: error: Expression must be constant
case INT:
^^^
xmlrpc-test.vala:35.7-35.12: error: The name `STRING' does not exist in
the context of `print_value'
case STRING:
^^^^^^
xmlrpc-test.vala:35.7-35.12: error: Expression must be constant
case STRING:
^^^^^^
xmlrpc-test.vala:40.7-40.12: error: The name `STRUCT' does not exist in
the context of `print_value'
case STRUCT:
^^^^^^
xmlrpc-test.vala:40.7-40.12: error: Expression must be constant
case STRUCT:
^^^^^^
Compilation failed: 8 error(s), 0 warning(s)
#
I can see in your xmlrpc-c.vapi
[CCode (cname="xmlrpc_type", cprefix="XMLRPC_TYPE_")]
public enum Type {
INT,
BOOL,
DOUBLE,
DATETIME,
STRING,
BASE64,
ARRAY,
STRUCT,
C_PTR,
NIL,
I8,
DEAD
}
So perhaps it is something to do with how one installs the bindings?
Maybe there is more to it than just copying the file!
Appreciate any pointers.
Thanks
Phil
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]