Ldap

## Typedefs

typedef struct _LinphoneLdap | LinphoneLdap
| Object that represents a Linphone Ldap.
typedef struct _LinphoneLdapParams | LinphoneLdapParams
| Object that is used to set the different parameters of a LinphoneLdap.
typedef enum _LinphoneLdapDebugLevel | LinphoneLdapDebugLevel
| Enum Debug verbosity for OpenLdap.
typedef enum _LinphoneLdapAuthMethod | LinphoneLdapAuthMethod
| Enum describing how the authentification will be made.
typedef enum _LinphoneLdapCertVerificationMode | LinphoneLdapCertVerificationMode
| Enum describing server certificates verification modes.
typedef enum _LinphoneLdapCheck | LinphoneLdapCheck
| Enum describing errors in LDAP parameters.

## Enumerations

enum | _LinphoneLdapDebugLevel { LinphoneLdapDebugLevelOff = 0 , LinphoneLdapDebugLevelVerbose = 1 }
| Enum Debug verbosity for OpenLdap. More...
enum | _LinphoneLdapAuthMethod { LinphoneLdapAuthMethodAnonymous = 0 , LinphoneLdapAuthMethodSimple = 1 }
| Enum describing how the authentification will be made. More...
enum | _LinphoneLdapCertVerificationMode { LinphoneLdapCertVerificationDefault = -1 , LinphoneLdapCertVerificationDisabled = 0 , LinphoneLdapCertVerificationEnabled = 1 }
| Enum describing server certificates verification modes. More...
enum | _LinphoneLdapCheck { LinphoneLdapCheckOk = 0 , LinphoneLdapCheckServerEmpty = 1 , LinphoneLdapCheckServerNotUrl = 2 , LinphoneLdapCheckServerNoScheme = 4 , LinphoneLdapCheckServerNotLdap = 8 , LinphoneLdapCheckServerLdaps , LinphoneLdapCheckBaseObjectEmpty = 32 , LinphoneLdapCheckMissingFields = 64 }
| Enum describing errors in LDAP parameters. More...

## Functions

