comparison src/eldap.h @ 286:57709be46d1b r21-0b41

Import from CVS: tag r21-0b41
author cvs
date Mon, 13 Aug 2007 10:35:03 +0200
parents c42ec1d1cded
children 7347b34c275b
comparison
equal deleted inserted replaced
285:9a3756523c1b 286:57709be46d1b
19 Boston, MA 02111-1307, USA. */ 19 Boston, MA 02111-1307, USA. */
20 20
21 #ifndef _XEMACS_ELDAP_H_ 21 #ifndef _XEMACS_ELDAP_H_
22 #define _XEMACS_ELDAP_H_ 22 #define _XEMACS_ELDAP_H_
23 23
24 #ifndef HAVE_LDAP 24 #include <lber.h>
25 #undef XLDAP 25 #include <ldap.h>
26 #undef XSETLDAP
27 #define LDAPP(x) 0
28 #undef CHECK_LDAP
29 26
30 #else /* HAVE_LDAP */ 27 /*
28 * The following structure records pertinent information about a
29 * LDAP connection.
30 */
31 31
32 struct Lisp_LDAP; 32 struct Lisp_LDAP
33 {
34 /* lcrecord header */
35 struct lcrecord_header header;
36 /* The LDAP connection handle used by the LDAP API */
37 LDAP *ld;
38 /* Name of the host we connected to */
39 Lisp_Object host;
40 /* Status of the LDAP connection. */
41 int livep;
42 };
43
33 44
34 DECLARE_LRECORD (ldap, struct Lisp_LDAP); 45 DECLARE_LRECORD (ldap, struct Lisp_LDAP);
35 #define XLDAP(x) XRECORD (x, ldap, struct Lisp_LDAP) 46 #define XLDAP(x) XRECORD (x, ldap, struct Lisp_LDAP)
36 #define XSETLDAP(x, p) XSETRECORD (x, p, ldap) 47 #define XSETLDAP(x, p) XSETRECORD (x, p, ldap)
37 #define LDAPP(x) RECORDP (x, ldap) 48 #define LDAPP(x) RECORDP (x, ldap)
45 signal_simple_error ("Attempting to access closed LDAP connection", \ 56 signal_simple_error ("Attempting to access closed LDAP connection", \
46 ldap); \ 57 ldap); \
47 } while (0) 58 } while (0)
48 59
49 60
50
51
52 #ifdef emacs
53
54 Lisp_Object Fldapp (Lisp_Object object); 61 Lisp_Object Fldapp (Lisp_Object object);
55 Lisp_Object Fldap_host (Lisp_Object ldap); 62 Lisp_Object Fldap_host (Lisp_Object ldap);
56 Lisp_Object Fldap_status (Lisp_Object ldap); 63 Lisp_Object Fldap_status (Lisp_Object ldap);
57 Lisp_Object Fldap_open (Lisp_Object host, 64 Lisp_Object Fldap_open (Lisp_Object host,
58 Lisp_Object ldap_plist); 65 Lisp_Object ldap_plist);
62 Lisp_Object base, 69 Lisp_Object base,
63 Lisp_Object scope, 70 Lisp_Object scope,
64 Lisp_Object attrs, 71 Lisp_Object attrs,
65 Lisp_Object attrsonly); 72 Lisp_Object attrsonly);
66 73
67 #endif /* emacs */
68
69
70 #endif
71
72
73 #endif /* _XEMACS_ELDAP_H_ */ 74 #endif /* _XEMACS_ELDAP_H_ */