Liblinphone 5.5.0
Typedefs | Functions
Contacts

Typedefs

typedef struct _LinphoneMagicSearch LinphoneMagicSearch
 
typedef struct _LinphoneMagicSearchCbs LinphoneMagicSearchCbs
 
typedef struct _LinphoneSearchResult LinphoneSearchResult
 
typedef struct _LinphoneCardDavParams LinphoneCardDavParams
 
typedef struct _LinphoneRemoteContactDirectory LinphoneRemoteContactDirectory
 
typedef struct _LinphoneFriendPhoneNumber LinphoneFriendPhoneNumber
 
typedef struct _LinphoneFriendDevice LinphoneFriendDevice
 

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)
 
LinphoneCardDavParamslinphone_card_dav_params_clone (const LinphoneCardDavParams *params)
 
LinphoneCardDavParamslinphone_card_dav_params_ref (LinphoneCardDavParams *params)
 
void linphone_card_dav_params_unref (LinphoneCardDavParams *params)
 
bctbx_list_t * linphone_card_dav_params_get_user_input_fields (const LinphoneCardDavParams *params)
 
void linphone_card_dav_params_set_user_input_fields (LinphoneCardDavParams *params, bctbx_list_t *list)
 
bctbx_list_t * linphone_card_dav_params_get_domain_fields (const LinphoneCardDavParams *params)
 
void linphone_card_dav_params_set_domain_fields (LinphoneCardDavParams *params, const bctbx_list_t *list)
 
bool_t linphone_card_dav_params_get_use_exact_match_policy (const LinphoneCardDavParams *params)
 
void linphone_card_dav_params_set_use_exact_match_policy (LinphoneCardDavParams *params, bool_t exact_match)
 
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

Create, manage and search contacts.

Typedef Documentation

◆ LinphoneMagicSearch

typedef struct _LinphoneMagicSearch LinphoneMagicSearch

A LinphoneMagicSearch is used to search for contacts from various sources:

◆ LinphoneMagicSearchCbs

typedef struct _LinphoneMagicSearchCbs LinphoneMagicSearchCbs

LinphoneMagicSearchCbs is an interface to be notified of results of contact searches initiated from the LinphoneMagicSearch.

See also
linphone_magic_search_add_callbacks()

Function Documentation

◆ linphone_card_dav_params_clone()

LinphoneCardDavParams * linphone_card_dav_params_clone ( const LinphoneCardDavParams params)

Instantiates a new LinphoneCardDavParams with values from source.

Parameters
paramsThe LinphoneCardDavParams object to be cloned.
Returns
The newly created LinphoneCardDavParams object.

◆ linphone_card_dav_params_get_domain_fields()

bctbx_list_t * linphone_card_dav_params_get_domain_fields ( const LinphoneCardDavParams params)

Gets the list of vCard RFC fields to use to match the domain filter on.

For example, you can use "IMPP".

Parameters
paramsThe LinphoneCardDavParams object.
Returns
The list of vCard fields to make the query on using domain filter.
Warning
DO NOT USE ANYMORE, it won't have any effect.
Deprecated:
06/10/2025 domain filter will be applied locally instead of using a CardDAV prop filter XML tag.

◆ linphone_card_dav_params_get_use_exact_match_policy()

bool_t linphone_card_dav_params_get_use_exact_match_policy ( const LinphoneCardDavParams params)

Gets the matching policy: TRUE if the remote vCard value must match the filter exactly, FALSE if it only needs to contain the filter.

Parameters
paramsThe LinphoneCardDavParams object.
Returns
The matching policy: TRUE if the remote vCard value must match the filter exactly, FALSE if it only needs to contain the filter.

◆ linphone_card_dav_params_get_user_input_fields()

bctbx_list_t * linphone_card_dav_params_get_user_input_fields ( const LinphoneCardDavParams params)

Gets the list of vCard RFC fields to use to match user input text on.

For example, you can use "FN", "N", "IMPP", "ORG", etc...

Parameters
paramsThe LinphoneCardDavParams object.
Returns
The list of vCard fields to make the query on using user input.

◆ linphone_card_dav_params_ref()

LinphoneCardDavParams * linphone_card_dav_params_ref ( LinphoneCardDavParams params)

Takes a reference on a LinphoneCardDavParams.

Parameters
paramsThe LinphoneCardDavParams object.
Returns
the same LinphoneCardDavParams object.

◆ linphone_card_dav_params_set_domain_fields()

void linphone_card_dav_params_set_domain_fields ( LinphoneCardDavParams params,
const bctbx_list_t *  list 
)

Sets the list of vCard RFC fields to use to match the domain filter on.

For example, you can use "IMPP".

Parameters
paramsThe LinphoneCardDavParams object.
listthe list of vCard RFC fields to use to match the domain filter on.
Warning
DO NOT USE ANYMORE, it won't have any effect.
Deprecated:
06/10/2025 domain filter will be applied locally instead of using a CardDAV prop filter XML tag.

◆ linphone_card_dav_params_set_use_exact_match_policy()

void linphone_card_dav_params_set_use_exact_match_policy ( LinphoneCardDavParams params,
bool_t  exact_match 
)

Sets the matching policy: TRUE if the remote vCard value must match the filter exactly, FALSE if it only needs to contain the filter.

Parameters
paramsThe LinphoneCardDavParams object.
exact_matchthe policy to use: TRUE if the remote vCard value must match the filter exactly, FALSE if it only needs to contain the filter.

◆ linphone_card_dav_params_set_user_input_fields()

void linphone_card_dav_params_set_user_input_fields ( LinphoneCardDavParams params,
bctbx_list_t *  list 
)

Sets the list of vCard RFC fields to use to match user input text on.

For example, you can use "FN", "N", "IMPP", "ORG", etc...

Parameters
paramsThe LinphoneCardDavParams object.
listthe list of vCard RFC fields to use to match user input text on.

◆ linphone_card_dav_params_unref()

void linphone_card_dav_params_unref ( LinphoneCardDavParams params)

Releases a LinphoneCardDavParams.

Parameters
paramsThe LinphoneCardDavParams object.

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

Get 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 
)

Set 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.