LinphoneLdapParams * | linphone_core_create_ldap_params (LinphoneCore *core)
| Create a LDAP params using default values from Linphone core.
LinphoneLdap * | linphone_core_create_ldap (LinphoneCore *core)
| Create an empty LDAP search.
LinphoneLdap * | linphone_core_create_ldap_with_params (LinphoneCore *core, LinphoneLdapParams *params)
| Create a LDAP search using given parameters and store them in the configuration file.
void | linphone_core_clear_ldaps (LinphoneCore *core)
| Erase all LDAP from the configuration.
void | linphone_core_add_ldap (LinphoneCore *core, LinphoneLdap *ldap)
| Add or update a LDAP server and save it to the configuration.
void | linphone_core_remove_ldap (LinphoneCore *core, LinphoneLdap *ldap)
| Remove a LDAP from the configuration.
bctbx_list_t * | linphone_core_get_ldap_list (LinphoneCore *core)
| Returns a list of entered LDAPs.
bool_t | linphone_core_get_chat_messages_aggregation_enabled (LinphoneCore *core)
| Returns whether chat messages grouping is enabled or not.
void | linphone_core_set_chat_messages_aggregation_enabled (LinphoneCore *core, bool_t enabled)
| Sets whether chat messages grouping is enabled or not.
LinphoneStatus | linphone_core_config_sync (LinphoneCore *core)
| Writes the config file to disk.
const LinphonePushNotificationConfig * | linphone_core_get_push_notification_config (const LinphoneCore *core)
| Gets the push notification configuration object if it exists.
const bctbx_list_t * | linphone_core_get_loaded_plugins (LinphoneCore *core)
| Return the list of loaded plugins.
bool_t | linphone_core_is_plugin_loaded (const LinphoneCore *core, const char *name)
| Tells whether a plugin is loaded or not.
MS2_DEPRECATED int | linphone_core_get_conference_size (LinphoneCore *core)
| Get the number of participants including me, if it in, in the running conference.
MS2_DEPRECATED LinphoneConference * | linphone_core_get_conference (LinphoneCore *core)
| Get a pointer on the internal conference object.
LinphoneLdap * | linphone_ldap_new (LinphoneCore *lc)
| Create a new LinphoneLdap.
LinphoneLdap * | linphone_ldap_new_with_params (LinphoneCore *lc, LinphoneLdapParams *params)
| Create a new LinphoneLdap, associate it with the LinphoneLdapParams and store it into the configuration file.
LinphoneLdap * | linphone_ldap_ref (LinphoneLdap *ldap)
| Take a reference on a LinphoneLdap.
void | linphone_ldap_unref (LinphoneLdap *ldap)
| Release a LinphoneLdap.
void | linphone_ldap_set_params (LinphoneLdap *ldap, LinphoneLdapParams *params)
| Set the LinphoneLdapParams used by this LinphoneLdap.
const LinphoneLdapParams * | linphone_ldap_get_params (LinphoneLdap *ldap)
| Get the LinphoneLdapParams as read-only object.
LinphoneCore * | linphone_ldap_get_core (LinphoneLdap *ldap)
| Get the LinphoneCore object to which is associated the LinphoneLdap.
void | linphone_ldap_set_index (LinphoneLdap *ldap, int index)
| Set the index associated to the LinphoneLdap.
int | linphone_ldap_get_index (const LinphoneLdap *ldap)
| Get the index of the LinphoneLdap.
LinphoneLdapParams * | linphone_ldap_params_new (LinphoneCore *lc)
| Create a new LinphoneLdapParams object.
LinphoneLdapParams * | linphone_ldap_params_clone (const LinphoneLdapParams *params)
| Instantiate a new LinphoneLdapParams with values from source.
LinphoneLdapParams * | linphone_ldap_params_ref (LinphoneLdapParams *params)
| Take a reference on a LinphoneLdapParams.
void | linphone_ldap_params_unref (LinphoneLdapParams *params)
| Release a LinphoneLdapParams.
void | linphone_ldap_params_set_custom_value (LinphoneLdapParams *params, const char *key, const char *value)
| Set custom field.
const char * | linphone_ldap_params_get_custom_value (const LinphoneLdapParams *params, const char *key)
| Get the value from field.
void | linphone_ldap_params_set_server (LinphoneLdapParams *params, const char *server)
| LDAP Server.
const char * | linphone_ldap_params_get_server (const LinphoneLdapParams *params)
| Get the LDAP Server.
void | linphone_ldap_params_set_bind_dn (LinphoneLdapParams *params, const char *bind_dn)
| Bind DN to use for bindings.
const char * | linphone_ldap_params_get_bind_dn (const LinphoneLdapParams *params)
| Get the Bind DN to use for bindings.
void | linphone_ldap_params_set_base_object (LinphoneLdapParams *params, const char *base_object)
| BaseObject is a specification for LDAP Search Scopes that specifies that the Search Request should only be performed against the entry specified as the search base DN.
const char * | linphone_ldap_params_get_base_object (const LinphoneLdapParams *params)
| Get the BaseObject.
void | linphone_ldap_params_set_timeout (LinphoneLdapParams *params, int timeout)
| Timeout for requests in seconds.
int | linphone_ldap_params_get_timeout (const LinphoneLdapParams *params)
| Get the timeout for requests in seconds.
void | linphone_ldap_params_set_timeout_tls_ms (LinphoneLdapParams *params, int timeout)
| Timeout for TLS connection in milliseconds.
int | linphone_ldap_params_get_timeout_tls_ms (const LinphoneLdapParams *params)
| Get the timeout for TLS connection in milliseconds.
void | linphone_ldap_params_set_max_results (LinphoneLdapParams *params, int max_results)
| The max results when requesting searches.
int | linphone_ldap_params_get_max_results (const LinphoneLdapParams *params)
| Get the max results when requesting searches.
void | linphone_ldap_params_set_min_chars (LinphoneLdapParams *params, int min_chars)
| The minimum characters needed for doing a search on LDAP servers.
int | linphone_ldap_params_get_min_chars (const LinphoneLdapParams *params)
| Get the minimum characters needed for doing a search on LDAP servers.
void | linphone_ldap_params_set_delay (LinphoneLdapParams *params, int delay)
| Delay between each search in milliseconds Default value : 500.
int | linphone_ldap_params_get_delay (const LinphoneLdapParams *params)
| Get the delay between each search in milliseconds.
void | linphone_ldap_params_set_auth_method (LinphoneLdapParams *params, LinphoneLdapAuthMethod auth_method)
| Authentification method.
LinphoneLdapAuthMethod | linphone_ldap_params_get_auth_method (const LinphoneLdapParams *params)
| Get the authentification method.
void | linphone_ldap_params_set_password (LinphoneLdapParams *params, const char *password)
| The password to pass to server when binding.
const char * | linphone_ldap_params_get_password (const LinphoneLdapParams *params)
| Get the password to pass to server when binding.
void | linphone_ldap_params_set_filter (LinphoneLdapParams *params, const char *filter)
| The search is based on this filter to search contacts.
const char * | linphone_ldap_params_get_filter (const LinphoneLdapParams *params)
| Get the search is based on this filter to search contacts.
void | linphone_ldap_params_set_name_attribute (LinphoneLdapParams *params, const char *name_attribute)
| Check these attributes to build Name Friend, separated by a comma and the first is the highest priority.
const char * | linphone_ldap_params_get_name_attribute (const LinphoneLdapParams *params)
| Get the attributes to build Name Friend, separated by a comma and the first is the highest priority.
void | linphone_ldap_params_set_sip_attribute (LinphoneLdapParams *params, const char *sip_attribute)
| Check these attributes to build the SIP username in address of Friend.
const char * | linphone_ldap_params_get_sip_attribute (const LinphoneLdapParams *params)
| Get the attributes to build the SIP username in address of Friend.
void | linphone_ldap_params_set_sip_domain (LinphoneLdapParams *params, const char *sip_domain)
| Add the domain to the sip address(sip:username@domain).
const char * | linphone_ldap_params_get_sip_domain (const LinphoneLdapParams *param)
| Get the domain to the sip address(sip:username@domain).
void | linphone_ldap_params_set_enabled (LinphoneLdapParams *params, bool_t enable)
| If this config is enabled.
bool_t | linphone_ldap_params_get_enabled (const LinphoneLdapParams *params)
| Return if the configuration is enabled.
void | linphone_ldap_params_enable_sal (LinphoneLdapParams *params, bool_t enable)
| The dns resolution is done by Linphone using Sal.
bool_t | linphone_ldap_params_sal_enabled (const LinphoneLdapParams *params)
| Return if the dns resolution is done by Linphone using Sal.
void | linphone_ldap_params_enable_tls (LinphoneLdapParams *params, bool_t enable)
| Encrypt transactions by LDAP over TLS(StartTLS).
bool_t | linphone_ldap_params_tls_enabled (const LinphoneLdapParams *params)
| Return if transactions are encrypted by LDAP over TLS(StartTLS).
void | linphone_ldap_params_set_debug_level (LinphoneLdapParams *params, LinphoneLdapDebugLevel level)
| The debug verbosity level from internal LDAP API.
LinphoneLdapDebugLevel | linphone_ldap_params_get_debug_level (const LinphoneLdapParams *params)
| Return the debug verbosity level.
void | linphone_ldap_params_set_server_certificates_verification_mode (LinphoneLdapParams *params, LinphoneLdapCertVerificationMode verify_server_certificates)
| Specify whether the tls server certificate must be verified when connecting to a LDAP server.
LinphoneLdapCertVerificationMode | linphone_ldap_params_get_server_certificates_verification_mode (const LinphoneLdapParams *params)
| Return whether the tls server certificate must be verified when connecting to a LDAP server.
int | linphone_ldap_params_check (const LinphoneLdapParams *params)
| Check parameters and return what are wrong.

