From: PHO Date: Sun, 12 Sep 2010 02:08:17 +0000 (+0900) Subject: Bindings.APR.LDAP.Init and Option X-Git-Tag: RELEASE-0.1~14 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=af77c96df168360682b58a83f49eee1cbdf6535c;p=bindings-apr-util.git Bindings.APR.LDAP.Init and Option --- diff --git a/Bindings/APR/LDAP.hsc b/Bindings/APR/LDAP.hsc index 8792eed..95f359d 100644 --- a/Bindings/APR/LDAP.hsc +++ b/Bindings/APR/LDAP.hsc @@ -21,6 +21,8 @@ module Bindings.APR.LDAP where # num APR_HAS_LDAP_SSL # num APR_HAS_LDAP_URL_PARSE +# opaque_t LDAP + # num APR_HAS_LDAPSSL_CLIENT_INIT # num APR_HAS_LDAPSSL_CLIENT_DEINIT # num APR_HAS_LDAPSSL_ADD_TRUSTED_CERT @@ -37,7 +39,6 @@ module Bindings.APR.LDAP where # field rc , CInt # stoptype --- FIXME What's the type it takes? --- # cinline APR_LDAP_IS_SERVER_DOWN, -> IO CInt +# cinline APR_LDAP_IS_SERVER_DOWN, CInt -> IO CInt #endif \ No newline at end of file diff --git a/Bindings/APR/LDAP/Init.hsc b/Bindings/APR/LDAP/Init.hsc new file mode 100644 index 0000000..381d297 --- /dev/null +++ b/Bindings/APR/LDAP/Init.hsc @@ -0,0 +1,19 @@ +#include +#include + +module Bindings.APR.LDAP.Init where +#strict_import +import Bindings.APR.LDAP +import Bindings.APR.Pools + +#if APR_HAS_LDAP + +# num APU_LDAP_INSUFFICIENT_ACCESS +# cinline APU_LDAP_SECURITY_ERROR, CInt -> IO CInt + +# ccall apr_ldap_ssl_init , Ptr -> Ptr CChar -> CInt -> Ptr (Ptr ) -> IO CInt +# ccall apr_ldap_ssl_deinit, IO CInt +# ccall apr_ldap_init , Ptr -> Ptr (Ptr ) -> Ptr CChar -> CInt -> CInt -> Ptr (Ptr ) -> IO CInt +# ccall apr_ldap_info , Ptr -> Ptr (Ptr ) -> IO CInt + +#endif diff --git a/Bindings/APR/LDAP/Option.hsc b/Bindings/APR/LDAP/Option.hsc new file mode 100644 index 0000000..e8b2995 --- /dev/null +++ b/Bindings/APR/LDAP/Option.hsc @@ -0,0 +1,47 @@ +#include +#include + +module Bindings.APR.LDAP.Option where +#strict_import +import Bindings.APR.LDAP +import Bindings.APR.Pools + +#if APR_HAS_LDAP + +# num APR_LDAP_OPT_TLS +# num APR_LDAP_OPT_TLS_CERT +# num APR_LDAP_OPT_VERIFY_CERT +# num APR_LDAP_OPT_REFERRALS +# num APR_LDAP_OPT_REFHOPLIMIT + +# num APR_LDAP_CA_TYPE_UNKNOWN +# num APR_LDAP_CA_TYPE_DER +# num APR_LDAP_CA_TYPE_BASE64 +# num APR_LDAP_CA_TYPE_SECMOD +# num APR_LDAP_CERT_TYPE_UNKNOWN +# num APR_LDAP_CERT_TYPE_DER +# num APR_LDAP_CERT_TYPE_BASE64 +# num APR_LDAP_CERT_TYPE_KEY3_DB +# num APR_LDAP_CERT_TYPE_NICKNAME +# num APR_LDAP_KEY_TYPE_UNKNOWN +# num APR_LDAP_KEY_TYPE_DER +# num APR_LDAP_KEY_TYPE_BASE64 +# num APR_LDAP_CERT_TYPE_PFX +# num APR_LDAP_KEY_TYPE_PFX +# num APR_LDAP_CA_TYPE_CACERTDIR_BASE64 + +# starttype struct apr_ldap_opt_tls_cert_t +# field type , CInt +# field path , Ptr CChar +# field password, Ptr CChar +# stoptype + +# num APR_LDAP_NONE +# num APR_LDAP_SSL +# num APR_LDAP_STARTTLS +# num APR_LDAP_STOPTLS + +# ccall apr_ldap_get_option, Ptr -> Ptr -> CInt -> Ptr () -> Ptr (Ptr ) -> IO CInt +# ccall apr_ldap_set_option, Ptr -> Ptr -> CInt -> Ptr () -> Ptr (Ptr ) -> IO CInt + +#endif \ No newline at end of file diff --git a/bindings-apr-util.cabal b/bindings-apr-util.cabal index 2fa2cb6..f78eb54 100644 --- a/bindings-apr-util.cabal +++ b/bindings-apr-util.cabal @@ -38,11 +38,15 @@ Library Bindings.APR.DBM Bindings.APR.Hooks Bindings.APR.LDAP + Bindings.APR.LDAP.Init + Bindings.APR.LDAP.Option C-Sources: cbits/helper_apr_anylock.c cbits/helper_apr_buckets.c cbits/helper_apr_dbm.c + cbits/helper_apr_ldap.c + cbits/helper_apr_ldap_init.c Extensions: ForeignFunctionInterface diff --git a/cbits/helper_apr_ldap.c b/cbits/helper_apr_ldap.c new file mode 100644 index 0000000..17ec871 --- /dev/null +++ b/cbits/helper_apr_ldap.c @@ -0,0 +1,4 @@ +#include +#include + +BC_INLINE1(APR_LDAP_IS_SERVER_DOWN, int, int) diff --git a/cbits/helper_apr_ldap_init.c b/cbits/helper_apr_ldap_init.c new file mode 100644 index 0000000..df05edd --- /dev/null +++ b/cbits/helper_apr_ldap_init.c @@ -0,0 +1,4 @@ +#include +#include + +BC_INLINE1(APU_LDAP_SECURITY_ERROR, int, int)