got rid of some record types: ldap-entry ldap-result. It makes no
sense to put diffrent types of ldap-messages (they all live in a single type LDAPMessage on the evil C side) in appropriate records since the type of a ldap-message keeps changing in an unpredictable way. Use the API call ldap-message-type instead.
This commit is contained in:
parent
7203d9d9f8
commit
cd2e6cff48
|
@ -1,10 +1,9 @@
|
|||
(define-record-type ldap-session :ldap-session
|
||||
(make-ldap-session c-pointer bound? options messages)
|
||||
(make-ldap-session c-pointer bound? options)
|
||||
ldap-session?
|
||||
(c-pointer ldap-session-c-pointer)
|
||||
(bound? ldap-session-bound? set-ldap-session-bound?!)
|
||||
(options ldap-session-options set-ldap-session-options!)
|
||||
(messages ldap-session-messages set-ldap-session-messages!))
|
||||
(options ldap-session-options set-ldap-session-options!))
|
||||
|
||||
(define-exported-binding "ldap-session" :ldap-session)
|
||||
|
||||
|
@ -20,22 +19,16 @@
|
|||
(define (ldap-session-auto-unbind? session)
|
||||
(session-options-auto-unbind? (ldap-session-options session)))
|
||||
|
||||
(define (ldap-session-messages-adjoin! session message)
|
||||
(set-ldap-session-messages!
|
||||
session (lset-adjoin eq? (ldap-session-messages session) message)))
|
||||
|
||||
(define (ldap-session-messages-member? session message)
|
||||
(memq message (ldap-session-messages session)))
|
||||
|
||||
(define (ldap-session=? session-a session-b)
|
||||
(equal? (ldap-session-c-pointer session-a)
|
||||
(ldap-session-c-pointer session-b)))
|
||||
|
||||
;;; This is the basic type
|
||||
(define-record-type ldap-message :ldap-message
|
||||
(make-ldap-message c-pointer)
|
||||
(make-ldap-message c-pointer session)
|
||||
ldap-message?
|
||||
(c-pointer ldap-message-c-pointer))
|
||||
(c-pointer ldap-message-c-pointer)
|
||||
(session ldap-message-session set-ldap-message-session!))
|
||||
|
||||
(define-exported-binding "ldap-message" :ldap-message)
|
||||
|
||||
|
@ -43,18 +36,6 @@
|
|||
(equal? (ldap-message-c-pointer session-a)
|
||||
(ldap-message-c-pointer session-b)))
|
||||
|
||||
;;; The C api does not distinguish ldap-message, ldap-entry and
|
||||
;;; ldap-attribute as types, they all have the type LDAPMessage. We
|
||||
;;; do.
|
||||
(define-record-type ldap-entry :ldap-entry
|
||||
(make-ldap-entry message)
|
||||
ldap-entry?
|
||||
(message ldap-entry-message))
|
||||
|
||||
(define (ldap-entry=? entry-a entry-b)
|
||||
(ldap-message=? (ldap-entry-message entry-a)
|
||||
(ldap-entry-message entry-b)))
|
||||
|
||||
(define-record-type ldap-modification :ldap-modification
|
||||
(make-ldap-modification c-pointer)
|
||||
ldap-modification?
|
||||
|
|
Loading…
Reference in New Issue