Here's a new patch to the current LDAP code that takes into account the recent
discussion on the subject.
The LDAP code design remains unchanged, it consists of two layers:
- a low level layer that closely matches the C LDAP API. These functions that
used to be named `*-internal' are now named more simply: `ldap-open',
`ldap-close', `ldap-search', `ldap-add', `ldap-modify'. They should be
used
directly for very specific purposes (such as multiple operations on a
connection) only.
- a higher-level layer provides a more convenient way to access LDAP
directories hiding the subtleties of handling the connection, translating
arguments and ensuring compliance with LDAP internationalization rules and
formats (currently partly implemented only). This layer provides atomic
operations for searches, modification, addition and deletion of multiple
entries at once: ldap-search-entries, ldap-add-entries, ldap-delete-entries
and ldap-modify-entries
*** IMPORTANT NOTE ***
Due to the function renaming, this patch introduces an incompatible change that
breaks the packages using the current LDAP API, most notably EUDC and W3.
A new version of EUDC is ready for commit if the patch is accepted, please
notify me.
Oscar
1999-11-27 Oscar Figueiredo <Oscar.Figueiredo(a)di.epfl.ch>
* eldap.h (Fldap_search) Renamed from Fldap_search_internal:
(Fldap_add, Fldap_modify, Fldap_delete): New functions
* eldap.c (Qadd, Qreplace): New constant symbols
(Fldap_open): Use the LDAP_OPT_RESTART option to avoid
interruptions by XEmacs signals
Remove unnecessary calls to slow_down_interrupts and
speed_up_interrupts
(Fldap_search): Renamed from Fldap_search_internal
Added new optional parameter VERBOSE that triggers progress
messages display
Remove unnecessary calls to slow_down_interrupts and
speed_up_interrupts
LDAP result code analysis rewritten
(Fldap_add, Fldap_modify, Fldap_delete): New functions
(syms_of_eldap): Define the new symbols and functions
1999-11-27 Oscar Figueiredo <Oscar.Figueiredo(a)di.epfl.ch>
* ldap.el (toplevel): Test if LDAP support has been compiled in
(ldap-verbose): New option
(ldap-search-entries): Renamed from ldap-search
Conditionalize message display on ldap-verbose
(ldap-add-entries, ldap-modify-entries, ldap-delete-entries): New
defuns