## Detailed Description

## Typedef Documentation

## LinphoneLdap

typedef struct _LinphoneLdap LinphoneLdap

Object that represents a Linphone Ldap.

Use a LinphoneLdapParams object to configure it.

## Enumeration Type Documentation

## _LinphoneLdapAuthMethod

enum _LinphoneLdapAuthMethod

Enum describing how the authentification will be made.

Enumerator
LinphoneLdapAuthMethodAnonymous | Connection without passwords.
LinphoneLdapAuthMethodSimple | Connection with username/password.

## _LinphoneLdapCertVerificationMode

enum _LinphoneLdapCertVerificationMode

Enum describing server certificates verification modes.

Enumerator
LinphoneLdapCertVerificationDefault | Use default value defined on core.
LinphoneLdapCertVerificationDisabled | Verification is disabled.
LinphoneLdapCertVerificationEnabled | Verification is enabled.

## _LinphoneLdapCheck

enum _LinphoneLdapCheck

Enum describing errors in LDAP parameters.

Enumerator
LinphoneLdapCheckOk | No error.
LinphoneLdapCheckServerEmpty | Server field is empty.
LinphoneLdapCheckServerNotUrl | The server is not an url.
LinphoneLdapCheckServerNoScheme | The server doesn't contain a scheme.
LinphoneLdapCheckServerNotLdap | The server is not a LDAP scheme.
LinphoneLdapCheckServerLdaps | LDAP over SSL is non-standardized and deprecated: ldaps has been specified.
LinphoneLdapCheckBaseObjectEmpty | Base Object has been specified.
LinphoneLdapCheckMissingFields | Some required fields are missing.

## _LinphoneLdapDebugLevel

enum _LinphoneLdapDebugLevel

Enum Debug verbosity for OpenLdap.

Enumerator
LinphoneLdapDebugLevelOff | Set OpenLdap verbosity to none.
LinphoneLdapDebugLevelVerbose | Set OpenLdap verbosity to debug level.

## Function Documentation

## linphone_core_add_ldap()

void linphone_core_add_ldap | ( | LinphoneCore * | core,
|  | LinphoneLdap * | ldap )

Add or update a LDAP server and save it to the configuration.

Parameters

  core | LinphoneCore object
  ldap | The LDAP to add/update.

