Liblinphone 5.5.0
Typedefs | Enumerations | Functions
Remote contact directories

Typedefs

typedef enum _LinphoneRemoteContactDirectoryType LinphoneRemoteContactDirectoryType
 
typedef struct _LinphoneLdap LinphoneLdap
 
typedef struct _LinphoneLdapParams LinphoneLdapParams
 
typedef enum _LinphoneLdapDebugLevel LinphoneLdapDebugLevel
 
typedef enum _LinphoneLdapAuthMethod LinphoneLdapAuthMethod
 
typedef enum _LinphoneLdapCertVerificationMode LinphoneLdapCertVerificationMode
 
typedef enum _LinphoneLdapCheck LinphoneLdapCheck
 

Enumerations

enum  _LinphoneRemoteContactDirectoryType {
  LinphoneRemoteContactDirectoryTypeCardDav = 0 ,
  LinphoneRemoteContactDirectoryTypeLdap = 1
}
 
enum  _LinphoneLdapDebugLevel {
  LinphoneLdapDebugLevelOff = 0 ,
  LinphoneLdapDebugLevelVerbose = 1
}
 
enum  _LinphoneLdapAuthMethod {
  LinphoneLdapAuthMethodAnonymous = 0 ,
  LinphoneLdapAuthMethodSimple = 1
}
 
enum  _LinphoneLdapCertVerificationMode {
  LinphoneLdapCertVerificationDefault = -1 ,
  LinphoneLdapCertVerificationDisabled = 0 ,
  LinphoneLdapCertVerificationEnabled = 1
}
 
enum  _LinphoneLdapCheck {
  LinphoneLdapCheckOk = 0 ,
  LinphoneLdapCheckServerEmpty = 1 ,
  LinphoneLdapCheckServerNotUrl = 2 ,
  LinphoneLdapCheckServerNoScheme = 4 ,
  LinphoneLdapCheckServerNotLdap = 8 ,
  LinphoneLdapCheckServerLdaps ,
  LinphoneLdapCheckBaseObjectEmpty = 32 ,
  LinphoneLdapCheckMissingFields = 64
}
 

Functions

LinphoneRemoteContactDirectorylinphone_core_create_card_dav_remote_contact_directory (LinphoneCore *core, LinphoneCardDavParams *params)
 
LinphoneRemoteContactDirectorylinphone_core_create_ldap_remote_contact_directory (LinphoneCore *core, LinphoneLdapParams *params)
 
void linphone_core_add_remote_contact_directory (LinphoneCore *core, LinphoneRemoteContactDirectory *remoteContactDirectory)
 
void linphone_core_remove_remote_contact_directory (LinphoneCore *core, LinphoneRemoteContactDirectory *remoteContactDirectory)
 
bctbx_list_t * linphone_core_get_remote_contact_directories (LinphoneCore *core)
 
LinphoneCardDavParamslinphone_core_create_card_dav_params (LinphoneCore *core)
 
LinphoneVcardlinphone_core_create_vcard_from_text (const LinphoneCore *core, const char *input)
 
bool_t linphone_core_ldap_available (LinphoneCore *core)
 
LinphoneLdapParamslinphone_core_create_ldap_params (LinphoneCore *core)
 
LinphoneLdapParamslinphone_ldap_params_clone (const LinphoneLdapParams *params)
 
LinphoneLdapParamslinphone_ldap_params_ref (LinphoneLdapParams *params)
 
void linphone_ldap_params_unref (LinphoneLdapParams *params)
 
void linphone_ldap_params_set_custom_value (LinphoneLdapParams *params, const char *key, const char *value)
 
const char * linphone_ldap_params_get_custom_value (const LinphoneLdapParams *params, const char *key)
 
void linphone_ldap_params_set_server (LinphoneLdapParams *params, const char *server)
 
