packages feed

bindings-apr-0.1: Bindings/APR/Pools.hsc

#include <bindings.dsl.h>
#include <apr_pools.h>

module Bindings.APR.Pools where
#strict_import
import Bindings.APR
import Bindings.APR.Allocator.Types
import Bindings.APR.ErrNo

#opaque_t apr_pool_t

#num APR_POOL_DEBUG

#callback apr_abortfunc_t, CInt -> IO CInt

#ccall apr_pool_initialize, IO <apr_status_t>
#ccall apr_pool_terminate , IO ()

#if APR_POOL_DEBUG

#  cinline apr_pool_create_ex, Ptr (Ptr <apr_pool_t>) -> Ptr <apr_pool_t> -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> IO <apr_status_t>
#  cinline apr_pool_create_core_ex, Ptr (Ptr <apr_pool_t>) -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> IO <apr_status_t>
#  cinline apr_pool_create_unmanaged_ex, Ptr (Ptr <apr_pool_t>) -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> IO <apr_status_t>

#  ccall apr_pool_create_ex_debug, Ptr (Ptr <apr_pool_t>) -> Ptr <apr_pool_t> -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> Ptr CChar -> IO <apr_status_t>
#  ccall apr_pool_create_core_ex_debug, Ptr (Ptr <apr_pool_t>) -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> Ptr CChar -> IO <apr_status_t>
#  ccall apr_pool_create_unmanaged_ex_debug, Ptr (Ptr <apr_pool_t>) -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> Ptr CChar -> IO <apr_status_t>

#else

#  ccall apr_pool_create_ex, Ptr (Ptr <apr_pool_t>) -> Ptr <apr_pool_t> -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> IO <apr_status_t>
#  ccall apr_pool_create_core_ex, Ptr (Ptr <apr_pool_t>) -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> IO <apr_status_t>
#  ccall apr_pool_create_unmanaged_ex, Ptr (Ptr <apr_pool_t>) -> <apr_abortfunc_t> -> Ptr <apr_allocator_t> -> IO <apr_status_t>

#endif

#cinline apr_pool_create, Ptr (Ptr <apr_pool_t>) -> Ptr <apr_pool_t> -> IO <apr_status_t>
#cinline apr_pool_create_core, Ptr (Ptr <apr_pool_t>) -> IO <apr_status_t>
#cinline apr_pool_create_unmanaged, Ptr (Ptr <apr_pool_t>) -> IO <apr_status_t>

#ccall apr_pool_allocator_get, Ptr <apr_pool_t> -> IO (Ptr <apr_allocator_t>)

#if APR_POOL_DEBUG
#  cinline apr_pool_clear, Ptr <apr_pool_t> -> IO ()
#  ccall   apr_pool_clear_debug, Ptr <apr_pool_t> -> Ptr CChar -> IO ()
#else
#  ccall   apr_pool_clear, Ptr <apr_pool_t> -> IO ()
#endif

#if APR_POOL_DEBUG
#  cinline apr_pool_destroy, Ptr <apr_pool_t> -> IO ()
#  ccall   apr_pool_destroy_debug, Ptr <apr_pool_t> -> Ptr CChar -> IO ()
#else
#  ccall   apr_pool_destroy, Ptr <apr_pool_t> -> IO ()
#endif

#if APR_POOL_DEBUG
#  cinline apr_palloc, Ptr <apr_pool_t> -> <apr_size_t> -> IO (Ptr ())
#  ccall   apr_palloc_debug, Ptr <apr_pool_t> -> <apr_size_t> -> Ptr CChar -> IO (Ptr ())
#else
#  ccall   apr_palloc, Ptr <apr_pool_t> -> <apr_size_t> -> IO (Ptr ())
#endif

#cinline apr_pcalloc, Ptr <apr_pool_t> -> <apr_size_t> -> IO (Ptr ())
#if APR_POOL_DEBUG
#  ccall apr_pcalloc_debug, Ptr <apr_pool_t> -> <apr_size_t> -> Ptr CChar -> IO (Ptr ())
#endif

#ccall apr_pool_abort_set  , <apr_abortfunc_t> -> Ptr <apr_pool_t> -> IO ()
#ccall apr_pool_abort_get  , Ptr <apr_pool_t> -> IO <apr_abortfunc_t>
#ccall apr_pool_parent_get , Ptr <apr_pool_t> -> IO (Ptr <apr_pool_t>)
#ccall apr_pool_is_ancestor, Ptr <apr_pool_t> -> Ptr <apr_pool_t> -> IO CInt
#ccall apr_pool_tag        , Ptr <apr_pool_t> -> Ptr CChar -> IO ()

#ccall apr_pool_userdata_set , Ptr () -> Ptr CChar -> FunPtr (Ptr () -> IO <apr_status_t>) -> Ptr <apr_pool_t> -> IO <apr_status_t>
#ccall apr_pool_userdata_setn, Ptr () -> Ptr CChar -> FunPtr (Ptr () -> IO <apr_status_t>) -> Ptr <apr_pool_t> -> IO <apr_status_t>
#ccall apr_pool_userdata_get , Ptr (Ptr ()) -> Ptr CChar -> Ptr <apr_pool_t> -> IO <apr_status_t>

#ccall apr_pool_cleanup_register    , Ptr <apr_pool_t> -> Ptr () -> FunPtr (Ptr () -> IO <apr_status_t>) -> FunPtr (Ptr () -> IO <apr_status_t>) -> IO ()
#ccall apr_pool_pre_cleanup_register, Ptr <apr_pool_t> -> Ptr () -> FunPtr (Ptr () -> IO <apr_status_t>) -> IO ()
#ccall apr_pool_cleanup_kill        , Ptr <apr_pool_t> -> Ptr () -> FunPtr (Ptr () -> IO <apr_status_t>) -> IO ()
#ccall apr_pool_child_cleanup_set   , Ptr <apr_pool_t> -> Ptr () -> FunPtr (Ptr () -> IO <apr_status_t>) -> FunPtr (Ptr () -> IO <apr_status_t>) -> IO ()
#ccall apr_pool_cleanup_run         , Ptr <apr_pool_t> -> Ptr () -> FunPtr (Ptr () -> IO <apr_status_t>) -> IO <apr_status_t>
#ccall apr_pool_cleanup_null        , Ptr () -> IO <apr_status_t>
#ccall apr_pool_cleanup_for_exec    , Ptr () -> IO ()

#if APR_POOL_DEBUG
#  ccall apr_pool_join     , Ptr <apr_pool_t> -> Ptr <apr_pool_t> -> IO ()
#  ccall apr_pool_find     , Ptr () -> IO (Ptr <apr_pool_t>)
#  ccall apr_pool_num_bytes, Ptr <apr_pool_t> -> CInt -> IO <apr_size_t>
#  ccall apr_pool_lock     , Ptr <apr_pool_t> -> CInt -> IO ()
#else
#  cinline apr_pool_join, Ptr <apr_pool_t> -> Ptr <apr_pool_t> -> IO ()
#  cinline apr_pool_lock, Ptr <apr_pool_t> -> CInt -> IO ()
#endif