Here's the third version of the patch introducing the new add/modify/delete
functions to the LDAP API. This patch obsoletes the previous ones.
Unlike the previous one, this one maintains compatibility with the former
ldap-search function API released in 21.1 which should satisfy Kyle.
For reference here's a summary of the changes introduced by this patch:
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-basic', `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
Ta maintain compatibility `ldap-search' is now a wrapper that calls either
`ldap-search-basic' or `ldap-search-entries'. It's declared as obsolete since
a direct call to one of these two functions is more efficient and should
therefore be preferred.
Please notify me if the patch is accepted so I can update the documentation
too.
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_basic): Renamed from Fldap_search_internal
Added new optional parameter VERBOSE that triggers the
display of progress messages
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 the previous ldap-search
Conditionalize message display on ldap-verbose
(ldap-add-entries, ldap-modify-entries, ldap-delete-entries): New
defuns
(ldap-search): Is now defined as an obsolete wrapper calling
ldap-search-basic or ldap-search-entries