linphone::AccountCreator Class Reference

The object used to configure an account on a server via XML-RPC, see https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Override%20account%20creator%20request/. More...

`#include <account_creator.hh>`

Inheritance diagram for linphone::AccountCreator:

## Public Types

enum class | TransportStatus { Ok = 0 , Unsupported = 1 }
| Enum describing transport checking, used by the AccountCreator. More...
enum class | DomainStatus { Ok = 0 , Invalid = 1 }
| Enum describing domain checking, used by the AccountCreator. More...
enum class | ActivationCodeStatus { Ok = 0 , TooShort = 1 , TooLong = 2 , InvalidCharacters = 3 }
| Enum describing activation code checking, used by the AccountCreator. More...
enum class | AlgoStatus { Ok = 0 , NotSupported = 1 }
| Enum describing algorithm checking, used by the AccountCreator. More...
enum class | LanguageStatus { Ok = 0 }
| Enum describing language checking, used by the AccountCreator. More...
enum class | PasswordStatus { Ok = 0 , TooShort = 1 , TooLong = 2 , InvalidCharacters = 3 , MissingCharacters = 4 }
| Enum describing password checking, used by the AccountCreator. More...
enum class | EmailStatus { Ok = 0 , Malformed = 1 , InvalidCharacters = 2 }
| Enum describing email checking, used by the AccountCreator. More...
enum class | UsernameStatus { Ok = 0 , TooShort = 1 , TooLong = 2 , InvalidCharacters = 3 , Invalid = 4 }
| Enum describing username checking, used by the AccountCreator. More...
enum class | Backend { XMLRPC = 0 , FlexiAPI = 1 }
| Enum describing backend used in the AccountCreator. More...
enum class | PhoneNumberStatus { Ok = 1 , TooShort = 2 , TooLong = 4 , InvalidCountryCode = 8 , Invalid = 16 }
| Enum describing phone number checking, used by the AccountCreator. More...

enum class

Status {
RequestOk = 0 ,
RequestFailed = 1 ,
MissingArguments = 2 ,
MissingCallbacks = 3 ,
AccountCreated = 4 ,
AccountNotCreated = 5 ,
AccountExist = 6 ,
AccountExistWithAlias = 7 ,
AccountNotExist = 8 ,
AliasIsAccount = 9 ,
AliasExist = 10 ,
AliasNotExist = 11 ,
AccountActivated = 12 ,
AccountAlreadyActivated = 13 ,
AccountNotActivated = 14 ,
AccountLinked = 15 ,
AccountNotLinked = 16 ,
ServerError = 17 ,
PhoneNumberInvalid = 18 ,
WrongActivationCode = 19 ,
PhoneNumberOverused = 20 ,
AlgoNotSupported = 21 ,
UnexpectedError = 22 ,
NotImplementedError = 23 ,
RequestNotAuthorized = 24 ,
RequestTooManyRequests = 25
}

| Enum describing the status of server request, used by the AccountCreator. More...

## Public Member Functions

