annotate modules/ldap/eldap.h @ 3024:b7f26b2f78bd

[xemacs-hg @ 2005-10-25 08:32:40 by ben] more mc-alloc-related factoring; make it hard to do the wrong thing postgresql/postgresql.c, postgresql/postgresql.h: MC-Alloc refactoring. ldap/eldap.c, ldap/eldap.h: MC-Alloc refactoring. alloc.c, buffer.c, console.c, emacs.c, file-coding.c, lrecord.h, lstream.c, mule-charset.c, print.c, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, symbols.c, symeval.h, unicode.c, window.c, xemacs.def.in.in: rename `struct lcrecord_header' to `struct old_lcrecord_header'; likewise for `old_basic_alloc_lcrecord', `old_free_lcrecord', `old_zero_lcrecord', `old_zero_sized_lcrecord', `old_copy_lcrecord', `old_copy_sized_lcrecord', `old_alloc_lcrecord_type'. Created new LISPOBJ_STORAGE_SIZE() used only on objects created through allocation of Lisp-Object memory instead of basic xmalloc()/xfree(). This is distinguished from malloced_storage_size(), for non-Lisp-Objects. The definition of LISPOBJ_STORAGE_SIZE() can reduce down to malloced_storage_size() when not MC-ALLOC, but with MC-ALLOC it's a different function. The whole point other than cleaning up the use of LISPOBJ_STORAGE_SIZE is to make it harder to accidentally use the old kind (lowercase) of function in new code, since you get a compile error.
author ben
date Tue, 25 Oct 2005 08:32:50 +0000
parents 6fa9919a9a0b
children c56a675b3b05
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 {
3024
b7f26b2f78bd [xemacs-hg @ 2005-10-25 08:32:40 by ben]
ben
parents: 2720
diff changeset
34 struct LCRECORD_HEADER header;
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
35 /* 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
36 LDAP *ld;
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
37 /* Name of the host we connected to */
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
38 Lisp_Object host;
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
39 };
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
40 typedef struct Lisp_LDAP Lisp_LDAP;
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
41
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
42
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
43 DECLARE_LRECORD (ldap, Lisp_LDAP);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
44 #define XLDAP(x) XRECORD (x, ldap, Lisp_LDAP)
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
45 #define wrap_ldap(p) wrap_record (p, ldap)
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
46 #define LDAPP(x) RECORDP (x, ldap)
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
47 #define CHECK_LDAP(x) CHECK_RECORD (x, ldap)
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
48 #define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
49
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
50 #define CHECK_LIVE_LDAP(ldap) do { \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
51 CHECK_LDAP (ldap); \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
52 if (!XLDAP (ldap)->ld) \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
53 invalid_operation ("Attempting to access closed LDAP connection", \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
54 ldap); \
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
55 } while (0)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
56
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
57
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
58 Lisp_Object Fldapp (Lisp_Object object);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
59 Lisp_Object Fldap_host (Lisp_Object ldap);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
60 Lisp_Object Fldap_live_p (Lisp_Object ldap);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
61 Lisp_Object Fldap_open (Lisp_Object host,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
62 Lisp_Object ldap_plist);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
63 Lisp_Object Fldap_close (Lisp_Object ldap);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
64 Lisp_Object Fldap_search_basic (Lisp_Object ldap,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
65 Lisp_Object filter,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
66 Lisp_Object base,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
67 Lisp_Object scope,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
68 Lisp_Object attrs,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
69 Lisp_Object attrsonly,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
70 Lisp_Object withdn,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
71 Lisp_Object verbose);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
72 Lisp_Object Fldap_add (Lisp_Object ldap,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
73 Lisp_Object dn,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
74 Lisp_Object entry);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
75 Lisp_Object Fldap_modify (Lisp_Object ldap,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
76 Lisp_Object dn,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
77 Lisp_Object entry);
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
78 Lisp_Object Fldap_delete (Lisp_Object ldap,
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
79 Lisp_Object dn);
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
80
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 265
diff changeset
81 #endif /* INCLUDED_eldap_h_ */