## linphone_core_clear_ldaps()

void linphone_core_clear_ldaps | ( | LinphoneCore * | core | ) |

Erase all LDAP from the configuration.

Parameters

  core | LinphoneCore object

## linphone_core_config_sync()

LinphoneStatus linphone_core_config_sync | ( | LinphoneCore * | core | ) |

Writes the config file to disk.

Parameters

  core | The LinphoneCore object

Returns
  0 if successful, -1 otherwise

## linphone_core_create_ldap()

LinphoneLdap * linphone_core_create_ldap | ( | LinphoneCore * | core | ) |

Create an empty LDAP search.

linphone_ldap_set_params() must be call to save the parameters in the configuration file.

Parameters

  core | LinphoneCore object
  params | LinphoneLdapParams object

Returns
  LinphoneLdap with default values set

## linphone_core_create_ldap_params()

LinphoneLdapParams * linphone_core_create_ldap_params | ( | LinphoneCore * | core | ) |

Create a LDAP params using default values from Linphone core.

Check #linphone_ldap_params to update values. In order to add a new LDAP configuration to Magic search, these parameters must be passed to linphone_core_create_ldap_with_params. Or, use linphone_ldap_set_params().

The newly created LDAP from linphone_core_create_ldap().

Parameters

  core | LinphoneCore object

Returns
  LinphoneLdapParams with default values set.

## linphone_core_create_ldap_with_params()

LinphoneLdap * linphone_core_create_ldap_with_params | ( | LinphoneCore * | core,
|  | LinphoneLdapParams * | params )

Create a LDAP search using given parameters and store them in the configuration file.

Parameters

  core | LinphoneCore object
  params | LinphoneLdapParams object

Returns
  LinphoneLdap with default values set

## linphone_core_get_chat_messages_aggregation_enabled()

bool_t linphone_core_get_chat_messages_aggregation_enabled | ( | LinphoneCore * | core | ) |

Returns whether chat messages grouping is enabled or not.

Parameters

  core | The LinphoneCore object

Returns
  TRUE if received chat messages will be notified as a bundle, FALSE otherwise.

## linphone_core_get_conference()

MS2_DEPRECATED LinphoneConference * linphone_core_get_conference | ( | LinphoneCore * | core | ) |

Get a pointer on the internal conference object.

Parameters

  core | LinphoneCore

Returns
  A pointer on LinphoneConference or NULL if no conference are going on.

Deprecated
  10/08/2023 Use linphone_core_search_conference() instead.

## linphone_core_get_conference_size()

MS2_DEPRECATED int linphone_core_get_conference_size | ( | LinphoneCore * | core | ) |

Get the number of participants including me, if it in, in the running conference.

The local participant is included in the count only if it is in the conference.

Parameters

  core | LinphoneCore

Returns
  The number of participants including me, if it in.

Deprecated
  16/04/2021 Use linphone_conference_get_participant_count() instead.

## linphone_core_get_ldap_list()

bctbx_list_t * linphone_core_get_ldap_list | ( | LinphoneCore * | core | ) |

Returns a list of entered LDAPs.

Items must be freed with linphone_ldap_unref()

Parameters

  core | The LinphoneCore object

Returns

## linphone_core_get_loaded_plugins()

const bctbx_list_t * linphone_core_get_loaded_plugins | ( | LinphoneCore * | core | ) |

Return the list of loaded plugins.

Parameters

  core | A LinphoneCore object

Returns
  the list of loaded plugins

## linphone_core_get_push_notification_config()

const LinphonePushNotificationConfig * linphone_core_get_push_notification_config | ( | const LinphoneCore * | core | ) |

Gets the push notification configuration object if it exists.

Parameters

  core | The LinphoneCore object

Returns
  the LinphonePushNotificationConfig if it exists, NULL otherwise.

## linphone_core_is_plugin_loaded()

bool_t linphone_core_is_plugin_loaded | ( | const LinphoneCore * | core,
|  | const char * | name )

Tells whether a plugin is loaded or not.

Parameters

  core | A LinphoneCore object
  name | name of the plugin

Returns
  A boolean value telling whether the plugin has been loaded

## linphone_core_remove_ldap()

void linphone_core_remove_ldap | ( | LinphoneCore * | core,
|  | LinphoneLdap * | ldap )

Remove a LDAP from the configuration.

Parameters

  core | LinphoneCore object
  ldap | The LDAP to remove.

## linphone_core_set_chat_messages_aggregation_enabled()

void linphone_core_set_chat_messages_aggregation_enabled | ( | LinphoneCore * | core,
|  | bool_t | enabled )

Sets whether chat messages grouping is enabled or not.

Set [sip] chat_messages_aggregation in your configuration file for the timer, default is 500ms.

