Liblinphone  5.4.0
Public Member Functions | List of all members
linphone::AccountManagerServices Class Reference

Creates and manage SIP user accounts remotely, using the REST API of the Flexisip Account Manager. More...

#include <account_manager_services.hh>

Inheritance diagram for linphone::AccountManagerServices:

Public Member Functions

LINPHONECXX_PUBLIC AccountManagerServices (void *ptr, bool takeRef=true)
 
LINPHONECXX_PUBLIC _LinphoneAccountManagerServices * cPtr ()
 
LINPHONECXX_PUBLIC std::string getLanguage () const
 Gets the configurer preferred language, if set. More...
 
LINPHONECXX_PUBLIC void setLanguage (const std::string &language)
 Sets the preferred language to get error messages from account manager (if supported, otherwise will be english). More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateDeleteDeviceRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::shared_ptr< const linphone::AccountDevice > &device)
 Requests to delete a device from the list of currently known devices. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateGetAccountCreationRequestTokenRequest ()
 Requests a an account creation request token that once validated using the URL returned by this method upon success, will allow you to call createGetAccountCreationTokenFromRequestTokenRequest() to obtain a valid account creation token. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateGetAccountCreationTokenFromRequestTokenRequest (const std::string &requestToken)
 Converts an account creation request token obtained by linphone_account_manager_services_request_account_creation_request_token to an account creation token. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateGetDevicesListRequest (const std::shared_ptr< const linphone::Address > &sipIdentity)
 Requests the list of devices currently known. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateLinkEmailToAccountUsingCodeRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::string &code)
 Validates the link between an email address and an account using a code received by email after calling createSendEmailLinkingCodeByEmailRequest() More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateLinkPhoneNumberToAccountUsingCodeRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::string &code)
 Validates the link between a phone number and an account using a code received by SMS after calling createSendPhoneNumberLinkingCodeBySmsRequest() More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateNewAccountUsingTokenRequest (const std::string &username, const std::string &password, const std::string &algorithm, const std::string &token)
 Creates an account using an account creation token, for example obtained using createSendAccountCreationTokenByPushRequest(). More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateSendAccountCreationTokenByPushRequest (const std::string &pnProvider, const std::string &pnParam, const std::string &pnPrid)
 Requests a push notification to be sent to device, containing a valid account creation token. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateSendEmailLinkingCodeByEmailRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::string &emailAddress)
 Requests a code to be sent to a given email address, that can be used later to associate said email to an account using createLinkEmailToAccountUsingCodeRequest(). More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequestcreateSendPhoneNumberLinkingCodeBySmsRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::string &phoneNumber)
 Requests a code to be sent to a given phone number, that can be used later to associate said phone number to an account using createLinkPhoneNumberToAccountUsingCodeRequest(). More...
 

Detailed Description

Creates and manage SIP user accounts remotely, using the REST API of the Flexisip Account Manager.

See also
https://gitlab.linphone.org/BC/public/flexisip-account-manager

Member Function Documentation

◆ createDeleteDeviceRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createDeleteDeviceRequest ( const std::shared_ptr< const linphone::Address > &  sipIdentity,
const std::shared_ptr< const linphone::AccountDevice > &  device 
)

Requests to delete a device from the list of currently known devices.

Parameters
sipIdentitythe SIP identity URI that identifies your account for which you want the devices list.
devicethe AccountDevice to delete.
Returns
the AccountManagerServicesRequest request object.

◆ createGetAccountCreationRequestTokenRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createGetAccountCreationRequestTokenRequest ( )

Requests a an account creation request token that once validated using the URL returned by this method upon success, will allow you to call createGetAccountCreationTokenFromRequestTokenRequest() to obtain a valid account creation token.

Once the account creation token is obtained, you can call createNewAccountUsingTokenRequest().

Returns
the AccountManagerServicesRequest request object.

◆ createGetAccountCreationTokenFromRequestTokenRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createGetAccountCreationTokenFromRequestTokenRequest ( const std::string &  requestToken)

Converts an account creation request token obtained by linphone_account_manager_services_request_account_creation_request_token to an account creation token.

The obtained token can be used to call createNewAccountUsingTokenRequest().

Parameters
requestTokenthe token obtained previously and validated using your web browser.
Returns
the AccountManagerServicesRequest request object.

