file
domain.h
Classes
- struct LDAPAttribute_s
- LDAPAttribute_t Structure represents LDAP attribute.
Typedefs
- using LDHandle = struct ldhandle
- LDHandle Structure that represents an libdomain session handle.
-
using ld_config_t = struct ld_
config_ s - config_t Structure that holds configuration that will be used during connection.
-
using LDAPAttribute_t = struct LDAPAttribute_
s - LDAPAttribute_t Structure represents LDAP attribute.
- using error_callback_fn = enum OperationReturnCode(*)(int, void*, void*)
Functions
-
auto ld_load_config(TALLOC_CTX* ctx,
const char* filename) -> ld_
config_ t* -
auto ld_create_config(TALLOC_CTX* talloc_ctx,
char* host,
int port,
int protocol_version,
char* base_dn,
char* username,
char* password,
bool simple_bind,
bool use_tls,
bool use_sasl,
bool use_anon,
int timeout,
char* cacertfile,
char* certfile,
char* keyfile) -> ld_
config_ t* - ld_create_config Fills fields of configuration structure.
-
void ld_init(LDHandle** handle,
const ld_
config_ t* config) - ld_init Initializes the library allowing us to performing various operations.
- void ld_install_default_handlers(LDHandle* handle)
- ld_install_default_handlers Installs default handlers to control connection. This method must be called before performing any operations.
- void ld_install_handler(LDHandle* handle, verto_callback* callback, time_t interval)
- ld_install_handler If we need to install custom error callback this method allows us to do so.
-
void ld_install_error_handler(LDHandle* handle,
error_
callback_ fn callback) - ld_install_error_handler Allows us to install custom error handle for our application.
- void ld_exec(LDHandle* handle)
- ld_exec Start main event cycle. You don't need to call this function if there is already existing event loop e.g. inside of Qt application.
- void ld_exec_once(LDHandle* handle)
- ld_exec_once Cycles through event list once. May block.
- void ld_free(LDHandle* handle)
- ld_free Free library handle and resources associated with it. After freeing the handle you can no longer perform any operations.
Typedef documentation
typedef enum OperationReturnCode(*error_callback_fn)(int, void*, void*)
Type defines error callback. This callback will be fired when connection goes to LDAP_CONNECTION_STATE_ERROR state.
Function documentation
ld_ config_ t* ld_create_config(TALLOC_CTX* talloc_ctx,
char* host,
int port,
int protocol_version,
char* base_dn,
char* username,
char* password,
bool simple_bind,
bool use_tls,
bool use_sasl,
bool use_anon,
int timeout,
char* cacertfile,
char* certfile,
char* keyfile)
ld_create_config Fills fields of configuration structure.
Parameters | |
---|---|
talloc_ctx | |
host in | Hostname of LDAP server. |
port in | Port number. |
protocol_version in | LDAP protocol version. |
base_dn in | DN to use during bind. |
username in | Username to use |
password in | User password |
simple_bind in | If we going to perform simple bind instead of interactive bind. |
use_tls in | If we going to use TLS encryption. |
use_sasl in | If we going to enable SASL. |
use_anon in | If we going to enable anonymous logon. |
timeout in | Timeout to read and write operations. |
cacertfile in | |
certfile in | |
keyfile in | |
Returns |
|
void ld_init(LDHandle** handle,
const ld_ config_ t* config)
ld_init Initializes the library allowing us to performing various operations.
Parameters | |
---|---|
handle out | Pointer to libdomain session handle. |
config in | Configuration of the connections. |
void ld_install_default_handlers(LDHandle* handle)
ld_install_default_handlers Installs default handlers to control connection. This method must be called before performing any operations.
Parameters | |
---|---|
handle in | Pointer to libdomain session handle. |
void ld_install_handler(LDHandle* handle, verto_callback* callback, time_t interval)
ld_install_handler If we need to install custom error callback this method allows us to do so.
Parameters | |
---|---|
handle in | Pointer to libdomain session handle. |
callback | |
interval |
void ld_install_error_handler(LDHandle* handle,
error_ callback_ fn callback)
ld_install_error_handler Allows us to install custom error handle for our application.
Parameters | |
---|---|
handle in | Pointer to libdomain session handle. |
callback in | Callback to call. |
void ld_exec_once(LDHandle* handle)
ld_exec_once Cycles through event list once. May block.
Parameters | |
---|---|
handle in | Pointer to libdomain session handle. |