Parameters

  core | The LinphoneCore object
  enabled | TRUE to wait for chat messages and notify them as at once, FALSE to keep legacy behavior.

## linphone_ldap_get_core()

LinphoneCore * linphone_ldap_get_core | ( | LinphoneLdap * | ldap | ) |

Get the LinphoneCore object to which is associated the LinphoneLdap.

Parameters

  ldap | The LinphoneLdap object.

Returns
  The LinphoneCore object to which is associated the LinphoneLdap.

## linphone_ldap_get_index()

int linphone_ldap_get_index | ( | const LinphoneLdap * | ldap | ) |

Get the index of the LinphoneLdap.

Parameters

  ldap | The LinphoneLdap object.

Returns
  The index of the Ldap

## linphone_ldap_get_params()

const LinphoneLdapParams * linphone_ldap_get_params | ( | LinphoneLdap * | ldap | ) |

Get the LinphoneLdapParams as read-only object.

To make changes, clone the returned object using linphone_ldap_params_clone() method, make your changes on it and apply them using with linphone_ldap_set_params().

Parameters

  ldap | The LinphoneLdap object.

Returns
  The LinphoneLdapParams attached to this ldap.

## linphone_ldap_new()

LinphoneLdap * linphone_ldap_new | ( | LinphoneCore * | lc | ) |

Create a new LinphoneLdap.

Call * linphone_ldap_set_params() to store the new LDAP configuration.

Parameters

  lc | The LinphoneCore object.

Returns
  The newly created LinphoneLdap object.

## linphone_ldap_new_with_params()

LinphoneLdap * linphone_ldap_new_with_params | ( | LinphoneCore * | lc,
|  | LinphoneLdapParams * | params )

Create a new LinphoneLdap, associate it with the LinphoneLdapParams and store it into the configuration file.

Parameters

  lc | The LinphoneCore object.
  params | The LinphoneLdapParams object.

Returns
  The newly created LinphoneLdap object.

## linphone_ldap_params_check()

int linphone_ldap_params_check | ( | const LinphoneLdapParams * | params | ) |

Check parameters and return what are wrong.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The LinphoneLdapCheck values. LinphoneLdapCheckOk if everything is ok.

## linphone_ldap_params_clone()

LinphoneLdapParams * linphone_ldap_params_clone | ( | const LinphoneLdapParams * | params | ) |

Instantiate a new LinphoneLdapParams with values from source.

Parameters

  params | The LinphoneLdapParams object to be cloned.

Returns
  The newly created LinphoneLdapParams object.

## linphone_ldap_params_enable_sal()

void linphone_ldap_params_enable_sal | ( | LinphoneLdapParams * | params,
|  | bool_t | enable )

The dns resolution is done by Linphone using Sal.

It will pass an IP to LDAP. By doing that, the TLS negociation could not check the hostname. You may deactivate the verifications if wanted to force the connection. Default value : FALSE.

Parameters

  params | The LinphoneLdapParams object.
  enable | Enable or not the use of sal.

## linphone_ldap_params_enable_tls()

void linphone_ldap_params_enable_tls | ( | LinphoneLdapParams * | params,
|  | bool_t | enable )

Encrypt transactions by LDAP over TLS(StartTLS).

You must use 'ldap' scheme. 'ldaps' for LDAP over SSL is non-standardized and deprecated. StartTLS in an extension to the LDAP protocol which uses the TLS protocol to encrypt communication. It works by establishing a normal - i.e. unsecured - connection with the LDAP server before a handshake negotiation between the server and the web services is carried out. Here, the server sends its certificate to prove its identity before the secure connection is established. Default value : TRUE.

Parameters

  params | The LinphoneLdapParams object.
  enable | Enable or not the use of TLS.

## linphone_ldap_params_get_auth_method()

LinphoneLdapAuthMethod linphone_ldap_params_get_auth_method | ( | const LinphoneLdapParams * | params | ) |

Get the authentification method.

Check LinphoneLdapAuthMethod for authentification values.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The LinphoneLdapAuthMethod.

## linphone_ldap_params_get_base_object()

const char * linphone_ldap_params_get_base_object | ( | const LinphoneLdapParams * | params | ) |

Get the BaseObject.

It is a specification for LDAP Search Scopes that specifies that the Search Request should only be performed against the entry specified as the search base DN. No entries above it will be considered. This field is required.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The specification.

## linphone_ldap_params_get_bind_dn()

const char * linphone_ldap_params_get_bind_dn | ( | const LinphoneLdapParams * | params | ) |

Get the Bind DN to use for bindings.

The bindDN DN is the credential that is used to authenticate against an LDAP. If empty, the connection will be Anonymous. eg: cn=ausername,ou=people,dc=bc,dc=com