LINPHONECXX_PUBLIC | AccountCreator (void *ptr, bool takeRef=true)
LINPHONECXX_PUBLIC _LinphoneAccountCreator * | cPtr ()
LINPHONECXX_PUBLIC void | addListener (const std::shared_ptr< AccountCreatorListener > &listener)
| Add an application listener to the AccountCreator instance.
LINPHONECXX_PUBLIC void | removeListener (const std::shared_ptr< AccountCreatorListener > &listener)
| Remove a previously added listener from the AccountCreator instance.
LINPHONECXX_PUBLIC std::string | getAccountCreationRequestToken () const
| Get the account creation request token received to be used to check user validation.
LINPHONECXX_PUBLIC void | setAccountCreationRequestToken (const std::string &token)
| Set the account creation request token received to be used to check user validation.
LINPHONECXX_PUBLIC std::string | getActivationCode () const
| Get the activation code.
LINPHONECXX_PUBLIC ActivationCodeStatus | setActivationCode (const std::string &activationCode)
| Set the activation code.
LINPHONECXX_PUBLIC std::string | getAlgorithm () const
| Get the algorithm configured in the account creator.
LINPHONECXX_PUBLIC AlgoStatus | setAlgorithm (const std::string &algorithm)
| Set the supported algorithm.
LINPHONECXX_PUBLIC Status | setAsDefault (bool setAsDefault)
| Set the set_as_default property.
LINPHONECXX_PUBLIC std::string | getDisplayName () const
| Get the display name.
LINPHONECXX_PUBLIC UsernameStatus | setDisplayName (const std::string &displayName)
| Set the display name.
LINPHONECXX_PUBLIC std::string | getDomain () const
| Get the domain.
LINPHONECXX_PUBLIC DomainStatus | setDomain (const std::string &domain)
| Set the domain.
LINPHONECXX_PUBLIC std::string | getEmail () const
| Get the email.
LINPHONECXX_PUBLIC EmailStatus | setEmail (const std::string &email)
| Set the email.
LINPHONECXX_PUBLIC std::string | getHa1 () const
| Get the ha1.
LINPHONECXX_PUBLIC PasswordStatus | setHa1 (const std::string &ha1)
| Set the ha1.
LINPHONECXX_PUBLIC std::string | getLanguage () const
| Get the language use in email of SMS.
LINPHONECXX_PUBLIC LanguageStatus | setLanguage (const std::string &lang)
| Set the language to use in email or SMS if supported.
LINPHONECXX_PUBLIC std::string | getPassword () const
| Get the password.
LINPHONECXX_PUBLIC PasswordStatus | setPassword (const std::string &password)
| Set the password.
LINPHONECXX_PUBLIC std::string | getPhoneCountryCode () const
| Get the international prefix.
LINPHONECXX_PUBLIC std::string | getPhoneNumber () const
| Get the RFC 3966 normalized phone number.
LINPHONECXX_PUBLIC std::string | getPnParam () const
| Get the param to be used by the backend to send the push notification to the device asking for an auth token.
LINPHONECXX_PUBLIC void | setPnParam (const std::string &pnParam)
| Set the param to be used by the backend to send the push notification to the device asking for an auth token.
LINPHONECXX_PUBLIC std::string | getPnPrid () const
| Get the prid to be used by the backend to send the push notification to the device asking for an auth token.
LINPHONECXX_PUBLIC void | setPnPrid (const std::string &pnPrid)
| Set the prid to be used by the backend to send the push notification to the device asking for an auth token.
LINPHONECXX_PUBLIC std::string | getPnProvider () const
| Get the provider to be used by the backend to send the push notification to the device asking for an auth token.
LINPHONECXX_PUBLIC void | setPnProvider (const std::string &pnProvider)
| Set the provider to be used by the backend to send the push notification to the device asking for an auth token.
LINPHONECXX_PUBLIC void | setProxyConfig (const std::shared_ptr< linphone::ProxyConfig > &cfg)
| Assign a proxy config pointer to the LinphoneAccountCreator.
LINPHONECXX_PUBLIC std::string | getRoute () const
| Get the route.
LINPHONECXX_PUBLIC Status | setRoute (const std::string &route)
| Set the route.
LINPHONECXX_PUBLIC bool | getSetAsDefault () const
| Get the set_as_default property.
LINPHONECXX_PUBLIC std::string | getToken () const
| Get the authentication token set (if any) to be used to authenticate next queries, if required.
LINPHONECXX_PUBLIC void | setToken (const std::string &token)
| Set the authentication token received by push notification to be used to authenticate next queries, if required.
LINPHONECXX_PUBLIC linphone::TransportType | getTransport () const
| Get Transport.
LINPHONECXX_PUBLIC TransportStatus | setTransport (linphone::TransportType transport)
| Set Transport.
LINPHONECXX_PUBLIC std::string | getUsername () const
| Get the username.
LINPHONECXX_PUBLIC UsernameStatus | setUsername (const std::string &username)
| Set the username.
LINPHONECXX_PUBLIC Status | activateAccount ()
| Send a request to activate an account on server.
LINPHONECXX_PUBLIC Status | activateAlias ()
| Send a request to activate an alias.
LINPHONECXX_PUBLIC Status | createAccount ()
| Send a request to create an account on server.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Account > | createAccountInCore () const
| Create and configure a Account and a AuthInfo from informations set in the AccountCreator.
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::shared_ptr< linphone::ProxyConfig > | createProxyConfig () const
| Create and configure a proxy config and a authentication info for an account creator.
LINPHONECXX_PUBLIC Status | createPushAccount ()
| Send a request to create a push account on server.
LINPHONECXX_PUBLIC Status | isAccountActivated ()
| Send a request to know if an account is activated on server.
LINPHONECXX_PUBLIC Status | isAccountExist ()
| Send a request to know the existence of account on server.
LINPHONECXX_PUBLIC Status | isAccountLinked ()
| Send a request to know if an account is linked.
LINPHONECXX_PUBLIC Status | isAliasUsed ()
| Send a request to know if an alias is used.
LINPHONECXX_PUBLIC Status | linkAccount ()
| Send a request to link an account to an alias.
LINPHONECXX_PUBLIC Status | loginLinphoneAccount ()
| Send a request to get the password & algorithm of an account using the confirmation key.
LINPHONECXX_PUBLIC Status | recoverAccount ()
| Send a request to recover an account.
LINPHONECXX_PUBLIC Status | requestAccountCreationRequestToken ()
| Request an account creation "request_token" to be used on account creations.
LINPHONECXX_PUBLIC Status | requestAccountCreationTokenUsingRequestToken ()
| Send a request to get a token to be used for account creation from a request_token.
LINPHONECXX_PUBLIC Status | requestAuthToken ()
| Request an auth token to be send by the backend by push notification.
LINPHONECXX_PUBLIC void | reset ()
| Reset the account creator entries like username, password, phone number...
LINPHONECXX_PUBLIC unsigned int | setPhoneNumber (const std::string &phoneNumber, const std::string &countryCode)
| Set the phone number normalized.
LINPHONECXX_PUBLIC Status | updateAccount ()
| Send a request to update an account.
LINPHONECXX_PUBLIC void | useTestAdminAccount ()
| Require the account creator to use special "test admin account".

