annotate modules/ldap/eldap.h @ 2892:a9005bf6bdbd

[xemacs-hg @ 2005-08-09 21:51:11 by viteno] Update xemacs_extra_name.
author viteno
date Tue, 09 Aug 2005 21:51:11 +0000
parents 6fa9919a9a0b
children b7f26b2f78bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
1 /* Definitions for the LDAP client interface for XEmacs.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
2 Copyright (C) 1998 Free Software Foundation, Inc.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
3
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
4 This file is part of XEmacs.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
5
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
9 later version.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
10
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
14 for more details.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
15
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
20
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
21 #ifndef INCLUDED_eldap_h_
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
22 #define INCLUDED_eldap_h_
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
23
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
24 #include <lber.h>
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
25 #include <ldap.h>
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
26
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
27 /*
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
28 * The following structure records pertinent information about a
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
29 * LDAP connection.
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
30 */
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
31
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
32 struct Lisp_LDAP
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
33 {
2720
6fa9919a9a0b [xemacs-hg @ 2005-04-08 23:10:01 by crestani]
crestani
parents: 996
diff changeset
34 #ifdef MC_ALLOC
6fa9919a9a0b [xemacs-hg @ 2005-04-08 23:10:01 by crestani]
crestani
parents: 996
diff changeset
35 /* lrecord header */
6fa9919a9a0b [xemacs-hg @ 2005-04-08 23:10:01 by crestani]
crestani
parents: 996
diff changeset
36 struct lrecord_header header;
6fa9919a9a0b [xemacs-hg @ 2005-04-08 23:10:01 by crestani]
crestani
parents: 996
diff changeset
37 #else /* not MC_ALLOC */
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
38 /* lcrecord header */
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
39 struct lcrecord_header header;
2720
6fa9919a9a0b [xemacs-hg @ 2005-04-08 23:10:01 by crestani]
crestani
parents: 996
diff changeset
40 #endif /* not MC_ALLOC */
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
41 /* The LDAP connection handle used by the LDAP API */
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
42 LDAP *ld;
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
43 /* Name of the host we connected to */
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
44 Lisp_Object host;
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
45 };
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
46 typedef struct Lisp_LDAP Lisp_LDAP;
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
47
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
48
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
49 DECLARE_LRECORD (ldap, Lisp_LDAP);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
50 #define XLDAP(x) XRECORD (x, ldap, Lisp_LDAP)
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
51 #define wrap_ldap(p) wrap_record (p, ldap)
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
52 #define LDAPP(x) RECORDP (x, ldap)
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
53 #define CHECK_LDAP(x) CHECK_RECORD (x, ldap)
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
54 #define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
55
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
56 #define CHECK_LIVE_LDAP(ldap) do { \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
57 CHECK_LDAP (ldap); \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
58 if (!XLDAP (ldap)->ld) \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
59 invalid_operation ("Attempting to access closed LDAP connection", \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
60 ldap); \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
61 } while (0)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
62
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
63
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
64 Lisp_Object Fldapp (Lisp_Object object);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
65 Lisp_Object Fldap_host (Lisp_Object ldap);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
66 Lisp_Object Fldap_live_p (Lisp_Object ldap);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
67 Lisp_Object Fldap_open (Lisp_Object host,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
68 Lisp_Object ldap_plist);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
69 Lisp_Object Fldap_close (Lisp_Object ldap);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
70 Lisp_Object Fldap_search_basic (Lisp_Object ldap,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
71 Lisp_Object filter,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
72 Lisp_Object base,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
73 Lisp_Object scope,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
74 Lisp_Object attrs,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
75 Lisp_Object attrsonly,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
76 Lisp_Object withdn,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
77 Lisp_Object verbose);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
78 Lisp_Object Fldap_add (Lisp_Object ldap,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
79 Lisp_Object dn,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
80 Lisp_Object entry);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
81 Lisp_Object Fldap_modify (Lisp_Object ldap,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
82 Lisp_Object dn,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
83 Lisp_Object entry);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
84 Lisp_Object Fldap_delete (Lisp_Object ldap,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
85 Lisp_Object dn);
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
86
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
87 #endif /* INCLUDED_eldap_h_ */