Parameters

  params | The LinphoneLdapParams object.

Returns
  The Bind DN to use for bindings.

## linphone_ldap_params_get_custom_value()

const char * linphone_ldap_params_get_custom_value | ( | const LinphoneLdapParams * | params,
|  | const char * | key )

Get the value from field.

Parameters

  params | The LinphoneLdapParams object.
  key | The key string.

Returns
  The Value associated to the key.

## linphone_ldap_params_get_debug_level()

LinphoneLdapDebugLevel linphone_ldap_params_get_debug_level | ( | const LinphoneLdapParams * | params | ) |

Return the debug verbosity level.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The LinphoneLdapDebugLevel debug level.

## linphone_ldap_params_get_delay()

int linphone_ldap_params_get_delay | ( | const LinphoneLdapParams * | params | ) |

Get the delay between each search in milliseconds.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The delay in milliseconds.

## linphone_ldap_params_get_enabled()

bool_t linphone_ldap_params_get_enabled | ( | const LinphoneLdapParams * | params | ) |

Return if the configuration is enabled.

Parameters

  params | The LinphoneLdapParams object.

Returns
  Enable or not the LDAP configuration.

## linphone_ldap_params_get_filter()

const char * linphone_ldap_params_get_filter | ( | const LinphoneLdapParams * | params | ) |

Get the search is based on this filter to search contacts.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The filter to use.

## linphone_ldap_params_get_max_results()

int linphone_ldap_params_get_max_results | ( | const LinphoneLdapParams * | params | ) |

Get the max results when requesting searches.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The max results when requesting searches.

## linphone_ldap_params_get_min_chars()

int linphone_ldap_params_get_min_chars | ( | const LinphoneLdapParams * | params | ) |

Get the minimum characters needed for doing a search on LDAP servers.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The minimum characters needed by a search.

## linphone_ldap_params_get_name_attribute()

const char * linphone_ldap_params_get_name_attribute | ( | const LinphoneLdapParams * | params | ) |

Get the attributes to build Name Friend, separated by a comma and the first is the highest priority.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The comma separated attributes for the search.

## linphone_ldap_params_get_password()

const char * linphone_ldap_params_get_password | ( | const LinphoneLdapParams * | params | ) |

Get the password to pass to server when binding.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The password to pass to server when binding.

## linphone_ldap_params_get_server()

const char * linphone_ldap_params_get_server | ( | const LinphoneLdapParams * | params | ) |

Get the LDAP Server.

Parameters

  params | The LinphoneLdapParams object.

Returns
  LDAP Server address.

## linphone_ldap_params_get_server_certificates_verification_mode()

LinphoneLdapCertVerificationMode linphone_ldap_params_get_server_certificates_verification_mode | ( | const LinphoneLdapParams * | params | ) |

Return whether the tls server certificate must be verified when connecting to a LDAP server.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The TLS verification mode from LinphoneLdapCertVerificationMode

## linphone_ldap_params_get_sip_attribute()

const char * linphone_ldap_params_get_sip_attribute | ( | const LinphoneLdapParams * | params | ) |

Get the attributes to build the SIP username in address of Friend.

Attributes are separated by a comma.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The comma separated attributes for building Friend.

## linphone_ldap_params_get_sip_domain()

const char * linphone_ldap_params_get_sip_domain | ( | const LinphoneLdapParams * | param | ) |

Get the domain to the sip address(sip:username@domain).

Parameters

  params | The LinphoneLdapParams object.

Returns
  The SIP domain for the friend.

## linphone_ldap_params_get_timeout()

int linphone_ldap_params_get_timeout | ( | const LinphoneLdapParams * | params | ) |

Get the timeout for requests in seconds.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The timeout in seconds.

## linphone_ldap_params_get_timeout_tls_ms()

int linphone_ldap_params_get_timeout_tls_ms | ( | const LinphoneLdapParams * | params | ) |

Get the timeout for TLS connection in milliseconds.

Parameters

  params | The LinphoneLdapParams object.

Returns
  The timeout in milliseconds.

## linphone_ldap_params_new()

LinphoneLdapParams * linphone_ldap_params_new | ( | LinphoneCore * | lc | ) |

Create a new LinphoneLdapParams object.

Parameters

  lc | The LinphoneCore object.

Returns
  The newly created LinphoneLdapParams object.

## linphone_ldap_params_ref()

LinphoneLdapParams * linphone_ldap_params_ref | ( | LinphoneLdapParams * | params | ) |

Take a reference on a LinphoneLdapParams.

Parameters

  params | The LinphoneLdapParams object.

Returns
  the same LinphoneLdapParams object.

## linphone_ldap_params_sal_enabled()

bool_t linphone_ldap_params_sal_enabled | ( | const LinphoneLdapParams * | params | ) |

