Module Ldap_ooclient


module Ldap_ooclient: sig .. end
an object oriented ldap client interface


Basic Data Types


type op = string * string list 
the type of an operation, eg. ("cn", ["foo";"bar"])
type op_lst = op list 
type referral_policy = [ `FOLLOW | `RETURN ] 
The policy the client should take when it encounteres a referral. This is currently not used
type changetype = [ `ADD | `DELETE | `MODDN | `MODIFY | `MODRDN ] 
The change type of an ldapentry. This controls some aspects of it's behavior

Local Representation of LDAP Objects


class type ldapentry_t = object .. end
The base type of an ldap entry represented in memory.
class ldapentry : object .. end
this object represents a remote object within local memory.

Miscallaneous


val format_entry : < attributes : string list; dn : string; get_value : string -> string list;
.. > ->
unit
toplevel formatter for ldapentry, prints the whole entry with a nice structure. Each attribute is in the correct syntax to be copied and pasted into a modify operation.
val format_entries : < attributes : string list; dn : string; get_value : string -> string list;
.. >
list -> unit
format lists of entries, in this case only print the dn
type changerec = [ `Addition of ldapentry
| `Delete of string
| `Modification of
string * (Ldap_types.modify_optype * string * string list) list
| `Modrdn of string * int * string ]
The type of an ldap change record, used by extended LDIF

Communication With Ldap_funclient
val to_entry : [< `Entry of Ldap_types.search_result_entry | `Referral of string list ] ->
ldapentry
given a search_result_entry as returned by ldap_funclient, produce an ldapentry containing either the entry, or the referral object
val of_entry : ldapentry -> Ldap_types.search_result_entry
given an ldapentry as returned by ldapcon, or constructed manually, produce a search_result_entry suitable for ldap_funclient, or ldap_funserver.

Interacting with LDAP Servers


class ldapcon : ?connect_timeout:int -> ?referral_policy:[> `RETURN ] -> ?version:int -> string list -> object .. end
This class abstracts a connection to an LDAP server (or servers), an instance will be connected to the server you specify and can be used to perform operations on that server.

Iterators Over Streams of ldapentry Objects


val iter : (ldapentry -> unit) ->
(?abandon:bool -> unit -> ldapentry) -> unit
given a source of ldapentry objects (unit -> ldapentry), such as the return value of ldapcon#search_a, apply f (first arg) to each entry See List.iter
val rev_map : (ldapentry -> 'a) ->
(?abandon:bool -> unit -> ldapentry) -> 'a list
given a source of ldapentry objects (unit -> ldapentry), such as the return value of ldapcon#search_a apply f (first arg) to each entry in reverse, and return a list containing the result of each application. See List.map
val map : (ldapentry -> 'a) ->
(?abandon:bool -> unit -> ldapentry) -> 'a list
same as rev_map, but does it in order
val fold : (ldapentry -> 'a -> 'a) ->
'a -> (?abandon:bool -> unit -> ldapentry) -> 'a
given a source of ldapentry objects (unit -> ldapentry), such as the return value of ldapcon#search_a compute (f eN ... (f e2 (f e1 intial))) see List.fold_right.