#include #include #include module Bindings.APR.Buckets where #strict_import import Bindings.APR import Bindings.APR.Allocator.Types import Bindings.APR.ErrNo import Bindings.APR.File.Types import Bindings.APR.MMap import Bindings.APR.Network.IO import Bindings.APR.Pools import Bindings.APR.Want #num APR_BUCKET_BUFF_SIZE #integral_t apr_read_type_e #num APR_BLOCK_READ #num APR_NONBLOCK_READ #opaque_t apr_bucket_alloc_t #num APR_BUCKET_DATA #num APR_BUCKET_METADATA #starttype struct apr_bucket_type_t # field name , Ptr CChar # field num_func , CInt # field is_metadata, CInt # field destroy , FunPtr (Ptr () -> IO ()) # field read , FunPtr (Ptr -> Ptr (Ptr CChar) -> Ptr -> -> IO ) # field setaside , FunPtr (Ptr -> Ptr -> IO ) # field split , FunPtr (Ptr -> -> IO ) # field copy , FunPtr (Ptr -> Ptr (Ptr ) -> IO ) #stoptype #starttype struct apr_bucket # apr_ring_entry_field link, # field type , Ptr # field length, # field start , # field data , Ptr () # field free , FunPtr (Ptr () -> IO ()) # field list , Ptr #stoptype #apr_ring_head_t apr_bucket_list, #starttype struct apr_bucket_brigade # field p , Ptr # field list , # field bucket_alloc, Ptr #stoptype #callback apr_brigade_flush, Ptr -> Ptr () -> IO #cinline APR_BRIGADE_CHECK_CONSISTENCY, Ptr -> IO () #cinline APR_BUCKET_CHECK_CONSISTENCY , Ptr -> IO () #cinline APR_BRIGADE_SENTINEL , Ptr -> IO (Ptr ) #cinline APR_BRIGADE_EMPTY , Ptr -> IO CInt #cinline APR_BRIGADE_FIRST , Ptr -> IO (Ptr ) #cinline APR_BRIGADE_LAST , Ptr -> IO (Ptr ) #cinline APR_BRIGADE_INSERT_HEAD, Ptr -> Ptr -> IO () #cinline APR_BRIGADE_INSERT_TAIL, Ptr -> Ptr -> IO () #cinline APR_BRIGADE_CONCAT , Ptr -> Ptr -> IO () #cinline APR_BRIGADE_PREPEND , Ptr -> Ptr -> IO () #cinline APR_BUCKET_INSERT_BEFORE, Ptr -> Ptr -> IO () #cinline APR_BUCKET_INSERT_AFTER , Ptr -> Ptr -> IO () #cinline APR_BUCKET_NEXT , Ptr -> IO (Ptr ) #cinline APR_BUCKET_PREV , Ptr -> IO (Ptr ) #cinline APR_BUCKET_REMOVE , Ptr -> IO () #cinline APR_BUCKET_INIT , Ptr -> IO () #cinline APR_BUCKET_IS_METADATA , Ptr -> IO CInt #cinline APR_BUCKET_IS_FLUSH , Ptr -> IO CInt #cinline APR_BUCKET_IS_EOS , Ptr -> IO CInt #cinline APR_BUCKET_IS_FILE , Ptr -> IO CInt #cinline APR_BUCKET_IS_PIPE , Ptr -> IO CInt #cinline APR_BUCKET_IS_SOCKET , Ptr -> IO CInt #cinline APR_BUCKET_IS_HEAP , Ptr -> IO CInt #cinline APR_BUCKET_IS_TRANSIENT , Ptr -> IO CInt #cinline APR_BUCKET_IS_IMMORTAL , Ptr -> IO CInt #if APR_HAS_MMAP # cinline APR_BUCKET_IS_MMAP , Ptr -> IO CInt #endif #cinline APR_BUCKET_IS_POOL , Ptr -> IO CInt #starttype struct apr_bucket_refcount # field refcount, CInt #stoptype #starttype struct apr_bucket_heap # field refcount , # field base , Ptr CChar # field alloc_len, # field free_func, FunPtr (Ptr () -> IO ()) #stoptype #starttype struct apr_bucket_pool # field heap, # field base, Ptr CChar # field pool, Ptr # field list, Ptr #stoptype #if APR_HAS_MMAP # starttype struct apr_bucket_mmap # field refcount, # field mmap , # stoptype #endif #starttype struct apr_bucket_file # field refcount, # field fd , Ptr # field readpool, Ptr # if APR_HAS_MMAP # field can_mmap, CInt # endif #stoptype #starttype union apr_bucket_structs # union_field b , # union_field heap, # union_field pool, # if APR_HAS_MMAP # union_field mmap, # endif # union_field file, #stoptype #num APR_BUCKET_ALLOC_SIZE #ccall apr_brigade_create , Ptr -> Ptr -> IO (Ptr ) #ccall apr_brigade_destroy , Ptr -> IO #ccall apr_brigade_cleanup , Ptr () -> IO #ccall apr_brigade_split_ex , Ptr -> Ptr -> Ptr -> IO (Ptr ) #ccall apr_brigade_split , Ptr -> Ptr -> IO (Ptr ) #ccall apr_brigade_partition , Ptr -> -> Ptr (Ptr ) -> IO #ccall apr_brigade_length , Ptr -> CInt -> Ptr -> IO #ccall apr_brigade_flatten , Ptr -> Ptr CChar -> Ptr -> IO #ccall apr_brigade_pflatten , Ptr -> Ptr (Ptr CChar) -> Ptr -> Ptr -> IO #ccall apr_brigade_split_line , Ptr -> Ptr -> -> -> IO #ccall apr_brigade_to_iovec , Ptr -> Ptr -> Ptr CInt -> -- FIXME: apr_brigade_to_vputstrs takes va_list #ccall apr_brigade_write , Ptr -> -> Ptr () -> Ptr CChar -> -> IO #ccall apr_brigade_writev , Ptr -> -> Ptr () -> Ptr -> -> IO #ccall apr_brigade_puts , Ptr -> -> Ptr () -> Ptr CChar -> IO #ccall apr_brigade_putc , Ptr -> -> Ptr () -> CChar -> IO -- FIXME: apr_brigade_putstrs takes varargs -- FIXME: apr_brigade_printf takes varargs -- FIXME: apr_brigade_vprintf takes va_list #ccall apr_brigade_insert_file, Ptr -> Ptr -> -> -> Ptr -> IO (Ptr ) #ccall apr_bucket_alloc_create , Ptr -> Ptr () #ccall apr_bucket_alloc_create_ex, Ptr -> Ptr () #ccall apr_bucket_alloc_destroy , Ptr -> IO () #ccall apr_bucket_alloc , -> Ptr -> IO (Ptr ()) #ccall apr_bucket_free , Ptr () -> IO () #cinline apr_bucket_destroy , Ptr -> IO () #cinline apr_bucket_delete , Ptr -> IO () #cinline apr_bucket_read , Ptr -> Ptr (Ptr CChar) -> Ptr -> -> IO #cinline apr_bucket_setaside, Ptr -> Ptr -> IO #cinline apr_bucket_split , Ptr -> -> IO #cinline apr_bucket_copy , Ptr -> Ptr (Ptr ) -> IO #ccall apr_bucket_setaside_noop , Ptr -> Ptr -> IO #ccall apr_bucket_setaside_notimpl, Ptr -> Ptr -> IO #ccall apr_bucket_split_notimpl , Ptr -> -> IO #ccall apr_bucket_copy_notimpl , Ptr -> Ptr (Ptr ) -> IO #ccall apr_bucket_destroy_noop , Ptr () -> IO () #globalvar apr_bucket_type_flush , #globalvar apr_bucket_type_eos , #globalvar apr_bucket_type_file , #globalvar apr_bucket_type_heap , #if APR_HAS_MMAP # globalvar apr_bucket_type_mmap , #endif #globalvar apr_bucket_type_pool , #globalvar apr_bucket_type_pipe , #globalvar apr_bucket_type_immortal , #globalvar apr_bucket_type_transient, #globalvar apr_bucket_type_socket , #ccall apr_bucket_simple_split, Ptr -> -> IO #ccall apr_bucket_simple_copy , Ptr -> Ptr (Ptr ) -> IO #ccall apr_bucket_shared_make , Ptr -> Ptr () -> -> -> IO (Ptr ) #ccall apr_bucket_shared_destroy, Ptr () -> IO CInt #ccall apr_bucket_shared_split , Ptr -> -> IO #ccall apr_bucket_shared_copy , Ptr -> Ptr (Ptr ) -> IO #ccall apr_bucket_eos_create , Ptr -> IO (Ptr ) #ccall apr_bucket_eos_make , Ptr -> IO (Ptr ) #ccall apr_bucket_flush_create , Ptr -> IO (Ptr ) #ccall apr_bucket_flush_make , Ptr -> IO (Ptr ) #ccall apr_bucket_immortal_create , Ptr CChar -> -> Ptr -> IO (Ptr ) #ccall apr_bucket_immortal_make , Ptr -> Ptr CChar -> -> IO (Ptr ) #ccall apr_bucket_transient_create, Ptr CChar -> -> Ptr -> IO (Ptr ) #ccall apr_bucket_transient_make , Ptr -> Ptr CChar -> -> IO (Ptr ) #ccall apr_bucket_heap_create , Ptr CChar -> -> FunPtr (Ptr () -> IO ()) -> Ptr -> IO (Ptr ) #ccall apr_bucket_heap_make , Ptr -> Ptr CChar -> -> FunPtr (Ptr () -> IO ()) -> IO (Ptr ) #ccall apr_bucket_pool_create , Ptr CChar -> -> Ptr -> Ptr -> IO (Ptr ) #ccall apr_bucket_pool_make , Ptr -> Ptr CChar -> -> Ptr -> IO (Ptr ) #if APR_HAS_MMAP # ccall apr_bucket_mmap_create , Ptr -> -> -> Ptr -> IO (Ptr ) # ccall apr_bucket_mmap_make , Ptr -> Ptr -> -> -> IO (Ptr ) #endif #ccall apr_bucket_socket_create , Ptr -> Ptr -> IO (Ptr ) #ccall apr_bucket_socket_make , Ptr -> Ptr -> IO (Ptr ) #ccall apr_bucket_pipe_create , Ptr -> Ptr -> IO (Ptr ) #ccall apr_bucket_pipe_make , Ptr -> Ptr -> IO (Ptr ) #ccall apr_bucket_file_create , Ptr -> -> -> Ptr -> Ptr -> IO (Ptr ) #ccall apr_bucket_file_make , Ptr -> Ptr -> -> -> Ptr -> IO (Ptr ) #ccall apr_bucket_file_enable_mmap, Ptr -> CInt -> IO