Liblinphone  5.4.0
Typedefs | Functions
Contacts

Create, manage and search contacts. More...

Typedefs

typedef struct _LinphoneMagicSearch LinphoneMagicSearch
 A LinphoneMagicSearch is used to search for contacts from various sources: More...
 
typedef struct _LinphoneMagicSearchCbs LinphoneMagicSearchCbs
 LinphoneMagicSearchCbs is an interface to be notified of results of contact searches initiated from the LinphoneMagicSearch. More...
 
typedef struct _LinphoneSearchResult LinphoneSearchResult
 The LinphoneSearchResult object represents a result of a search initiated from a LinphoneMagicSearch.
 
typedef struct _LinphoneCardDavParams LinphoneCardDavParams
 The LinphoneCardDavParams object represents a remote CardDAV server used by LinphoneMagicSearch as a plugin source.
 
typedef struct _LinphoneRemoteContactDirectory LinphoneRemoteContactDirectory
 Object that represents a remote contact directory such as a LDAP or CardDAV server; used as a LinphoneMagicSearch source.
 
typedef struct _LinphoneFriendPhoneNumber LinphoneFriendPhoneNumber
 Object that represents a LinphoneFriend's phone number.
 
typedef struct _LinphoneFriendDevice LinphoneFriendDevice
 Object that represents a LinphoneFriend's device (name, trust level) for a given SIP address.
 

Functions

LinphoneRemoteContactDirectorylinphone_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. More...
 
LinphoneRemoteContactDirectorylinphone_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. More...
 
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. More...
 
void linphone_core_remove_remote_contact_directory (LinphoneCore *core, LinphoneRemoteContactDirectory *remoteContactDirectory)
 Removes a LinphoneRemoteContactDirectory object previously added to the Core. More...
 
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. More...
 
LinphoneCardDavParamslinphone_core_create_card_dav_params (LinphoneCore *core)
 Creates a new CardDAV server params object that may be used later by LinphoneMagicSearch to query contacts. More...
 
LinphoneCardDavParamslinphone_card_dav_params_clone (const LinphoneCardDavParams *params)
 Instantiates a new LinphoneCardDavParams with values from source. More...
 
LinphoneCardDavParamslinphone_card_dav_params_ref (LinphoneCardDavParams *params)
 Takes a reference on a LinphoneCardDavParams. More...
 
void linphone_card_dav_params_unref (LinphoneCardDavParams *params)
 Releases a LinphoneCardDavParams. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
LinphoneRemoteContactDirectorylinphone_remote_contact_directory_ref (LinphoneRemoteContactDirectory *params)
 Takes a reference on a LinphoneRemoteContactDirectory. More...
 
void linphone_remote_contact_directory_unref (LinphoneRemoteContactDirectory *params)
 Releases a LinphoneRemoteContactDirectory. More...
 
LinphoneRemoteContactDirectoryType linphone_remote_contact_directory_get_type (const LinphoneRemoteContactDirectory *params)
 Gets the type of remote contact directory (LDAP, CardDAV). More...
 
LinphoneCardDavParamslinphone_remote_contact_directory_get_card_dav_params (const LinphoneRemoteContactDirectory *params)
 Gets the CardDAV params if linphone_remote_contact_directory_get_type() returns CardDAV. More...
 
LinphoneLdapParamslinphone_remote_contact_directory_get_ldap_params (const LinphoneRemoteContactDirectory *params)
 Gets the LDAP params if linphone_remote_contact_directory_get_type() returns LDAP. More...
 
const char * linphone_remote_contact_directory_get_server_url (const LinphoneRemoteContactDirectory *params)
 Gets the configured remote contact directory server URL. More...
 
void linphone_remote_contact_directory_set_server_url (LinphoneRemoteContactDirectory *params, const char *server_url)
 Sets the server URL to use to reach the remote contact directory server. More...
 
unsigned int linphone_remote_contact_directory_get_limit (const LinphoneRemoteContactDirectory *params)
 Gets the maximum number of results to fetch, 0 means no limit. More...
 
void linphone_remote_contact_directory_set_limit (LinphoneRemoteContactDirectory *params, unsigned int limit)
 Sets the maximum number of results to fetch, 0 means no limit. More...
 
unsigned int linphone_remote_contact_directory_get_min_characters (const LinphoneRemoteContactDirectory *params)
 Gets the minimum number of characters to have before sending the query to the server. More...
 
void linphone_remote_contact_directory_set_min_characters (LinphoneRemoteContactDirectory *params, unsigned int min)
 Sets the minimum number of characters to have before sending the query to the server. More...
 
unsigned int linphone_remote_contact_directory_get_timeout (const LinphoneRemoteContactDirectory *params)
 Gets the timeout (in seconds) after which the query is abandonned. More...
 
void linphone_remote_contact_directory_set_timeout (LinphoneRemoteContactDirectory *params, unsigned int seconds)
 Sets the timeout (in seconds) after which the query is abandonned. More...
 

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
TheLinphoneCardDavParams object.
Returns
The list of vCard fields to make the query on using domain filter.

◆ 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
TheLinphoneCardDavParams 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
TheLinphoneCardDavParams 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
TheLinphoneCardDavParams object.
listthe list of vCard RFC fields to use to match the domain filter on.

◆ 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
TheLinphoneCardDavParams 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
TheLinphoneCardDavParams 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_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_get_card_dav_params()

LinphoneCardDavParams* linphone_remote_contact_directory_get_card_dav_params ( const LinphoneRemoteContactDirectory params)

Gets the CardDAV params if linphone_remote_contact_directory_get_type() returns CardDAV.

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

◆ linphone_remote_contact_directory_get_ldap_params()

LinphoneLdapParams* linphone_remote_contact_directory_get_ldap_params ( const LinphoneRemoteContactDirectory params)

Gets the LDAP params if linphone_remote_contact_directory_get_type() returns LDAP.

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

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

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

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

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

Gets the configured remote contact directory server URL.

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

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

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

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

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

◆ linphone_remote_contact_directory_ref()

LinphoneRemoteContactDirectory* linphone_remote_contact_directory_ref ( LinphoneRemoteContactDirectory params)

Takes a reference on a LinphoneRemoteContactDirectory.

Parameters
paramsThe LinphoneRemoteContactDirectory object.
Returns
the same LinphoneRemoteContactDirectory object.

◆ linphone_remote_contact_directory_set_limit()

void linphone_remote_contact_directory_set_limit ( LinphoneRemoteContactDirectory params,
unsigned int  limit 
)

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

Parameters
paramsThe 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 params,
unsigned int  min 
)

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

Parameters
paramsThe 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 params,
const char *  server_url 
)

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

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

◆ linphone_remote_contact_directory_set_timeout()

void linphone_remote_contact_directory_set_timeout ( LinphoneRemoteContactDirectory params,
unsigned int  seconds 
)

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

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

Releases a LinphoneRemoteContactDirectory.

Parameters
paramsThe LinphoneRemoteContactDirectory object.