## Static Public Member Functions

static LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountCreator > | create (const std::shared_ptr< linphone::Core > &core)
| Create a AccountCreator and set Linphone Request callbacks.

## Detailed Description

The object used to configure an account on a server via XML-RPC, see https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Override%20account%20creator%20request/.

## Member Enumeration Documentation

## ActivationCodeStatus

enum class linphone::AccountCreator::ActivationCodeStatus

strong

Enum describing activation code checking, used by the AccountCreator.

Enumerator
Ok | Activation code ok.
TooShort | Activation code too short.
TooLong | Activation code too long.
InvalidCharacters | Contain invalid characters.

## AlgoStatus

enum class linphone::AccountCreator::AlgoStatus

strong

Enum describing algorithm checking, used by the AccountCreator.

Enumerator
Ok | Algorithm ok.
NotSupported | Algorithm not supported.

## Backend

enum class linphone::AccountCreator::Backend

strong

Enum describing backend used in the AccountCreator.

Enumerator
XMLRPC | XMLRPC Backend.
FlexiAPI | FlexiAPI Backend.

## DomainStatus

enum class linphone::AccountCreator::DomainStatus

strong

Enum describing domain checking, used by the AccountCreator.

Enumerator
Ok | Domain ok.
Invalid | Domain invalid.

## EmailStatus

enum class linphone::AccountCreator::EmailStatus

strong

Enum describing email checking, used by the AccountCreator.

Enumerator
Ok | Email ok.
Malformed | Email malformed.
InvalidCharacters | Contain invalid characters.

