diff --git a/scheme/types.scm b/scheme/types.scm index f6dac72..79757cb 100644 --- a/scheme/types.scm +++ b/scheme/types.scm @@ -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?