1 /* Definitions for the LDAP client interface for XEmacs.
2 Copyright (C) 1998 Free Software Foundation, Inc.
4 This file is part of SXEmacs
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef INCLUDED_eldap_h_
21 #define INCLUDED_eldap_h_
27 * The following structure records pertinent information about a
33 struct lcrecord_header header;
34 /* The LDAP connection handle used by the LDAP API */
36 /* Name of the host we connected to */
39 typedef struct Lisp_LDAP Lisp_LDAP;
41 DECLARE_LRECORD(ldap, Lisp_LDAP);
42 #define XLDAP(x) XRECORD (x, ldap, Lisp_LDAP)
43 #define XSETLDAP(x, p) XSETRECORD (x, p, ldap)
44 #define LDAPP(x) RECORDP (x, ldap)
45 #define CHECK_LDAP(x) CHECK_RECORD (x, ldap)
46 #define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap)
48 #define CHECK_LIVE_LDAP(ldap) do { \
50 if (!XLDAP (ldap)->ld) \
51 signal_simple_error ("Attempting to access closed LDAP connection", \
55 Lisp_Object Fldapp(Lisp_Object object);
56 Lisp_Object Fldap_host(Lisp_Object ldap);
57 Lisp_Object Fldap_status(Lisp_Object ldap);
58 Lisp_Object Fldap_open(Lisp_Object host, Lisp_Object ldap_plist);
59 Lisp_Object Fldap_close(Lisp_Object ldap);
60 Lisp_Object Fldap_search_basic(Lisp_Object ldap,
65 Lisp_Object attrsonly,
66 Lisp_Object withdn, Lisp_Object verbose);
67 Lisp_Object Fldap_add(Lisp_Object ldap, Lisp_Object dn, Lisp_Object entry);
68 Lisp_Object Fldap_modify(Lisp_Object ldap, Lisp_Object dn, Lisp_Object entry);
69 Lisp_Object Fldap_delete(Lisp_Object ldap, Lisp_Object dn);
71 #endif /* INCLUDED_eldap_h_ */