Liblinphone  5.0.0
Functions
Accounts

Functions

LinphoneAccountParamslinphone_core_create_account_params (LinphoneCore *core)
 Create an account params using default values from Linphone core. More...
 
LinphoneAccountlinphone_core_create_account (LinphoneCore *core, LinphoneAccountParams *params)
 Create an account using given parameters, see linphone_core_create_account_params(). More...
 
LinphoneStatus linphone_core_add_account (LinphoneCore *core, LinphoneAccount *account)
 Add an account. More...
 
void linphone_core_clear_accounts (LinphoneCore *core)
 Erase all account from config. More...
 
void linphone_core_remove_account (LinphoneCore *core, LinphoneAccount *account)
 Removes an account. More...
 
const bctbx_list_t * linphone_core_get_account_list (const LinphoneCore *core)
 Returns an unmodifiable list of entered accounts. More...
 
LinphoneAccountlinphone_core_get_account_by_idkey (LinphoneCore *core, const char *idkey)
 Search for a LinphoneAccount by it's idkey. More...
 
LinphoneAccountlinphone_core_get_default_account (const LinphoneCore *core)
 Returns the default account, that is the one used to determine the current identity. More...
 
void linphone_core_set_default_account (LinphoneCore *core, LinphoneAccount *account)
 Sets the default account. More...
 

Detailed Description

Function Documentation

◆ linphone_core_add_account()

LinphoneStatus linphone_core_add_account ( LinphoneCore core,
LinphoneAccount account 
)

Add an account.

This will start registration on the proxy, if registration is enabled.

Parameters
coreLinphoneCore object
accountthe LinphoneAccount to add
Returns
0 if successful, -1 otherwise

◆ linphone_core_clear_accounts()

void linphone_core_clear_accounts ( LinphoneCore core)

Erase all account from config.

Parameters
coreLinphoneCore object

◆ linphone_core_create_account()

LinphoneAccount* linphone_core_create_account ( LinphoneCore core,
LinphoneAccountParams params 
)

Create an account using given parameters, see linphone_core_create_account_params().

Parameters
coreLinphoneCore object
paramsLinphoneAccountParams object
Returns
LinphoneAccount with default values set

◆ linphone_core_create_account_params()

LinphoneAccountParams* linphone_core_create_account_params ( LinphoneCore core)

Create an account params using default values from Linphone core.

Parameters
coreLinphoneCore object
Returns
LinphoneAccountParams with default values set

◆ linphone_core_get_account_by_idkey()

LinphoneAccount* linphone_core_get_account_by_idkey ( LinphoneCore core,
const char *  idkey 
)

Search for a LinphoneAccount by it's idkey.

Parameters
corethe LinphoneCore object
idkeyAn arbitrary idkey string associated to an account.
Returns
the LinphoneAccount object for the given idkey value, or NULL if none found

◆ linphone_core_get_account_list()

const bctbx_list_t* linphone_core_get_account_list ( const LinphoneCore core)

Returns an unmodifiable list of entered accounts.

Parameters
coreThe LinphoneCore object
Returns

◆ linphone_core_get_default_account()

LinphoneAccount* linphone_core_get_default_account ( const LinphoneCore core)

Returns the default account, that is the one used to determine the current identity.

Parameters
coreLinphoneCore object
Returns
The default account.

◆ linphone_core_remove_account()

void linphone_core_remove_account ( LinphoneCore core,
LinphoneAccount account 
)

Removes an account.

LinphoneCore will then automatically unregister and place the account on a deleted list. For that reason, a removed account does NOT need to be freed.

Parameters
coreLinphoneCore object
accountthe LinphoneAccount to remove

◆ linphone_core_set_default_account()

void linphone_core_set_default_account ( LinphoneCore core,
LinphoneAccount account 
)

Sets the default account.

This default account must be part of the list of already entered LinphoneAccount. Toggling it as default will make LinphoneCore use the identity associated with the account in all incoming and outgoing calls.

Parameters
coreLinphoneCore object
accountThe account to use as the default one.