Weak-list stuff for ldap-session objects should be part of the

ldap-types-internal-interface.
This commit is contained in:
eknauel 2004-05-21 11:59:08 +00:00
parent 379e176e6a
commit f98b58dbb6
3 changed files with 23 additions and 2 deletions

View File

@ -131,7 +131,7 @@
ldap-return-id
ldap-message-types-id
ldap-operation-id)))
(define-interface ldap-types-interface
(compound-interface
ldap-handle-types-interface
@ -144,7 +144,12 @@
ldap-generated-types-internal-interface
(export
convert-ldap-return-code
convert-ldap-message-type)))
convert-ldap-message-type
ldap-session-weak-list
ldap-session-weak-list-filter!
set-ldap-session-weak-list!
ldap-session-weak-list-add!)))
(define-interface ldap-conditions-interface
(export

View File

@ -14,6 +14,7 @@
(open scheme-with-scsh
external-calls
define-record-types
weak srfi-1
finite-types
ffi-tools-rts
ldap-generated-types-internal)

View File

@ -18,6 +18,11 @@
(options ldap-session-options set-ldap-session-options!)
(weak-list ldap-session-weak-list set-ldap-session-weak-list!))
(define-record-discloser :ldap-session
(lambda (r)
`(ldap-session (struct ,(ldap-session-c-pointer r))
(bound? ,(ldap-session-bound? r)))))
(define (ldap-session-weak-list-add! session thing)
(set-ldap-session-weak-list!
session (cons-weak thing (ldap-session-weak-list session))))
@ -58,6 +63,10 @@
(define-exported-binding "ldap-message" :ldap-message)
(define-record-discloser :ldap-message
(lambda (r)
`(ldap-message (struct ,(ldap-message-c-pointer r)))))
(define (ldap-message=? session-a session-b)
(equal? (ldap-message-c-pointer session-a)
(ldap-message-c-pointer session-b)))
@ -71,6 +80,12 @@
(define-exported-binding "ldap-modification" :ldap-modification)
(define-record-discloser :ldap-modification
(lambda (r)
`(ldap-modification (operator ,(ldap-modification-operator r))
(type ,(ldap-modification-type r))
(values ,(ldap-modification-value-list r)))))
(define (make-ldap-modification operator type value-list)
(really-make-ldap-modification
(ldap-operation-id operator) type value-list))