File: neturl_ldap.mli

package info (click to toggle)
ocamlnet 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 51,764 kB
  • ctags: 16,446
  • sloc: ml: 148,419; ansic: 10,989; sh: 1,885; makefile: 1,355
file content (40 lines) | stat: -rw-r--r-- 1,526 bytes parent folder | download | duplicates (6)
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
(** LDAP-specific URLs *)

(** This is an extension of {!Neturl} for LDAP. Note that you can simply
    use {!Neturl.parse_url} to parse LDAP URLs. Find useful accessor
    functions below to get LDAP-specific parts.
 *)

val ldap_url_dn         : ?encoded:bool -> Neturl.url -> string
val ldap_url_attributes : ?encoded:bool -> Neturl.url -> string list
val ldap_url_scope      :                  Neturl.url -> [ `Base | `One | `Sub ]
val ldap_url_filter     : ?encoded:bool -> Neturl.url -> string
val ldap_url_extensions : ?encoded:bool -> Neturl.url -> (bool * string * string option) list
  (** Return components of the URL. The functions return decoded strings
      unless [encoded:true] is set.
      If the component does not exist, the exception [Not_found]
      is raised. If the component cannot be parsed, [Malformed_URL] is
      raised.
   *)

val ldap_url_provides : ?dn:bool -> ?attributes:bool -> ?scope:bool ->
                        ?filter:bool -> ?extensions:bool -> Neturl.url -> bool
  (** Whether all the selected URL components are present and the accessor
      can return them (even if empty)
   *)

val make_ldap_url :
      ?encoded:bool ->
      ?host:string ->
      ?addr:Unix.inet_addr ->
      ?port:int ->
      ?socksymbol: Netsockaddr.socksymbol ->
      ?dn:string ->
      ?attributes:string list ->
      ?scope:[ `Base | `One | `Sub ] ->
      ?filter:string ->
      ?extensions:(bool * string * string option) list ->
      unit ->
        Neturl.url
  (** Create an LDAP URL *)