]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libxml-2.0: add many methods to ParserCtxt
authorGiulio Paci <giuliopaci@interfree.it>
Fri, 29 Jul 2011 05:53:09 +0000 (22:53 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Fri, 29 Jul 2011 05:53:09 +0000 (22:53 -0700)
Fixes bug 655543.

vapi/libxml-2.0.vapi

index 1bbefdd7e7fe001de6f9bc49d4e1cf3245795926..d5fdf297b5c7b433ccb6808d1725f55c6b9bad21 100644 (file)
@@ -792,14 +792,59 @@ namespace Xml {
        }
 
        [Compact]
-       [CCode (cname = "xmlParserCtxt")]
+       [CCode (cname = "xmlParserCtxt", free_function = "xmlFreeParserCtxt", cheader_filename = "libxml/parser.h")]
        public class ParserCtxt {
                public SAXHandler* sax;
                [CCode (cname = "userData")]
                public void* user_data;
 
+               [CCode (cname = "xmlNewParserCtxt")]
+               public ParserCtxt ();
+
+               [CCode (cname = "xmlCreatePushParserCtxt")]
+               public ParserCtxt.create_push (Xml.SAXHandler* sax, void* user_data, [CCode (array_length = false)] char[] data, int len, string? filename = null);
+
+               [CCode (cname = "xmlCreateIOParserCtxt")]
+               public ParserCtxt.create_io (Xml.SAXHandler* sax, void* user_data, Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string? encoding = null);
+
+               [CCode (cname = "xmlCreateDocParserCtxt")]
+               public ParserCtxt.create_doc (string cur);
+
+               [CCode (cname = "xmlParseChunk")]
+               public int parse_chunk ([CCode (array_length = false)] char[] data, int size, bool terminate);
+
                [CCode (cname = "xmlParseDocument")]
                public int parse_document ();
+
+               [CCode (cname = "xmlCtxtResetPush")]
+               public void reset_push ([CCode (array_length = false)] char[] data, int len, string? filename = null, string? encoding = null);
+
+               [CCode (cname = "xmlCtxtReset")]
+               public void reset ();
+
+               [CCode (cname = "xmlCtxtInit")]
+               public void init ();
+
+               [CCode (cname = "xmlCtxtClear")]
+               public void clear ();
+
+               [CCode (cname = "xmlCtxtUseOptions")]
+               public int use_options (int options);
+
+               [CCode (cname = "xmlCtxtReadDoc")]
+               public Doc* read_doc (string cur, string url, string? encoding = null, int options = 0);
+
+               [CCode (cname = "xmlCtxtReadFile")]
+               public Doc* read_file (string filename, string? encoding = null, int options = 0);
+
+               [CCode (cname = "xmlCtxtReadMemory")]
+               public Doc* read_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
+
+               [CCode (cname = "xmlCtxtReadFd")]
+               public Doc* read_fd (int fd, string url, string? encoding = null, int options = 0);
+
+               [CCode (cname = "xmlCtxtReadIO")]
+               public Doc* read_io (Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
        }