## LanguageStatus

enum class linphone::AccountCreator::LanguageStatus

strong

Enum describing language checking, used by the AccountCreator.

Enumerator
Ok | Language ok.

## PasswordStatus

enum class linphone::AccountCreator::PasswordStatus

strong

Enum describing password checking, used by the AccountCreator.

Enumerator
Ok | Password ok.
TooShort | Password too short.
TooLong | Password too long.
InvalidCharacters | Contain invalid characters.
MissingCharacters | Missing specific characters.

## PhoneNumberStatus

enum class linphone::AccountCreator::PhoneNumberStatus

strong

Enum describing phone number checking, used by the AccountCreator.

Enumerator
Ok | Phone number ok.
TooShort | Phone number too short.
TooLong | Phone number too long.
InvalidCountryCode | Country code invalid.
Invalid | Phone number invalid.

## Status

enum class linphone::AccountCreator::Status

strong

Enum describing the status of server request, used by the AccountCreator.

Enumerator
RequestOk | Request status.
RequestFailed | Request failed.
MissingArguments | Request failed due to missing argument(s)
MissingCallbacks | Request failed due to missing callback(s)
AccountCreated | Account status.
AccountNotCreated | Account not created.
AccountExist | Account exist.
AccountExistWithAlias | Account exist with alias.
AccountNotExist | Account not exist.
AliasIsAccount | Account was created with Alias.
AliasExist | Alias exist.
AliasNotExist | Alias not exist.
AccountActivated | Account activated.
AccountAlreadyActivated | Account already activated.
AccountNotActivated | Account not activated.
AccountLinked | Account linked.
AccountNotLinked | Account not linked.
ServerError | Server.
PhoneNumberInvalid | Error cannot send SMS.
WrongActivationCode | Error key doesn't match.
PhoneNumberOverused | Error too many SMS sent.
AlgoNotSupported | Error algo isn't MD5 or SHA-256.
UnexpectedError | Generic error.
NotImplementedError | This API isn't implemented in the current backend.
RequestNotAuthorized | Request has been denied, probably due to invalid auth token.
RequestTooManyRequests | Request has been denied, due to too many requests sent in given period.

## TransportStatus

enum class linphone::AccountCreator::TransportStatus

strong

Enum describing transport checking, used by the AccountCreator.

Enumerator
Ok | Transport ok.
Unsupported | Transport invalid.

## UsernameStatus

enum class linphone::AccountCreator::UsernameStatus

strong

Enum describing username checking, used by the AccountCreator.

Enumerator
Ok | Username ok.
TooShort | Username too short.
TooLong | Username too long.
InvalidCharacters | Contain invalid characters.
Invalid | Invalid username.

## Member Function Documentation

## activateAccount()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::activateAccount | ( |  | ) |

Send a request to activate an account on server.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## activateAlias()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::activateAlias | ( |  | ) |

Send a request to activate an alias.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## addListener()

LINPHONECXX_PUBLIC void linphone::AccountCreator::addListener | ( | const std::shared_ptr< AccountCreatorListener > & | listener | ) |

Add an application listener to the AccountCreator instance.

Parameters

  listener | the application listener

## create()

static LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountCreator > linphone::AccountCreator::create | ( | const std::shared_ptr< linphone::Core > & | core | ) |

static

Create a AccountCreator and set Linphone Request callbacks.

Parameters

  core | The Core used for the XML-RPC communication

Returns
  The new AccountCreator object.

## createAccount()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::createAccount | ( |  | ) |

Send a request to create an account on server.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## createAccountInCore()

LINPHONECXX_PUBLIC std::shared_ptr< linphone::Account > linphone::AccountCreator::createAccountInCore | ( |  | ) | const

Create and configure a Account and a AuthInfo from informations set in the AccountCreator.

Returns
  A Account object if successful, nullptr otherwise.

## createProxyConfig()

LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::shared_ptr< linphone::ProxyConfig > linphone::AccountCreator::createProxyConfig | ( |  | ) | const

Create and configure a proxy config and a authentication info for an account creator.

Returns
  A ProxyConfig object if successful, nullptr otherwise.

Deprecated
  05/05/2023 Use createAccountInCore() instead.

## createPushAccount()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::createPushAccount | ( |  | ) |

Send a request to create a push account on server.

Push accounts are used in account dependent situation when account cannot send push notifications. A username and password are automatically generated, an account is automatically activated.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## getAccountCreationRequestToken()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getAccountCreationRequestToken | ( |  | ) | const

Get the account creation request token received to be used to check user validation.

Returns
  The token set, if any

## getActivationCode()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getActivationCode | ( |  | ) | const

Get the activation code.

Returns
  The activation code of the AccountCreator.

## getAlgorithm()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getAlgorithm | ( |  | ) | const

Get the algorithm configured in the account creator.

Returns
  The algorithm of the AccountCreator.

## getDisplayName()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getDisplayName | ( |  | ) | const

Get the display name.

Returns
  The display name of the AccountCreator.

## getDomain()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getDomain | ( |  | ) | const

Get the domain.

Returns
  The domain of the AccountCreator.

## getEmail()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getEmail | ( |  | ) | const

Get the email.

Returns
  The email of the AccountCreator.

## getHa1()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getHa1 | ( |  | ) | const

Get the ha1.

Returns
  The ha1 of the AccountCreator.

## getLanguage()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getLanguage | ( |  | ) | const

Get the language use in email of SMS.

Returns
  The language of the AccountCreator.

## getPassword()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getPassword | ( |  | ) | const

Get the password.

Returns
  The password of the AccountCreator.

## getPhoneCountryCode()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getPhoneCountryCode | ( |  | ) | const

Get the international prefix.

Returns
  The international prefix (or phone country code) of the AccountCreator.

## getPhoneNumber()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getPhoneNumber | ( |  | ) | const

Get the RFC 3966 normalized phone number.

Returns
  The phone number of the AccountCreator.

## getPnParam()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getPnParam | ( |  | ) | const

Get the param to be used by the backend to send the push notification to the device asking for an auth token.

Returns
  The pn_param set, if any

## getPnPrid()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getPnPrid | ( |  | ) | const

Get the prid to be used by the backend to send the push notification to the device asking for an auth token.

Returns
  The pn_prid set, if any

## getPnProvider()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getPnProvider | ( |  | ) | const

Get the provider to be used by the backend to send the push notification to the device asking for an auth token.

Returns
  The pn_provider set, if any

## getRoute()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getRoute | ( |  | ) | const

Get the route.

Returns
  The route of the AccountCreator.

## getSetAsDefault()

LINPHONECXX_PUBLIC bool linphone::AccountCreator::getSetAsDefault | ( |  | ) | const

Get the set_as_default property.

Returns
  true if account will be set as default, false otherwise.

## getToken()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getToken | ( |  | ) | const

Get the authentication token set (if any) to be used to authenticate next queries, if required.

Returns
  The token set, if any

## getTransport()

LINPHONECXX_PUBLIC linphone::TransportType linphone::AccountCreator::getTransport | ( |  | ) | const

Get Transport.

Returns
  The TransportType of the creator.

## getUsername()

LINPHONECXX_PUBLIC std::string linphone::AccountCreator::getUsername | ( |  | ) | const

Get the username.

Returns
  The username of the AccountCreator.

## isAccountActivated()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::isAccountActivated | ( |  | ) |

Send a request to know if an account is activated on server.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## isAccountExist()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::isAccountExist | ( |  | ) |

Send a request to know the existence of account on server.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## isAccountLinked()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::isAccountLinked | ( |  | ) |

Send a request to know if an account is linked.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## isAliasUsed()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::isAliasUsed | ( |  | ) |

Send a request to know if an alias is used.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## linkAccount()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::linkAccount | ( |  | ) |