const char * linphone_ldap_params_get_server (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_bind_dn (LinphoneLdapParams *params, const char *bind_dn)
 
const char * linphone_ldap_params_get_bind_dn (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_base_object (LinphoneLdapParams *params, const char *base_object)
 
const char * linphone_ldap_params_get_base_object (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_timeout (LinphoneLdapParams *params, int timeout)
 
int linphone_ldap_params_get_timeout (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_timeout_tls_ms (LinphoneLdapParams *params, int timeout)
 
int linphone_ldap_params_get_timeout_tls_ms (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_max_results (LinphoneLdapParams *params, int max_results)
 
int linphone_ldap_params_get_max_results (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_min_chars (LinphoneLdapParams *params, int min_chars)
 
int linphone_ldap_params_get_min_chars (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_delay (LinphoneLdapParams *params, int delay)
 
int linphone_ldap_params_get_delay (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_auth_method (LinphoneLdapParams *params, LinphoneLdapAuthMethod auth_method)
 
LinphoneLdapAuthMethod linphone_ldap_params_get_auth_method (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_password (LinphoneLdapParams *params, const char *password)
 
const char * linphone_ldap_params_get_password (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_filter (LinphoneLdapParams *params, const char *filter)
 
const char * linphone_ldap_params_get_filter (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_name_attribute (LinphoneLdapParams *params, const char *name_attribute)
 
const char * linphone_ldap_params_get_name_attribute (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_sip_attribute (LinphoneLdapParams *params, const char *sip_attribute)
 
const char * linphone_ldap_params_get_sip_attribute (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_sip_domain (LinphoneLdapParams *params, const char *sip_domain)
 
const char * linphone_ldap_params_get_sip_domain (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_enabled (LinphoneLdapParams *params, bool_t enable)
 
bool_t linphone_ldap_params_get_enabled (const LinphoneLdapParams *params)
 
void linphone_ldap_params_enable_sal (LinphoneLdapParams *params, bool_t enable)
 
bool_t linphone_ldap_params_sal_enabled (const LinphoneLdapParams *params)
 
void linphone_ldap_params_enable_tls (LinphoneLdapParams *params, bool_t enable)
 
bool_t linphone_ldap_params_tls_enabled (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_debug_level (LinphoneLdapParams *params, LinphoneLdapDebugLevel level)
 
LinphoneLdapDebugLevel linphone_ldap_params_get_debug_level (const LinphoneLdapParams *params)
 
void linphone_ldap_params_set_server_certificates_verification_mode (LinphoneLdapParams *params, LinphoneLdapCertVerificationMode verify_server_certificates)
 
LinphoneLdapCertVerificationMode linphone_ldap_params_get_server_certificates_verification_mode (const LinphoneLdapParams *params)
 
int linphone_ldap_params_check (const LinphoneLdapParams *params)
 
LinphoneRemoteContactDirectorylinphone_remote_contact_directory_ref (LinphoneRemoteContactDirectory *remote_contact_directory)
 
void linphone_remote_contact_directory_unref (LinphoneRemoteContactDirectory *remote_contact_directory)
 
void linphone_remote_contact_directory_enable (LinphoneRemoteContactDirectory *remote_contact_directory, bool_t value)
 
bool_t linphone_remote_contact_directory_enabled (const LinphoneRemoteContactDirectory *remote_contact_directory)
 
LinphoneRemoteContactDirectoryType linphone_remote_contact_directory_get_type (const LinphoneRemoteContactDirectory *remote_contact_directory)
 
LinphoneCardDavParamslinphone_remote_contact_directory_get_card_dav_remote_contact_directory (const LinphoneRemoteContactDirectory *remote_contact_directory)
 
LinphoneLdapParamslinphone_remote_contact_directory_get_ldap_remote_contact_directory (const LinphoneRemoteContactDirectory *remote_contact_directory)
 
const char * linphone_remote_contact_directory_get_server_url (const LinphoneRemoteContactDirectory *remote_contact_directory)
 
void linphone_remote_contact_directory_set_server_url (LinphoneRemoteContactDirectory *remote_contact_directory, const char *server_url)
 
unsigned int linphone_remote_contact_directory_get_limit (const LinphoneRemoteContactDirectory *remote_contact_directory)
 
void linphone_remote_contact_directory_set_limit (LinphoneRemoteContactDirectory *remote_contact_directory, unsigned int limit)
 
unsigned int linphone_remote_contact_directory_get_min_characters (const LinphoneRemoteContactDirectory *remote_contact_directory)
 
void linphone_remote_contact_directory_set_min_characters (LinphoneRemoteContactDirectory *remote_contact_directory, unsigned int min)
 
unsigned int linphone_remote_contact_directory_get_timeout (const LinphoneRemoteContactDirectory *remote_contact_directory)
 
void linphone_remote_contact_directory_set_timeout (LinphoneRemoteContactDirectory *remote_contact_directory, unsigned int seconds)
 
void linphone_remote_contact_directory_set_delay (LinphoneRemoteContactDirectory *remote_contact_directory, int milliseconds)
 
int linphone_remote_contact_directory_get_delay (const LinphoneRemoteContactDirectory *remote_contact_directory)
 

Detailed Description

Using LDAP or CardDav remote contact directories to lookup contacts.

Typedef Documentation

◆ LinphoneLdap

typedef struct _LinphoneLdap LinphoneLdap

Object that represents a LDAP connection.

Use a LinphoneLdapParams object to configure it.

Deprecated:
18/11/2024 LinphoneLdap object is no longer used, use LinphoneRemoteContactDirectory instead.

Enumeration Type Documentation

◆ _LinphoneLdapAuthMethod

Enum describing how the authentification will be made.

Enumerator
LinphoneLdapAuthMethodAnonymous 

Connection without passwords.

LinphoneLdapAuthMethodSimple 

Connection with username/password.

◆ _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 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 Debug verbosity for OpenLdap.

Enumerator
LinphoneLdapDebugLevelOff 

Set OpenLdap verbosity to none.

LinphoneLdapDebugLevelVerbose 

Set OpenLdap verbosity to debug level.

◆ _LinphoneRemoteContactDirectoryType

Enum describing the type of LinphoneRemoteContactDirectory (currently CardDAV or LDAP).

Enumerator
LinphoneRemoteContactDirectoryTypeCardDav 

Remote contact directory will use LinphoneCardDavParams.

LinphoneRemoteContactDirectoryTypeLdap 

Remote contact directory will use LinphoneLdapParams.

Function Documentation

◆ linphone_core_add_remote_contact_directory()

void linphone_core_add_remote_contact_directory ( LinphoneCore core,
LinphoneRemoteContactDirectory remoteContactDirectory 
)

Adds a LinphoneRemoteContactDirectory object previously created to the Core, to be used later by LinphoneMagicSearch to query contacts using either LDAP or CardDAV.

Parameters
coreLinphoneCore object.
remoteContactDirectorythe newly created LinphoneRemoteContactDirectory to add.

◆ linphone_core_create_card_dav_params()

LinphoneCardDavParams * linphone_core_create_card_dav_params ( LinphoneCore core)

Creates a new CardDAV server params object that may be used later by LinphoneMagicSearch to query contacts.

Parameters
coreLinphoneCore object.
Returns
a new LinphoneCardDavParams object to configure, and then use it to create a LinphoneRemoteContactDirectory using linphone_core_create_card_dav_remote_contact_directory().

◆ linphone_core_create_card_dav_remote_contact_directory()

LinphoneRemoteContactDirectory * linphone_core_create_card_dav_remote_contact_directory ( LinphoneCore core,
LinphoneCardDavParams params 
)

Creates a new CardDAV server params object that may be used later by LinphoneMagicSearch to query contacts.

Parameters
coreLinphoneCore object.
paramsthe LinphoneCardDavParams to configure this remote contact directory.
Returns
a new LinphoneRemoteContactDirectory object to configure, and then add using linphone_core_add_remote_contact_directory().

◆ linphone_core_create_ldap_params()

LinphoneLdapParams * linphone_core_create_ldap_params ( LinphoneCore core)

Create a LDAP params using default values from Linphone core.

Check LinphoneLdapParams to update values. In order to add a new LDAP configuration to LinphoneMagicSearch, these parameters must be passed to linphone_core_create_ldap_remote_contact_directory().

Parameters
coreLinphoneCore object
Returns
LinphoneLdapParams with default values set.

◆ linphone_core_create_ldap_remote_contact_directory()

LinphoneRemoteContactDirectory * linphone_core_create_ldap_remote_contact_directory ( LinphoneCore core,
LinphoneLdapParams params 
)

Creates a new CardDAV server params object that may be used later by LinphoneMagicSearch to query contacts.

Parameters
coreLinphoneCore object.
paramsthe LinphoneLdapParams to configure this remote contact directory.
Returns
a new LinphoneRemoteContactDirectory object to configure, and then add using linphone_core_add_remote_contact_directory().

◆ linphone_core_create_vcard_from_text()

LinphoneVcard * linphone_core_create_vcard_from_text ( const LinphoneCore core,
const char *  input 
)

Creates a vCard from a text, if possible.

Parameters
coreLinphoneCore object.
inputthe vCard raw text to parse.
Returns
a new LinphoneVcard object if the parsing of the input succeeded, NULL otherwise.

◆ linphone_core_get_remote_contact_directories()

bctbx_list_t * linphone_core_get_remote_contact_directories ( LinphoneCore core)

Gets the list of currently configured LDAP or CardDAV remote servers used by LinphoneMagicSearch.

Parameters
coreLinphoneCore object.
Returns
the list of LinphoneRemoteContactDirectory currently configured, if any.

◆ linphone_core_ldap_available()

bool_t linphone_core_ldap_available ( LinphoneCore core)

End of group contacts.

Tells if LDAP is available

Parameters
coreLinphoneCore object
Returns
TRUE if LDAP is available, FALSE otherwise

◆ linphone_core_remove_remote_contact_directory()

void linphone_core_remove_remote_contact_directory ( LinphoneCore core,
LinphoneRemoteContactDirectory remoteContactDirectory 
)

Removes a LinphoneRemoteContactDirectory object previously added to the Core.

Parameters
coreLinphoneCore object.
remoteContactDirectorythe LinphoneRemoteContactDirectory to remove.

◆ linphone_ldap_params_check()

int linphone_ldap_params_check ( const LinphoneLdapParams params)

Check parameters and return what are wrong.

Parameters
paramsThe 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
paramsThe 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 
)

Handle the DNS resolution using liblinphone's own resolver, which allows to use DNS SRV records.

Default value : TRUE.

Parameters
paramsThe LinphoneLdapParams object.
enableEnable or not the use of own DNS resolver.

◆ 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
paramsThe LinphoneLdapParams object.
enableEnable or not the use of TLS.

◆ linphone_ldap_params_get_auth_method()

LinphoneLdapAuthMethod linphone_ldap_params_get_auth_method ( const LinphoneLdapParams params)

Gets the authentification method.

Check LinphoneLdapAuthMethod for authentification values.

Parameters
paramsThe LinphoneLdapParams object.
Returns
The LinphoneLdapAuthMethod.

◆ linphone_ldap_params_get_base_object()

const char * linphone_ldap_params_get_base_object ( const LinphoneLdapParams params)

Gets 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
paramsThe LinphoneLdapParams object.
Returns
The specification.

◆ linphone_ldap_params_get_bind_dn()

const char * linphone_ldap_params_get_bind_dn ( const LinphoneLdapParams params)

Gets 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
paramsThe 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 
)

Gets the value from field.

Parameters
paramsThe LinphoneLdapParams object.
keyThe 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
paramsThe LinphoneLdapParams object.
Returns
The LinphoneLdapDebugLevel debug level.

◆ linphone_ldap_params_get_delay()

int linphone_ldap_params_get_delay ( const LinphoneLdapParams params)

Gets the delay between each search in milliseconds.

Parameters
paramsThe LinphoneLdapParams object.
Deprecated:
22/08/2025 use linphone_remote_contact_directory_get_delay() instead.
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
paramsThe LinphoneLdapParams object.
Returns
Enable or not the LDAP configuration.
Deprecated:
22/08/2025 Use linphone_remote_contact_directory_enabled() instead.

◆ linphone_ldap_params_get_filter()

const char * linphone_ldap_params_get_filter ( const LinphoneLdapParams params)

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

Parameters
paramsThe LinphoneLdapParams object.
Returns
The filter to use.

◆ linphone_ldap_params_get_max_results()

int linphone_ldap_params_get_max_results ( const LinphoneLdapParams params)

Gets the max results when requesting searches.

0 means the results aren't limited (but magic search limitation may apply).

Parameters
paramsThe LinphoneLdapParams object.
Returns
The max results when requesting searches.
Deprecated:
18/11/2024 use linphone_remote_contact_directory_get_limit() instead.

◆ linphone_ldap_params_get_min_chars()

int linphone_ldap_params_get_min_chars ( const LinphoneLdapParams params)

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

Parameters
paramsThe LinphoneLdapParams object.
Returns
The minimum characters needed by a search.
Deprecated:
18/11/2024 use linphone_remote_contact_directory_get_min_characters() instead.

◆ linphone_ldap_params_get_name_attribute()

const char * linphone_ldap_params_get_name_attribute ( const LinphoneLdapParams params)

Gets the list of LDAP attributes to check for the contact name, separated by a comma and the first being the highest priority.

Parameters
paramsThe 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)

Gets the password to pass to server when binding.

Parameters
paramsThe 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)

Gets the LDAP Server.

Parameters
paramsThe LinphoneLdapParams object.
Returns
LDAP Server address.
Deprecated:
18/11/2024 use linphone_remote_contact_directory_get_server_url() instead.

◆ 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
paramsThe 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)

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

Attributes are separated by a comma.

Parameters
paramsThe 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 params)

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

Parameters
paramsThe LinphoneLdapParams object.
Returns
The SIP domain for the friend.

◆ linphone_ldap_params_get_timeout()

int linphone_ldap_params_get_timeout ( const LinphoneLdapParams params)

Gets the timeout for requests in seconds.

Parameters
paramsThe LinphoneLdapParams object.
Returns
The timeout in seconds.
Deprecated:
18/11/2024 use linphone_remote_contact_directory_get_timeout() instead.

◆ linphone_ldap_params_get_timeout_tls_ms()

int linphone_ldap_params_get_timeout_tls_ms ( const LinphoneLdapParams params)

Gets the timeout for TLS connection in milliseconds.

Parameters
paramsThe LinphoneLdapParams object.
Returns
The timeout in milliseconds.

◆ linphone_ldap_params_ref()

LinphoneLdapParams * linphone_ldap_params_ref ( LinphoneLdapParams params)

Take a reference on a LinphoneLdapParams.

Parameters
paramsThe LinphoneLdapParams object.
Returns
the same LinphoneLdapParams object.

◆ linphone_ldap_params_sal_enabled()

bool_t linphone_ldap_params_sal_enabled ( const LinphoneLdapParams params)

Handle the DNS resolution using liblinphone's own resolver, which allows to use DNS SRV records.

Parameters
paramsThe LinphoneLdapParams object.
Returns
whether liblinphone'own DNS resolver is used.

◆ 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
paramsThe LinphoneLdapParams object.
auth_methodThe 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
paramsThe LinphoneLdapParams object.
base_objectThe 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
paramsThe LinphoneLdapParams object.
bind_dnThe 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
paramsThe LinphoneLdapParams object.
keyThe key string.
valueThe 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
paramsThe LinphoneLdapParams object.
levelThe 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
paramsThe LinphoneLdapParams object.
delayThe timeout in milliseconds.
Deprecated:
22/08/2025 use linphone_remote_contact_directory_set_delay() instead.

◆ 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
paramsThe LinphoneLdapParams object.
enableEnable or not the LDAP configuration.
Deprecated:
22/08/2025 Use linphone_remote_contact_directory_enable() instead.

◆ 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
paramsThe LinphoneLdapParams object.
filterThe 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. Set this value to 0 to have an unlimited search (but magic search limitation may apply).

Parameters
paramsThe LinphoneLdapParams object.
max_resultsThe max results when requesting searches.
Deprecated:
18/11/2024 use linphone_remote_contact_directory_set_limit() instead.

◆ 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
paramsThe LinphoneLdapParams object.
min_charsThe minimum characters needed by a search.
Deprecated:
18/11/2024 use linphone_remote_contact_directory_set_min_characters() instead.

◆ linphone_ldap_params_set_name_attribute()

void linphone_ldap_params_set_name_attribute ( LinphoneLdapParams params,
const char *  name_attribute 
)

List of LDAP attributes to check for the contact name, separated by a comma and the first being the highest priority.

Default value : "sn".

Parameters
paramsThe LinphoneLdapParams object.
name_attributeThe 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
paramsThe LinphoneLdapParams object.
passwordThe 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
paramsThe LinphoneLdapParams object.
serverLDAP Server address.
Deprecated:
18/11/2024 use linphone_remote_contact_directory_set_server_url() instead.

◆ 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
paramsThe LinphoneLdapParams object.
verify_server_certificatesThe 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
paramsThe LinphoneLdapParams object.
sip_attributeThe 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
paramsThe LinphoneLdapParams object.
sip_domainThe 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
paramsThe LinphoneLdapParams object.
timeoutThe timeout in seconds.
Deprecated:
18/11/2024 use linphone_remote_contact_directory_set_timeout() instead.

◆ 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
paramsThe LinphoneLdapParams object.
timeoutThe 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
paramsThe 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
paramsThe LinphoneLdapParams object.

◆ linphone_remote_contact_directory_enable()

void linphone_remote_contact_directory_enable ( LinphoneRemoteContactDirectory remote_contact_directory,
bool_t  value 
)

Enable this remote contact directory, ie make it usable for searches with the LinphoneMagicSearch object.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
valueA boolean.

◆ linphone_remote_contact_directory_enabled()

bool_t linphone_remote_contact_directory_enabled ( const LinphoneRemoteContactDirectory remote_contact_directory)

Returns whether this remote contact directory is enabled, i.e.

usable for searches with the LinphoneMagicSearch .

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
a boolean.

◆ linphone_remote_contact_directory_get_card_dav_remote_contact_directory()

LinphoneCardDavParams * linphone_remote_contact_directory_get_card_dav_remote_contact_directory ( const LinphoneRemoteContactDirectory remote_contact_directory)

Gets the CardDAV remote contact directory if linphone_remote_contact_directory_get_type() returns CardDAV.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
the LinphoneCardDavParams or NULL if not of CardDAV type.

◆ linphone_remote_contact_directory_get_delay()

int linphone_remote_contact_directory_get_delay ( const LinphoneRemoteContactDirectory remote_contact_directory)

Gets the delay between each search in milliseconds.

Only available for LinphoneRemoteContactDirectoryTypeLdap

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
The delay in milliseconds.

◆ linphone_remote_contact_directory_get_ldap_remote_contact_directory()

LinphoneLdapParams * linphone_remote_contact_directory_get_ldap_remote_contact_directory ( const LinphoneRemoteContactDirectory remote_contact_directory)

Gets the LDAP remote contact directory if linphone_remote_contact_directory_get_type() returns LDAP.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
the LinphoneLdapParams or NULL if not of LDAP type.

◆ linphone_remote_contact_directory_get_limit()

unsigned int linphone_remote_contact_directory_get_limit ( const LinphoneRemoteContactDirectory remote_contact_directory)

Gets the maximum number of results to fetch, 0 means no limit.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
the maximum number of results, 0 means no limit.

◆ linphone_remote_contact_directory_get_min_characters()

unsigned int linphone_remote_contact_directory_get_min_characters ( const LinphoneRemoteContactDirectory remote_contact_directory)

Gets the minimum number of characters to have before sending the query to the server.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
The mininum number of characters to have before sending the query.

◆ linphone_remote_contact_directory_get_server_url()

const char * linphone_remote_contact_directory_get_server_url ( const LinphoneRemoteContactDirectory remote_contact_directory)

Gets the configured remote contact directory server URL.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
the remote contact directory server URL.

◆ linphone_remote_contact_directory_get_timeout()

unsigned int linphone_remote_contact_directory_get_timeout ( const LinphoneRemoteContactDirectory remote_contact_directory)

Gets the timeout (in seconds) after which the query is abandonned.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
The timeout (in seconds) after which the query is considered to be timed-out.

◆ linphone_remote_contact_directory_get_type()

LinphoneRemoteContactDirectoryType linphone_remote_contact_directory_get_type ( const LinphoneRemoteContactDirectory remote_contact_directory)

Gets the type of remote contact directory (LDAP, CardDAV).

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
the LinphoneRemoteContactDirectoryType of this remote contact directory.

◆ linphone_remote_contact_directory_ref()

LinphoneRemoteContactDirectory * linphone_remote_contact_directory_ref ( LinphoneRemoteContactDirectory remote_contact_directory)

Takes a reference on a LinphoneRemoteContactDirectory.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
Returns
the same LinphoneRemoteContactDirectory object.

◆ linphone_remote_contact_directory_set_delay()

void linphone_remote_contact_directory_set_delay ( LinphoneRemoteContactDirectory remote_contact_directory,
int  milliseconds 
)

Sets the delay between each search in milliseconds.

Only available for LinphoneRemoteContactDirectoryTypeLdap Default value : 500.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
millisecondsThe timeout in milliseconds.

◆ linphone_remote_contact_directory_set_limit()

void linphone_remote_contact_directory_set_limit ( LinphoneRemoteContactDirectory remote_contact_directory,
unsigned int  limit 
)

Sets the maximum number of results to fetch, 0 means no limit.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
limitthe maximum number of results to return.

◆ linphone_remote_contact_directory_set_min_characters()

void linphone_remote_contact_directory_set_min_characters ( LinphoneRemoteContactDirectory remote_contact_directory,
unsigned int  min 
)

Sets the minimum number of characters to have before sending the query to the server.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
minthe minimum characters to have in user input filter before sending the query.

◆ linphone_remote_contact_directory_set_server_url()

void linphone_remote_contact_directory_set_server_url ( LinphoneRemoteContactDirectory remote_contact_directory,
const char *  server_url 
)

Sets the server URL to use to reach the remote contact directory server.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
server_urlthe remote contact directory server URL.

◆ linphone_remote_contact_directory_set_timeout()

void linphone_remote_contact_directory_set_timeout ( LinphoneRemoteContactDirectory remote_contact_directory,
unsigned int  seconds 
)

Sets the timeout (in seconds) after which the query is abandonned.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.
secondsthe number of seconds before considering the query as timed-out.

◆ linphone_remote_contact_directory_unref()

void linphone_remote_contact_directory_unref ( LinphoneRemoteContactDirectory remote_contact_directory)

Releases a LinphoneRemoteContactDirectory.

Parameters
remote_contact_directoryThe LinphoneRemoteContactDirectory object.