annotate src/eldap.h @ 298:70ad99077275 r21-0b47

Import from CVS: tag r21-0b47
author cvs
date Mon, 13 Aug 2007 10:39:40 +0200
parents 57709be46d1b
children 7347b34c275b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
1 /* Definitions for the LDAP client interface for XEmacs.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
2 Copyright (C) 1998 Free Software Foundation, Inc.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
3
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
4 This file is part of XEmacs.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
5
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
9 later version.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
10
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
14 for more details.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
15
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
20
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
21 #ifndef _XEMACS_ELDAP_H_
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
22 #define _XEMACS_ELDAP_H_
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
23
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
24 #include <lber.h>
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
25 #include <ldap.h>
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
26
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
27 /*
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
28 * The following structure records pertinent information about a
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
29 * LDAP connection.
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
30 */
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
31
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
32 struct Lisp_LDAP
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
33 {
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
34 /* lcrecord header */
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
35 struct lcrecord_header header;
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
36 /* The LDAP connection handle used by the LDAP API */
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
37 LDAP *ld;
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
38 /* Name of the host we connected to */
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
39 Lisp_Object host;
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
40 /* Status of the LDAP connection. */
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
41 int livep;
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 282
diff changeset
42 };
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
43
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
44
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
45 DECLARE_LRECORD (ldap, struct Lisp_LDAP);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
46 #define XLDAP(x) XRECORD (x, ldap, struct Lisp_LDAP)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
47 #define XSETLDAP(x, p) XSETRECORD (x, p, ldap)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
48 #define LDAPP(x) RECORDP (x, ldap)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
49 #define GC_LDAPP(x) GC_RECORDP (x, ldap)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
50 #define CHECK_LDAP(x) CHECK_RECORD (x, ldap)
280
7df0dd720c89 Import from CVS: tag r21-0b38
cvs
parents: 276
diff changeset
51 #define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
52
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
53 #define CHECK_LIVE_LDAP(ldap) do { \
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
54 CHECK_LDAP (ldap); \
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
55 if (!XLDAP (ldap)->livep) \
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
56 signal_simple_error ("Attempting to access closed LDAP connection", \
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents: 280
diff changeset
57 ldap); \
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
58 } while (0)
280
7df0dd720c89 Import from CVS: tag r21-0b38
cvs
parents: 276
diff changeset
59
7df0dd720c89 Import from CVS: tag r21-0b38
cvs
parents: 276
diff changeset
60
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
61 Lisp_Object Fldapp (Lisp_Object object);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
62 Lisp_Object Fldap_host (Lisp_Object ldap);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
63 Lisp_Object Fldap_status (Lisp_Object ldap);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
64 Lisp_Object Fldap_open (Lisp_Object host,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
65 Lisp_Object ldap_plist);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
66 Lisp_Object Fldap_close (Lisp_Object ldap);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
67 Lisp_Object Fldap_search_internal (Lisp_Object ldap,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
68 Lisp_Object filter,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
69 Lisp_Object base,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
70 Lisp_Object scope,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
71 Lisp_Object attrs,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
72 Lisp_Object attrsonly);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
73
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
74 #endif /* _XEMACS_ELDAP_H_ */