Return if the dns resolution is done by Linphone using Sal.

It will pass an IP to LDAP. By doing that, the TLS negociation could not check the hostname. You may deactivate the verifications if wanted to force the connection.

Parameters

  params | The LinphoneLdapParams object.

Returns
  Enable or not the use of sal.

## linphone_ldap_params_set_auth_method()

void linphone_ldap_params_set_auth_method | ( | LinphoneLdapParams * | params,
|  | LinphoneLdapAuthMethod | auth_method )

Authentification method.

Check LinphoneLdapAuthMethod for authentification values. Default value : LinphoneLdapAuthMethodSimple

Parameters

  params | The LinphoneLdapParams object.
  auth_method | The LinphoneLdapAuthMethod.

## linphone_ldap_params_set_base_object()

void linphone_ldap_params_set_base_object | ( | LinphoneLdapParams * | params,
|  | const char * | base_object )

BaseObject is a specification for LDAP Search Scopes that specifies that the Search Request should only be performed against the entry specified as the search base DN.

No entries above it will be considered. This field is required. Default value : "dc=example,dc=com"

Parameters

  params | The LinphoneLdapParams object.
  base_object | The specification.

## linphone_ldap_params_set_bind_dn()

void linphone_ldap_params_set_bind_dn | ( | LinphoneLdapParams * | params,
|  | const char * | bind_dn )

Bind DN to use for bindings.

The bindDN DN is the credential that is used to authenticate against an LDAP. If empty, the connection will be Anonymous. eg: cn=ausername,ou=people,dc=bc,dc=com Default value : "".

Parameters

  params | The LinphoneLdapParams object.
  bind_dn | The Bind DN to use for bindings.

## linphone_ldap_params_set_custom_value()

void linphone_ldap_params_set_custom_value | ( | LinphoneLdapParams * | params,
|  | const char * | key,
|  | const char * | value )

Set custom field.

Parameters

  params | The LinphoneLdapParams object.
  key | The key string.
  value | The value string.

## linphone_ldap_params_set_debug_level()

void linphone_ldap_params_set_debug_level | ( | LinphoneLdapParams * | params,
|  | LinphoneLdapDebugLevel | level )

The debug verbosity level from internal LDAP API.

Values are LinphoneLdapDebugLevel Default value: LinphoneLdapDebugLevelOff

Parameters

  params | The LinphoneLdapParams object.
  level | The LinphoneLdapDebugLevel debug level.

## linphone_ldap_params_set_delay()

void linphone_ldap_params_set_delay | ( | LinphoneLdapParams * | params,
|  | int | delay )

Delay between each search in milliseconds Default value : 500.

Parameters

  params | The LinphoneLdapParams object.
  delay | The timeout in milliseconds.

## linphone_ldap_params_set_enabled()

void linphone_ldap_params_set_enabled | ( | LinphoneLdapParams * | params,
|  | bool_t | enable )

If this config is enabled.

Default value : FALSE.

Parameters

  params | The LinphoneLdapParams object.
  enable | Enable or not the LDAP configuration.

## linphone_ldap_params_set_filter()

void linphone_ldap_params_set_filter | ( | LinphoneLdapParams * | params,
|  | const char * | filter )

The search is based on this filter to search contacts.

Default value : "(sn=*%s*)".

Parameters

  params | The LinphoneLdapParams object.
  filter | The filter to use.

## linphone_ldap_params_set_max_results()

void linphone_ldap_params_set_max_results | ( | LinphoneLdapParams * | params,
|  | int | max_results )

The max results when requesting searches.

Default value : 5. This value fit for standard cases where only first results are needed. Also, it avoids latency on each searchs.

Parameters

  params | The LinphoneLdapParams object.
  max_results | The max results when requesting searches.

## linphone_ldap_params_set_min_chars()

void linphone_ldap_params_set_min_chars | ( | LinphoneLdapParams * | params,
|  | int | min_chars )

The minimum characters needed for doing a search on LDAP servers.

Default value : 0.

Parameters

  params | The LinphoneLdapParams object.
  min_chars | The minimum characters needed by a search.

## linphone_ldap_params_set_name_attribute()

void linphone_ldap_params_set_name_attribute | ( | LinphoneLdapParams * | params,
|  | const char * | name_attribute )

Check these attributes to build Name Friend, separated by a comma and the first is the highest priority.

Default value : "sn".

Parameters

  params | The LinphoneLdapParams object.
  name_attribute | The comma separated attributes for the search.

## linphone_ldap_params_set_password()

void linphone_ldap_params_set_password | ( | LinphoneLdapParams * | params,
|  | const char * | password )

The password to pass to server when binding.

Default value : "".

Parameters

  params | The LinphoneLdapParams object.
  password | The password to pass to server when binding.