◆ createGetDevicesListRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createGetDevicesListRequest ( const std::shared_ptr< const linphone::Address > &  sipIdentity)

Requests the list of devices currently known.

Parameters
sipIdentitythe SIP identity URI that identifies your account for which you want the devices list.
Returns
the AccountManagerServicesRequest request object.

◆ createLinkEmailToAccountUsingCodeRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createLinkEmailToAccountUsingCodeRequest ( const std::shared_ptr< const linphone::Address > &  sipIdentity,
const std::string &  code 
)

Validates the link between an email address and an account using a code received by email after calling createSendEmailLinkingCodeByEmailRequest()

Parameters
sipIdentitythe SIP identity URI that identifies the account to which you want to link the email address to.
codethe code received by email.
Returns
the AccountManagerServicesRequest request object.

◆ createLinkPhoneNumberToAccountUsingCodeRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createLinkPhoneNumberToAccountUsingCodeRequest ( const std::shared_ptr< const linphone::Address > &  sipIdentity,
const std::string &  code 
)

Validates the link between a phone number and an account using a code received by SMS after calling createSendPhoneNumberLinkingCodeBySmsRequest()

Parameters
sipIdentitythe SIP identity URI that identifies the account to which you want to link the phone number to.
codethe code received by SMS.
Returns
the AccountManagerServicesRequest request object.

◆ createNewAccountUsingTokenRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createNewAccountUsingTokenRequest ( const std::string &  username,
const std::string &  password,
const std::string &  algorithm,
const std::string &  token 
)

Creates an account using an account creation token, for example obtained using createSendAccountCreationTokenByPushRequest().

Parameters
usernamethe username of the newly created account.
passwordthe password to use for the newly created account.
algorithmthe algorithm to use to hash the password (must be either MD5 or SHA-256).
tokenthe account creation token obtained previously.
Returns
the AccountManagerServicesRequest request object.

◆ createSendAccountCreationTokenByPushRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createSendAccountCreationTokenByPushRequest ( const std::string &  pnProvider,
const std::string &  pnParam,
const std::string &  pnPrid 
)

Requests a push notification to be sent to device, containing a valid account creation token.

Provider, param & prid can be obtained from Core::getPushNotificationConfig(), but on iOS may need some modifications (depending on debug mode for example). Once the token is obtained, you can call createNewAccountUsingTokenRequest().

Parameters
pnProviderThe provider, for example "apns.dev".
pnParamThe parameters, for example "ABCD1234.org.linphone.phone.remote".
pnPridThe prid, also known as push token.
Returns
the AccountManagerServicesRequest request object.

◆ createSendEmailLinkingCodeByEmailRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createSendEmailLinkingCodeByEmailRequest ( const std::shared_ptr< const linphone::Address > &  sipIdentity,
const std::string &  emailAddress 
)

Requests a code to be sent to a given email address, that can be used later to associate said email to an account using createLinkEmailToAccountUsingCodeRequest().

Parameters
sipIdentitythe SIP identity URI that identifies the account to which you want to link the email address to.
emailAddressthe email address to which to send the code to.
Returns
the AccountManagerServicesRequest request object.

◆ createSendPhoneNumberLinkingCodeBySmsRequest()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createSendPhoneNumberLinkingCodeBySmsRequest ( const std::shared_ptr< const linphone::Address > &  sipIdentity,
const std::string &  phoneNumber 
)

Requests a code to be sent to a given phone number, that can be used later to associate said phone number to an account using createLinkPhoneNumberToAccountUsingCodeRequest().

Parameters
sipIdentitythe SIP identity URI that identifies the account to which you want to link the phone number to.
phoneNumberthe phone number to which to send the code by SMS.
Returns
the AccountManagerServicesRequest request object.

◆ getLanguage()

LINPHONECXX_PUBLIC std::string linphone::AccountManagerServices::getLanguage ( ) const

Gets the configurer preferred language, if set.

Returns
the language previously set, if any (otherwise nullptr).

◆ setLanguage()

LINPHONECXX_PUBLIC void linphone::AccountManagerServices::setLanguage ( const std::string &  language)

Sets the preferred language to get error messages from account manager (if supported, otherwise will be english).

Parameters
languageThe language (en, fr, etc...) you'd like to have error messages in (if possible).

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