[gxml/xpath: 5/8] libxml-2.0.vapi: wrap some XPath functions



commit 05268dc54236b57f4978be3b48186eaf28fc514d
Author: Adam Ples <ples adam gmail com>
Date:   Mon Oct 14 05:44:01 2013 -0400

    libxml-2.0.vapi: wrap some XPath functions

 vapi/libxml-2.0.vapi |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/vapi/libxml-2.0.vapi b/vapi/libxml-2.0.vapi
index f20a815..2a1f547 100644
--- a/vapi/libxml-2.0.vapi
+++ b/vapi/libxml-2.0.vapi
@@ -1453,6 +1453,23 @@ namespace Xml {
                [CCode (cname = "xmlXPathOrderDocElems")]
                public static long order_doc_elements (Doc* doc);
 
+               [CCode (cname = "xmlXPathCompile")]
+               public static CompExpr* compile(string str);
+
+               [CCode (cname = "xmlXPathCastToBoolean")]
+               public static bool cast_to_boolean(Object *o);
+
+               [CCode (cname = "xmlXPathCastToNumber")]
+               public static double cast_to_number(Object *o);
+
+               [CCode (cname = "xmlXPathCastToString")]
+               public static string cast_to_string(Object *o);
+
+               [Compact]
+               [CCode (cname = "xmlXPathCompExpr", free_function = "xmlXPathFreeCompExpr", cheader_filename 
= "libxml/xpath.h")]
+               public class CompExpr {
+               }
+
                [Compact]
                [CCode (cname = "xmlNodeSet", free_function="xmlXPathFreeNodeSet", cheader_filename = 
"libxml/xpath.h")]
                public class NodeSet {
@@ -1481,6 +1498,12 @@ namespace Xml {
                        [CCode (cname = "xmlXPathEvalExpression", instance_pos = -1)]
                        public Object* eval_expression ([CCode (type = "xmlChar*")] string str);
 
+                       [CCode (cname = "xmlXPathCompiledEval", instance_pos = -1)]
+                       public Object* compiled_eval(CompExpr* expr);
+
+                       [CCode (cname = "xmlXPathCompiledEvalToBoolean", instance_pos = -1)]
+                       public int compiled_eval_to_boolean(CompExpr* expr);
+
                        [CCode (cname = "xmlXPathRegisterNs")]
                        public int register_ns ([CCode (type = "xmlChar*")] string prefix, [CCode (type = 
"xmlChar*")] string ns_uri);
 
@@ -1727,6 +1750,7 @@ namespace Xml {
                public void* node;
 
                // TODO: should this just be get_last instead?
+               // TODO: or should this be outside of this struct?
                [CCode (cname = "xmlGetLastError")]
                public static Xml.Error *get_last_error ();
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]