1 #include <bindings.dsl.h>
2 #include <apr_tables.h>
4 module Bindings.APR.Tables where
7 import Bindings.APR.Pools
11 #starttype struct apr_array_header_t
12 # field pool , Ptr <apr_pool_t>
13 # field elt_size, CInt
16 # field elts , Ptr CChar
19 #starttype struct apr_table_entry_t
20 # field key, Ptr CChar
21 # field val, Ptr CChar
22 # field key_checksum, <apr_uint32_t>
25 #ccall apr_table_elts , Ptr <apr_table_t> -> IO (Ptr <apr_array_header_t>)
27 #ccall apr_is_empty_table, Ptr <apr_table_t> -> IO CInt
28 #ccall apr_is_empty_array, Ptr <apr_array_header_t> -> IO CInt
30 #ccall apr_array_make , Ptr <apr_pool_t> -> CInt -> CInt -> IO (Ptr <apr_array_header_t>)
31 #ccall apr_array_push , Ptr <apr_array_header_t> -> IO (Ptr ())
33 -- It's impossible to wrap around APR_ARRAY_IDX and APR_ARRAY_PUSH as
34 -- they take C types as their arguments.
36 #ccall apr_array_pop , Ptr <apr_array_header_t> -> IO (Ptr ())
37 #ccall apr_array_clear , Ptr <apr_array_header_t> -> IO ()
38 #ccall apr_array_cat , Ptr <apr_array_header_t> -> Ptr <apr_array_header_t> -> IO ()
39 #ccall apr_array_copy , Ptr <apr_pool_t> -> Ptr <apr_array_header_t> -> IO (Ptr <apr_array_header_t>)
40 #ccall apr_array_copy_hdr, Ptr <apr_pool_t> -> Ptr <apr_array_header_t> -> IO (Ptr <apr_array_header_t>)
41 #ccall apr_array_append , Ptr <apr_pool_t> -> Ptr <apr_array_header_t> -> Ptr <apr_array_header_t> -> IO (Ptr <apr_array_header_t>)
42 #ccall apr_array_pstrcat , Ptr <apr_pool_t> -> Ptr <apr_array_header_t> -> CChar -> IO (Ptr CChar)
44 #ccall apr_table_make , Ptr <apr_pool_t> -> CInt -> IO (Ptr <apr_table_t>)
45 #ccall apr_table_copy , Ptr <apr_pool_t> -> Ptr <apr_table_t> -> IO (Ptr <apr_table_t>)
46 #ccall apr_table_clone , Ptr <apr_pool_t> -> Ptr <apr_table_t> -> IO (Ptr <apr_table_t>)
47 #ccall apr_table_clear , Ptr <apr_table_t> -> IO ()
48 #ccall apr_table_get , Ptr <apr_table_t> -> Ptr CChar -> IO (Ptr CChar)
49 #ccall apr_table_set , Ptr <apr_table_t> -> Ptr CChar -> Ptr CChar -> IO ()
50 #ccall apr_table_setn , Ptr <apr_table_t> -> Ptr CChar -> Ptr CChar -> IO ()
51 #ccall apr_table_unset , Ptr <apr_table_t> -> Ptr CChar -> Ptr CChar -> IO ()
52 #ccall apr_table_merge , Ptr <apr_table_t> -> Ptr CChar -> Ptr CChar -> IO ()
53 #ccall apr_table_mergen, Ptr <apr_table_t> -> Ptr CChar -> Ptr CChar -> IO ()
54 #ccall apr_table_add , Ptr <apr_table_t> -> Ptr CChar -> Ptr CChar -> IO ()
55 #ccall apr_table_addn , Ptr <apr_table_t> -> Ptr CChar -> Ptr CChar -> IO ()
56 #ccall apr_table_overlay, Ptr <apr_pool_t> -> Ptr <apr_table_t> -> Ptr <apr_table_t> -> IO (Ptr <apr_table_t>)
58 #callback apr_table_do_callback_fn_t, Ptr () -> Ptr CChar -> Ptr CChar -> IO CInt
60 -- It's impossible to wrap around apr_table_do and apr_table_vdo as
63 #num APR_OVERLAP_TABLES_SET
64 #num APR_OVERLAP_TABLES_MERGE
66 #ccall apr_table_overlap , Ptr <apr_table_t> -> Ptr <apr_table_t> -> CUInt -> IO ()
67 #ccall apr_table_compress, Ptr <apr_table_t> -> CUInt -> IO ()