1 /** 2 Exposes include/ldap.h 3 4 Only meant to be used internally. 5 */ 6 module dldap.c.ldap_h; 7 8 import dldap.c.ldap_int; 9 import dldap.c.liblber.lber_int; 10 11 nothrow: 12 extern(C): 13 14 15 // Init 16 ldap* ldap_init (const char* host, int port); 17 int ldap_initialize (ldap** ldp, const char* uri); 18 19 // Bind -- deprecated. TODO: ldap_sasl_bind(_s) 20 int ldap_bind(ldap *ld, const char* dn, const char* passwd, int authmethod); 21 int ldap_simple_bind_s(ldap* ld, const char* who, const char* passwd); 22 23 // Unbind 24 int ldap_unbind_s(ldap* ld); 25 int ldap_unbind(ldap* ld); 26 27 // Search 28 int ldap_search_s( 29 ldap *ld, 30 const char *base, 31 int scope_, 32 const char *filter, 33 char **attrs, 34 int attrsonly, 35 ldapmsg **res); 36 37 char* ldap_err2string(int err); 38 39 // Message 40 int ldap_msgfree(ldapmsg* msg); 41 char *ldap_get_dn(ldap *ld, ldapmsg *entry); 42 ldapmsg* ldap_first_message(ldap* ld, ldapmsg* result); 43 ldapmsg* ldap_next_message(ldap* ld, ldapmsg* message); 44 45 // Attributes 46 char* ldap_first_attribute(ldap* ld, ldapmsg* entry, berelement** berptr); 47 char* ldap_next_attribute(ldap* ld, ldapmsg* entry, berelement* ber); 48 49 // Attribute values 50 char** ldap_get_values(ldap* ld, ldapmsg* entry, char* attr); 51 void ldap_value_free(char** vals); 52 53 // membfree 54 void ldap_memfree(void* p);