]> gitweb @ CieloNegro.org - bindings-apr-util.git/blob - Bindings/APR/XML.hsc
Bindings.APR.XML and APU.Version
[bindings-apr-util.git] / Bindings / APR / XML.hsc
1 #include <bindings.dsl.h>
2 #include <apr_xml.h>
3
4 module Bindings.APR.XML where
5 #strict_import
6 import Bindings.APR
7 import Bindings.APR.ErrNo
8 import Bindings.APR.File.Types
9 import Bindings.APR.Pools
10 import Bindings.APR.Tables
11 import Bindings.APR.XLate
12
13 #starttype struct apr_text
14 #  field text, Ptr CChar
15 #  field next, Ptr <apr_text>
16 #stoptype
17
18 #starttype struct apr_text_header
19 #  field first, Ptr <apr_text>
20 #  field last , Ptr <apr_text>
21 #stoptype
22
23 #ccall apr_text_append, Ptr <apr_pool_t> -> Ptr <apr_text_header> -> Ptr CChar -> IO ()
24
25 #num APR_XML_NS_DAV_ID
26 #num APR_XML_NS_NONE
27
28 #num APR_XML_NS_ERROR_BASE
29 #cinline APR_XML_NS_IS_ERROR, CInt -> IO CInt
30
31 #starttype struct apr_xml_attr
32 #  field name , Ptr CChar
33 #  field ns   , CInt
34 #  field value, Ptr CChar
35 #  field next , Ptr <apr_xml_attr>
36 #stoptype
37
38 #opaque_t apr_xml_ns_scope
39
40 #starttype struct apr_xml_elem
41 #  field name, Ptr CChar
42 #  field ns  , CInt
43 #  field lang, Ptr CChar
44
45 #  field first_cdata    , <apr_text_header>
46 #  field following_cdata, <apr_text_header>
47
48 #  field parent     , Ptr <apr_xml_elem>
49 #  field next       , Ptr <apr_xml_elem>
50 #  field first_child, Ptr <apr_xml_elem>
51 #  field attr       , Ptr <apr_xml_elem>
52
53 #  field last_child , Ptr <apr_xml_elem>
54 #  field ns_scope   , Ptr <apr_xml_ns_scope>
55
56 #  field priv, Ptr ()
57 #stoptype
58
59 #cinline APR_XML_ELEM_IS_EMPTY, Ptr <apr_xml_elem> -> IO CInt
60
61 #starttype struct apr_xml_doc
62 #  field root      , Ptr <apr_xml_elem>
63 #  field namespaces, Ptr <apr_array_header_t>
64 #stoptype
65
66 #opaque_t apr_xml_parser
67
68 #ccall apr_xml_parser_create  , Ptr <apr_pool_t> -> IO (Ptr <apr_xml_parser>)
69 #ccall apr_xml_parse_file     , Ptr <apr_pool_t> -> Ptr (Ptr <apr_xml_parser>) -> Ptr (Ptr <apr_xml_doc>) -> Ptr <apr_file_t> -> <apr_size_t> -> IO <apr_status_t>
70 #ccall apr_xml_parser_feed    , Ptr <apr_xml_parser> -> Ptr CChar -> <apr_size_t> -> IO <apr_status_t>
71 #ccall apr_xml_parser_done    , Ptr <apr_xml_parser> -> Ptr (Ptr <apr_xml_doc>) -> IO <apr_status_t>
72 #ccall apr_xml_parser_geterror, Ptr <apr_xml_parser> -> Ptr CChar -> <apr_size_t> -> IO (Ptr CChar)
73
74 #ccall apr_xml_to_text, Ptr <apr_pool_t> -> Ptr <apr_xml_elem> -> CInt -> Ptr <apr_array_header_t> -> Ptr CInt -> Ptr (Ptr CChar) -> Ptr <apr_size_t> -> IO ()
75
76 #num APR_XML_X2T_FULL
77 #num APR_XML_X2T_INNER
78 #num APR_XML_X2T_LANG_INNER
79 #num APR_XML_X2T_FULL_NS_LANG
80
81 #ccall apr_xml_empty_elem  , Ptr <apr_pool_t> -> Ptr <apr_xml_elem> -> IO (Ptr CChar)
82 #ccall apr_xml_quote_string, Ptr <apr_pool_t> -> Ptr CChar -> CInt -> IO (Ptr CChar)
83 #ccall apr_xml_quote_elem  , Ptr <apr_pool_t> -> Ptr <apr_xml_elem> -> IO ()
84 #ccall apr_xml_insert_uri  , Ptr <apr_array_header_t> -> Ptr CChar -> IO CInt
85
86 #cinline APR_XML_GET_URI_ITEM, Ptr <apr_array_header_t> -> CInt -> IO (Ptr CChar)
87
88 #if APR_CHARSET_EBCDIC
89 #  ccall apr_xml_parser_convert_doc, Ptr <apr_pool_t> -> Ptr <apr_xml_doc> -> Ptr <apr_xlate_t> -> IO <apr_status_t>
90 #endif