From cc9a1eed057e9491d3999a26b68696f5d5e0b624 Mon Sep 17 00:00:00 2001 From: PHO Date: Sat, 21 Aug 2010 11:17:14 +0900 Subject: [PATCH] Bindings.APR.Poll --- Bindings/APR/Poll.hsc | 61 +++++++++++++++++++++++++++++++++++++++++++ bindings-apr.cabal | 1 + 2 files changed, 62 insertions(+) create mode 100644 Bindings/APR/Poll.hsc diff --git a/Bindings/APR/Poll.hsc b/Bindings/APR/Poll.hsc new file mode 100644 index 0000000..7e9e6bc --- /dev/null +++ b/Bindings/APR/Poll.hsc @@ -0,0 +1,61 @@ +#include +#include + +module Bindings.APR.Poll where +#strict_import +import Bindings.APR +import Bindings.APR.ErrNo +import Bindings.APR.File.Types +import Bindings.APR.Network.IO +import Bindings.APR.Pools +import Bindings.APR.Time + +#num APR_POLLIN +#num APR_POLLPRI +#num APR_POLLOUT +#num APR_POLLERR +#num APR_POLLHUP +#num APR_POLLNVAL + +#num APR_POLLSET_THREADSAFE +#num APR_POLLSET_NOCOPY + +#integral_t apr_datatype_e +#num APR_NO_DESC +#num APR_POLL_SOCKET +#num APR_POLL_FILE +#num APR_POLL_LASTDESC + +#starttype apr_descriptor +# union_field f, Ptr +# union_field s, Ptr +#stoptype + +#starttype struct apr_pollfd_t +# field p , Ptr +# field desc_type , +# field reqevents , +# field rtnevents , +# field desc , +# field client_data, Ptr () +#stoptype + +#opaque_t apr_pollset_t + +#ccall apr_pollset_create , Ptr (Ptr ) -> -> Ptr -> -> IO +#ccall apr_pollset_destroy, Ptr -> IO +#ccall apr_pollset_add , Ptr -> Ptr -> IO +#ccall apr_pollset_remove , Ptr -> Ptr -> IO +#ccall apr_pollset_poll , Ptr -> -> Ptr -> Ptr (Ptr ) -> IO + +#ccall apr_poll, Ptr -> -> Ptr -> -> IO + +#opaque_t apr_pollcb_t + +#ccall apr_pollcb_create, Ptr (Ptr ) -> -> Ptr -> -> IO +#ccall apr_pollcb_add , Ptr -> Ptr -> IO +#ccall apr_pollcb_remove, Ptr -> Ptr -> IO + +#callback apr_pollcb_cb_t, Ptr () -> Ptr -> IO + +#ccall apr_pollcb_poll, Ptr -> -> -> Ptr () -> IO diff --git a/bindings-apr.cabal b/bindings-apr.cabal index a1e2be9..440045f 100644 --- a/bindings-apr.cabal +++ b/bindings-apr.cabal @@ -47,6 +47,7 @@ Library Bindings.APR.Lib Bindings.APR.MMap Bindings.APR.Network.IO + Bindings.APR.Poll Bindings.APR.Pools Bindings.APR.Proc.Mutex Bindings.APR.Tables -- 2.40.0