File: eldap.h

package info (click to toggle)
xemacs21 21.4.22-14~deb8u1
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 35,500 kB
  • ctags: 34,577
  • sloc: ansic: 243,941; lisp: 94,068; sh: 7,491; cpp: 5,726; perl: 1,095; cs: 775; makefile: 759; python: 279; asm: 248; lex: 119; yacc: 95; sed: 22; csh: 9
file content (83 lines) | stat: -rw-r--r-- 2,810 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* Definitions for the LDAP client interface for XEmacs.
   Copyright (C) 1998 Free Software Foundation, Inc.

This file is part of XEmacs.

XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.

XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */

#ifndef INCLUDED_eldap_h_
#define INCLUDED_eldap_h_

#include <lber.h>
#define LDAP_DEPRECATED 1
#include <ldap.h>

/*
 * The following structure records pertinent information about a
 * LDAP connection.
 */

struct Lisp_LDAP
{
  /* lcrecord header */
  struct lcrecord_header header;
  /* The LDAP connection handle used by the LDAP API */
  LDAP *ld;
  /* Name of the host we connected to */
  Lisp_Object host;
};
typedef struct Lisp_LDAP Lisp_LDAP;


DECLARE_LRECORD (ldap, Lisp_LDAP);
#define XLDAP(x) XRECORD (x, ldap, Lisp_LDAP)
#define XSETLDAP(x, p) XSETRECORD (x, p, ldap)
#define LDAPP(x) RECORDP (x, ldap)
#define CHECK_LDAP(x) CHECK_RECORD (x, ldap)
#define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap)

#define CHECK_LIVE_LDAP(ldap) do {					\
  CHECK_LDAP (ldap);							\
  if (!XLDAP (ldap)->ld)						\
    signal_simple_error ("Attempting to access closed LDAP connection",	\
                         ldap);						\
} while (0)


Lisp_Object Fldapp (Lisp_Object object);
Lisp_Object Fldap_host (Lisp_Object ldap);
Lisp_Object Fldap_status (Lisp_Object ldap);
Lisp_Object Fldap_open (Lisp_Object host,
                        Lisp_Object ldap_plist);
Lisp_Object Fldap_close (Lisp_Object ldap);
Lisp_Object Fldap_search_basic (Lisp_Object ldap,
                                Lisp_Object filter,
                                Lisp_Object base,
                                Lisp_Object scope,
                                Lisp_Object attrs,
                                Lisp_Object attrsonly,
                                Lisp_Object withdn,
                                Lisp_Object verbose);
Lisp_Object Fldap_add (Lisp_Object ldap,
                       Lisp_Object dn,
                       Lisp_Object entry);
Lisp_Object Fldap_modify (Lisp_Object ldap,
                          Lisp_Object dn,
                          Lisp_Object entry);
Lisp_Object Fldap_delete (Lisp_Object ldap,
                          Lisp_Object dn);

#endif /* INCLUDED_eldap_h_ */