2004-01-08 02:49:17 -05:00
|
|
|
(define-record-type ldap-session :ldap-session
|
2004-02-13 11:58:37 -05:00
|
|
|
(make-ldap-session c-pointer bound? options)
|
2004-01-08 02:49:17 -05:00
|
|
|
ldap-session?
|
|
|
|
(c-pointer ldap-session-c-pointer)
|
|
|
|
(bound? ldap-session-bound? set-ldap-session-bound?!)
|
2004-02-13 11:58:37 -05:00
|
|
|
(options ldap-session-options set-ldap-session-options!))
|
2004-01-08 02:49:17 -05:00
|
|
|
|
|
|
|
(define-exported-binding "ldap-session" :ldap-session)
|
|
|
|
|
|
|
|
(define-record-type session-options :session-options
|
|
|
|
(make-session-options implicit-unbind-ok? auto-unbind?)
|
|
|
|
session-options?
|
|
|
|
(implicit-unbind-ok? session-options-implicit-unbind-ok?)
|
|
|
|
(auto-unbind? session-options-auto-unbind?))
|
|
|
|
|
|
|
|
(define (ldap-session-implicit-unbind-ok? session)
|
|
|
|
(session-options-implicit-unbind-ok? (ldap-session-options session)))
|
|
|
|
|
|
|
|
(define (ldap-session-auto-unbind? session)
|
|
|
|
(session-options-auto-unbind? (ldap-session-options session)))
|
|
|
|
|
2004-02-13 05:05:37 -05:00
|
|
|
(define (ldap-session=? session-a session-b)
|
|
|
|
(equal? (ldap-session-c-pointer session-a)
|
|
|
|
(ldap-session-c-pointer session-b)))
|
2004-02-12 07:44:14 -05:00
|
|
|
|
|
|
|
;;; This is the basic type
|
2004-01-08 02:49:17 -05:00
|
|
|
(define-record-type ldap-message :ldap-message
|
2004-02-13 11:58:37 -05:00
|
|
|
(make-ldap-message c-pointer session)
|
2004-01-08 02:49:17 -05:00
|
|
|
ldap-message?
|
2004-02-13 11:58:37 -05:00
|
|
|
(c-pointer ldap-message-c-pointer)
|
|
|
|
(session ldap-message-session set-ldap-message-session!))
|
2004-01-08 02:49:17 -05:00
|
|
|
|
|
|
|
(define-exported-binding "ldap-message" :ldap-message)
|
|
|
|
|
2004-02-13 05:05:37 -05:00
|
|
|
(define (ldap-message=? session-a session-b)
|
|
|
|
(equal? (ldap-message-c-pointer session-a)
|
|
|
|
(ldap-message-c-pointer session-b)))
|
|
|
|
|
2004-01-08 02:49:17 -05:00
|
|
|
(define-record-type ldap-modification :ldap-modification
|
|
|
|
(make-ldap-modification c-pointer)
|
|
|
|
ldap-modification?
|
|
|
|
(c-pointer ldap-modification-c-pointer))
|
|
|
|
|
|
|
|
(define-exported-binding "ldap-modification" :ldap-modification)
|
|
|
|
|
|
|
|
(define-record-type ldap-api-info :ldap-api-info
|
|
|
|
(make-ldap-api-info c-pointer)
|
|
|
|
ldap-api-info?
|
|
|
|
(c-pointer ldap-api-info-c-pointer))
|
|
|
|
|
|
|
|
(define-exported-binding "ldap-api-info" :ldap-api-info)
|
|
|
|
|
|
|
|
(import-lambda-definition ldap-api-info-info-version
|
|
|
|
(ldap-ai)
|
|
|
|
"scsh_ldapapiinfo_get_info_version")
|
|
|
|
|
|
|
|
(import-lambda-definition ldap-api-info-api-version
|
|
|
|
(ldap-ai)
|
|
|
|
"scsh_ldapapiinfo_get_api_version")
|
|
|
|
|
|
|
|
(import-lambda-definition ldap-api-info-protocol-version
|
|
|
|
(ldap-ai)
|
|
|
|
"scsh_ldapapiinfo_get_protocol_version")
|
|
|
|
|
|
|
|
(import-lambda-definition ldap-api-info-vendor-name
|
|
|
|
(ldap-ai)
|
|
|
|
"scsh_ldapapiinfo_get_vendor_name")
|
|
|
|
|
|
|
|
(import-lambda-definition ldap-api-info-vendor-version
|
|
|
|
(ldap-ai)
|
|
|
|
"scsh_ldapapiinfo_get_vendor_version")
|
|
|
|
|
2004-01-14 04:12:47 -05:00
|
|
|
(define-record-type ber-element :ber-element
|
|
|
|
(make-ber-element c-pointer)
|
|
|
|
ber-element?
|
|
|
|
(c-pointer ber-element-c-pointer))
|
|
|
|
|
|
|
|
(define-exported-binding "ber-element" :ber-element)
|
|
|
|
|
2004-01-08 02:49:17 -05:00
|
|
|
(define (ldap-success? obj)
|
|
|
|
(equal? (ldap-return success) obj))
|
|
|
|
|
|
|
|
(define convert-ldap-return-code
|
|
|
|
(make-finite-type-import-function 'ldap-return ldap-return-elements ldap-return-id))
|
2004-01-14 04:12:47 -05:00
|
|
|
|
|
|
|
(define convert-ldap-message-type
|
|
|
|
(make-finite-type-import-function
|
2004-01-15 11:34:15 -05:00
|
|
|
'ldap-message-types ldap-message-types-elements ldap-message-types-id))
|