Liblinphone: Accounts

Liblinphone 5.0.0

Functions
Accounts

## Functions
LinphoneAccountParams * | linphone_core_create_account_params (LinphoneCore *core)
| Create an account params using default values from Linphone core. More...
LinphoneAccount * | linphone_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...
LinphoneAccount * | linphone_core_get_account_by_idkey (LinphoneCore *core, const char *idkey)
| Search for a LinphoneAccount by it's idkey. More...
LinphoneAccount * | linphone_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

  core | LinphoneCore object
  account | the 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

  core | LinphoneCore 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

  core | LinphoneCore object
  params | LinphoneAccountParams 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

  core | LinphoneCore 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

  core | the LinphoneCore object
  idkey | An 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

  core | The 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

  core | LinphoneCore 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

  core | LinphoneCore object
  account | the 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

  core | LinphoneCore object
  account | The account to use as the default one.