## linphone_ldap_params_set_server()

void linphone_ldap_params_set_server | ( | LinphoneLdapParams * | params,
|  | const char * | server )

LDAP Server.

eg: ldap:/// for a localhost server or ldap://ldap.example.org/ Default value: "ldap:///". This field is required.

You must use 'ldap' scheme. 'ldaps' for LDAP over SSL is non-standardized and deprecated.

Parameters

  params | The LinphoneLdapParams object.
  server | LDAP Server address.

## linphone_ldap_params_set_server_certificates_verification_mode()

void linphone_ldap_params_set_server_certificates_verification_mode | ( | LinphoneLdapParams * | params,
|  | LinphoneLdapCertVerificationMode | verify_server_certificates )

Specify whether the tls server certificate must be verified when connecting to a LDAP server.

Values are LinphoneLdapCertVerificationMode Default value : LinphoneLdapCertVerificationDefault (auto)

Parameters

  params | The LinphoneLdapParams object.
  verify_server_certificates | The TLS verification mode from LinphoneLdapCertVerificationMode

## linphone_ldap_params_set_sip_attribute()

void linphone_ldap_params_set_sip_attribute | ( | LinphoneLdapParams * | params,
|  | const char * | sip_attribute )

Check these attributes to build the SIP username in address of Friend.

Attributes are separated by a comma. Default value : "mobile,telephoneNumber,homePhone,sn".

Parameters

  params | The LinphoneLdapParams object.
  sip_attribute | The comma separated attributes for building Friend.

## linphone_ldap_params_set_sip_domain()

void linphone_ldap_params_set_sip_domain | ( | LinphoneLdapParams * | params,
|  | const char * | sip_domain )

Add the domain to the sip address(sip:username@domain).

By default or if it is empty, the domain will be specify while searching on the current proxy account. Default value : "".

Parameters

  params | The LinphoneLdapParams object.
  sip_domain | The SIP domain for the friend.

## linphone_ldap_params_set_timeout()

void linphone_ldap_params_set_timeout | ( | LinphoneLdapParams * | params,
|  | int | timeout )

Timeout for requests in seconds.

It limits the time for searchs and the value is passed to Ldap with `LDAP_OPT_NETWORK_TIMEOUT`. Default value : 5.

Parameters

  params | The LinphoneLdapParams object.
  timeout | The timeout in seconds.

## linphone_ldap_params_set_timeout_tls_ms()

void linphone_ldap_params_set_timeout_tls_ms | ( | LinphoneLdapParams * | params,
|  | int | timeout )

Timeout for TLS connection in milliseconds.

Default value : 1000.

Parameters

  params | The LinphoneLdapParams object.
  timeout | The timeout in milliseconds.

## linphone_ldap_params_tls_enabled()

bool_t linphone_ldap_params_tls_enabled | ( | const LinphoneLdapParams * | params | ) |

Return if transactions are encrypted by LDAP over TLS(StartTLS).

You must use \'ldap\' scheme. \'ldaps\' for LDAP over SSL is non-standardized and deprecated. StartTLS in an extension to the LDAP protocol which uses the TLS protocol to encrypt communication. It works by establishing a normal - i.e. unsecured - connection with the LDAP server before a handshake negotiation between the server and the web services is carried out. Here, the server sends its certificate to prove its identity before the secure connection is established.

Parameters

  params | The LinphoneLdapParams object.

Returns
  Enable or not the use of TLS.

## linphone_ldap_params_unref()

void linphone_ldap_params_unref | ( | LinphoneLdapParams * | params | ) |

Release a LinphoneLdapParams.

Parameters

  params | The LinphoneLdapParams object.

## linphone_ldap_ref()

LinphoneLdap * linphone_ldap_ref | ( | LinphoneLdap * | ldap | ) |

Take a reference on a LinphoneLdap.

Parameters

  ldap | The LinphoneLdap object.

Returns
  the same LinphoneLdap object.

## linphone_ldap_set_index()

void linphone_ldap_set_index | ( | LinphoneLdap * | ldap,
|  | int | index )

Set the index associated to the LinphoneLdap.

Parameters

  ldap | The LinphoneLdap object.
  The | index of the Ldap. Can be -1 : it will be determined on save.

## linphone_ldap_set_params()

void linphone_ldap_set_params | ( | LinphoneLdap * | ldap,
|  | LinphoneLdapParams * | params )

Set the LinphoneLdapParams used by this LinphoneLdap.

The parameters will be saved in the configuration file.

Parameters

  ldap | The LinphoneLdap object.
  params | The LinphoneLdapParams object.

## linphone_ldap_unref()

void linphone_ldap_unref | ( | LinphoneLdap * | ldap | ) |

Release a LinphoneLdap.

Parameters

  ldap | The LinphoneLdap object.