Send a request to link an account to an alias.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## loginLinphoneAccount()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::loginLinphoneAccount | ( |  | ) |

Send a request to get the password & algorithm of an account using the confirmation key.

Returns
  Status::RequestOk if everything is OK, or a specific error otherwise.

## recoverAccount()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::recoverAccount | ( |  | ) |

Send a request to recover an account.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## removeListener()

LINPHONECXX_PUBLIC void linphone::AccountCreator::removeListener | ( | const std::shared_ptr< AccountCreatorListener > & | listener | ) |

Remove a previously added listener from the AccountCreator instance.

Parameters

  listener | the application listener

## requestAccountCreationRequestToken()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::requestAccountCreationRequestToken | ( |  | ) |

Request an account creation "request_token" to be used on account creations.

The request_token is retrieved from the callback linphone_account_creator_cbs_get_account_creation_request_token

Returns
  Status::RequestOk if everything is OK, or a specific error otherwise.

## requestAccountCreationTokenUsingRequestToken()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::requestAccountCreationTokenUsingRequestToken | ( |  | ) |

Send a request to get a token to be used for account creation from a request_token.

The token is retrieved from the callback linphone_account_creator_cbs_get_account_creation_token_using_request_token

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## requestAuthToken()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::requestAuthToken | ( |  | ) |

Request an auth token to be send by the backend by push notification.

Returns
  Status::RequestOk if everything is OK, or a specific error otherwise.

## setAccountCreationRequestToken()

LINPHONECXX_PUBLIC void linphone::AccountCreator::setAccountCreationRequestToken | ( | const std::string & | token | ) |

Set the account creation request token received to be used to check user validation.

Parameters

  token | The token to set

## setActivationCode()

LINPHONECXX_PUBLIC ActivationCodeStatus linphone::AccountCreator::setActivationCode | ( | const std::string & | activationCode | ) |

Set the activation code.

Parameters

  activationCode | The activation code to set

Returns
  ActivationCodeStatus::Ok if everything is OK, or a specific error otherwise.

## setAlgorithm()

LINPHONECXX_PUBLIC AlgoStatus linphone::AccountCreator::setAlgorithm | ( | const std::string & | algorithm | ) |

Set the supported algorithm.

Parameters

  algorithm | The algorithm to use

Returns
  LinphoneAccountCreatorAlgoStatusOk if everything is OK, or a specific error otherwise.

## setAsDefault()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::setAsDefault | ( | bool | setAsDefault | ) |

Set the set_as_default property.

Parameters

  setAsDefault | true for the created proxy config to be set as default in Core, false otherwise

Returns
  Status::RequestOk if everything is OK, or a specific error otherwise.

## setDisplayName()

LINPHONECXX_PUBLIC UsernameStatus linphone::AccountCreator::setDisplayName | ( | const std::string & | displayName | ) |

Set the display name.

Parameters

  displayName | The display name to set

Returns
  UsernameStatus::Ok if everything is OK, or a specific error otherwise.

## setDomain()

LINPHONECXX_PUBLIC DomainStatus linphone::AccountCreator::setDomain | ( | const std::string & | domain | ) |

Set the domain.

Parameters

  domain | The domain to set

Returns
  DomainStatus::Ok if everything is OK, or a specific error otherwise.

## setEmail()

LINPHONECXX_PUBLIC EmailStatus linphone::AccountCreator::setEmail | ( | const std::string & | email | ) |

Set the email.

Parameters

  email | The email to set

Returns
  EmailStatus::Ok if everything is OK, or a specific error otherwise.

## setHa1()

LINPHONECXX_PUBLIC PasswordStatus linphone::AccountCreator::setHa1 | ( | const std::string & | ha1 | ) |

Set the ha1.

Parameters

  ha1 | The ha1 to set

Returns
  PasswordStatus::Ok if everything is OK, or a specific error otherwise.

## setLanguage()

