• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/net/

Lines Matching defs:ldap

0 ;;; ldap.el --- client interface to LDAP for Emacs
34 ;; - UM-LDAP 3.3 (http://www.umich.edu/~dirsvcs/ldap/)
42 (defgroup ldap nil
47 (defcustom ldap-default-host nil
53 :group 'ldap)
55 (defcustom ldap-default-port nil
60 :group 'ldap)
62 (defcustom ldap-default-base nil
69 :group 'ldap)
72 (defcustom ldap-host-parameters-alist nil
150 :group 'ldap)
152 (defcustom ldap-ldapsearch-prog "ldapsearch"
155 :group 'ldap)
157 (defcustom ldap-ldapsearch-args '("-LL" "-tt")
161 :group 'ldap)
163 (defcustom ldap-ignore-attribute-codings nil
166 :group 'ldap)
168 (defcustom ldap-default-attribute-decoder nil
171 :group 'ldap)
173 (defcustom ldap-coding-system 'utf-8
177 :group 'ldap)
179 (defvar ldap-attribute-syntax-encoders
186 ldap-encode-boolean ; 7 Boolean Y
190 ldap-encode-country-string ; 11 Country String Y
191 ldap-encode-string ; 12 DN Y
194 ldap-encode-string ; 15 Directory String Y
220 ldap-encode-address ; 41 Postal Address Y
223 ldap-encode-string ; 44 Printable String Y
244 (defvar ldap-attribute-syntax-decoders
251 ldap-decode-boolean ; 7 Boolean Y
255 ldap-decode-string ; 11 Country String Y
256 ldap-decode-string ; 12 DN Y
259 ldap-decode-string ; 15 Directory String Y
285 ldap-decode-address ; 41 Postal Address Y
288 ldap-decode-string ; 44 Printable String Y
310 (defvar ldap-attribute-syntaxes-alist
390 (defun ldap-encode-boolean (bool)
395 (defun ldap-decode-boolean (str)
404 (defun ldap-encode-country-string (str)
409 (defun ldap-decode-string (str)
410 (decode-coding-string str ldap-coding-system))
412 (defun ldap-encode-string (str)
413 (encode-coding-string str ldap-coding-system))
415 (defun ldap-decode-address (str)
416 (mapconcat 'ldap-decode-string
420 (defun ldap-encode-address (str)
421 (mapconcat 'ldap-encode-string
428 (defun ldap-get-host-parameter (host parameter)
429 "Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'."
430 (plist-get (cdr (assoc host ldap-host-parameters-alist))
433 (defun ldap-decode-attribute (attr)
435 The attribute name is looked up in `ldap-attribute-syntaxes-alist'
437 `ldap-attribute-syntax-decoders' and applied on the value(s)."
441 ldap-attribute-syntaxes-alist)))
444 (setq decoder (aref ldap-attribute-syntax-decoders
446 (setq decoder ldap-default-attribute-decoder))
451 (defun ldap-search (filter &optional host attributes attrsonly withdn)
462 `ldap-host-parameters-alist', which see."
465 (setq host ldap-default-host)
467 (let ((host-plist (cdr (assoc host ldap-host-parameters-alist)))
469 (setq result (ldap-search-internal (list* 'host host
475 (if ldap-ignore-attribute-codings
478 (mapcar 'ldap-decode-attribute record))
482 (defun ldap-search-internal (search-plist)
506 (let ((buf (get-buffer-create " *ldap-search*"))
507 (bufval (get-buffer-create " *ldap-value*"))
509 ldap-default-host))
514 ldap-default-base))
562 (eval `(call-process ldap-ldapsearch-prog
567 ,@ldap-ldapsearch-args
620 (provide 'ldap)
623 ;;; ldap.el ends here