LINPHONECXX_PUBLIC LanguageStatus linphone::AccountCreator::setLanguage | ( | const std::string & | lang | ) |

Set the language to use in email or SMS if supported.

Parameters

  lang | The language to use

Returns
  LanguageStatus::Ok if everything is OK, or a specific error otherwise.

## setPassword()

LINPHONECXX_PUBLIC PasswordStatus linphone::AccountCreator::setPassword | ( | const std::string & | password | ) |

Set the password.

Parameters

  password | The password to set

Returns
  PasswordStatus::Ok if everything is OK, or specific(s) error(s) otherwise.

## setPhoneNumber()

LINPHONECXX_PUBLIC unsigned int linphone::AccountCreator::setPhoneNumber | ( | const std::string & | phoneNumber,
|  | const std::string & | countryCode )

Set the phone number normalized.

Parameters

  phoneNumber | The phone number to set
  countryCode | Country code to associate phone number with

Returns
  PhoneNumberStatus::Ok if everything is OK, or specific(s) error(s) otherwise.

## setPnParam()

LINPHONECXX_PUBLIC void linphone::AccountCreator::setPnParam | ( | const std::string & | pnParam | ) |

Set the param to be used by the backend to send the push notification to the device asking for an auth token.

Parameters

  pnParam | The pn_param to set

## setPnPrid()

LINPHONECXX_PUBLIC void linphone::AccountCreator::setPnPrid | ( | const std::string & | pnPrid | ) |

Set the prid to be used by the backend to send the push notification to the device asking for an auth token.

Parameters

  pnPrid | The pn_prid to set

## setPnProvider()

LINPHONECXX_PUBLIC void linphone::AccountCreator::setPnProvider | ( | const std::string & | pnProvider | ) |

Set the provider to be used by the backend to send the push notification to the device asking for an auth token.

Parameters

  pnProvider | The pn_provider to set

## setProxyConfig()

LINPHONECXX_PUBLIC void linphone::AccountCreator::setProxyConfig | ( | const std::shared_ptr< linphone::ProxyConfig > & | cfg | ) |

Assign a proxy config pointer to the LinphoneAccountCreator.

Parameters

  cfg | The LinphoneProxyConfig to associate with the LinphoneAccountCreator.

## setRoute()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::setRoute | ( | const std::string & | route | ) |

Set the route.

Parameters

  route | The route to set

Returns
  Status::RequestOk if everything is OK, or a specific error otherwise.

## setToken()

LINPHONECXX_PUBLIC void linphone::AccountCreator::setToken | ( | const std::string & | token | ) |

Set the authentication token received by push notification to be used to authenticate next queries, if required.

Parameters

  token | The token to set

## setTransport()

LINPHONECXX_PUBLIC TransportStatus linphone::AccountCreator::setTransport | ( | linphone::TransportType | transport | ) |

Set Transport.

Parameters

  transport | The TransportType to set

Returns
  TransportStatus::Ok if everything is OK, or a specific error otherwise.

## setUsername()

LINPHONECXX_PUBLIC UsernameStatus linphone::AccountCreator::setUsername | ( | const std::string & | username | ) |

Set the username.

Parameters

  username | The username to set

Returns
  UsernameStatus::Ok if everything is OK, or a specific error otherwise.

## updateAccount()

LINPHONECXX_PUBLIC Status linphone::AccountCreator::updateAccount | ( |  | ) |

Send a request to update an account.

Returns
  Status::RequestOk if the request has been sent, Status::RequestFailed otherwise

## useTestAdminAccount()

LINPHONECXX_PUBLIC void linphone::AccountCreator::useTestAdminAccount | ( |  | ) |

Require the account creator to use special "test admin account".

Warning
  The "test admin account" is a special feature required for automated test, and requires the APP_EVERYONE_IS_ADMIN property to be enabled on the remote Flexisip Account Manager (FlexiAPI). This feature must never be turned on for a production-stage app.

The documentation for this class was generated from the following file:

- account_creator.hh