Package org.linphone.core
Interface AccountCreator
public interface AccountCreator
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/.
https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Override%20account%20creator%20request/.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
static enum
static enum
static enum
static enum
static enum
static enum
static enum
static enum
static enum
static enum
-
Method Summary
Modifier and TypeMethodDescriptionSend a request to activate an account on server.Send a request to activate an alias.void
addListener
(AccountCreatorListener listener) Create aAccountCreator
and set Linphone Request callbacks.Send a request to create an account on server.Deprecated.Send a request to create a push account on server.Get the account creation request token received to be used to check user
validation.Get the activation code.Get the algorithm configured in the account creator.Get the display name.Get the domain.getEmail()
Get the email.getHa1()
Get the ha1.Get the language use in email of SMS.long
Gets the native pointer used by this class to make native method calls.Get the password.Get the international prefix.Get the RFC 3966 normalized phone number.Get the param to be used by the backend to send the push notification to the
device asking for an auth token.Get the prid to be used by the backend to send the push notification to the
device asking for an auth token.Get the provider to be used by the backend to send the push notification to the
device asking for an auth token.getRoute()
Get the route.boolean
Get the set_as_default property.getToken()
Get the authentication token set (if any) to be used to authenticate next
queries, if required.Get Transport.Gets the object stored in this object user's dataGet the username.Send a request to know if an account is activated on server.Send a request to know the existence of account on server.Send a request to know if an account is linked.Send a request to know if an alias is used.Send a request to link an account to an alias.Send a request to get the password & algorithm of an account using the
confirmation key.Send a request to recover an account.void
removeListener
(AccountCreatorListener listener) Request an account creation "request_token" to be used on account creations.Send a request to get a token to be used for account creation from a
request_token.Request an auth token to be send by the backend by push notification.void
reset()
Reset the account creator entries like username, password, phone number...void
Set the account creation request token received to be used to check user
validation.setActivationCode
(String activationCode) Set the activation code.setAlgorithm
(String algorithm) Set the supported algorithm.setAsDefault
(boolean setAsDefault) Set the set_as_default property.setDisplayName
(String displayName) Set the display name.Set the domain.Set the email.Set the ha1.setLanguage
(String lang) Set the language to use in email or SMS if supported.setPassword
(String password) Set the password.int
setPhoneNumber
(String phoneNumber, String countryCode) Set the phone number normalized.void
setPnParam
(String pnParam) Set the param to be used by the backend to send the push notification to the
device asking for an auth token.void
Set the prid to be used by the backend to send the push notification to the
device asking for an auth token.void
setPnProvider
(String pnProvider) Set the provider to be used by the backend to send the push notification to the
device asking for an auth token.void
Assign a proxy config pointer to the LinphoneAccountCreator.Set the route.void
Set the authentication token received by push notification to be used to
authenticate next queries, if required.setTransport
(TransportType transport) Set Transport.void
setUserData
(Object data) Sets the object to store in this object user's datasetUsername
(String username) Set the username.toString()
Send a request to update an account.void
Require the account creator to use special "test admin account".
-
Method Details
-
getAccountCreationRequestToken
Get the account creation request token received to be used to check user
validation.
- Returns:
- The token set, if any
-
setAccountCreationRequestToken
Set the account creation request token received to be used to check user
validation.
- Parameters:
token
- The token to set
-
getActivationCode
Get the activation code.
- Returns:
- The activation code of the
AccountCreator
.
-
setActivationCode
Set the activation code.
- Parameters:
activationCode
- The activation code to set- Returns:
AccountCreator.ActivationCodeStatus.Ok
if everything is OK, or a specific
error otherwise.
-
getAlgorithm
Get the algorithm configured in the account creator.
- Returns:
- The algorithm of the
AccountCreator
.
-
setAlgorithm
Set the supported algorithm.
- Parameters:
algorithm
- The algorithm to use- Returns:
- LinphoneAccountCreatorAlgoStatusOk if everything is OK, or a specific
error otherwise.
-
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:
AccountCreator.Status.RequestOk
if everything is OK, or a specific error
otherwise.
-
getDisplayName
Get the display name.
- Returns:
- The display name of the
AccountCreator
.
-
setDisplayName
Set the display name.
- Parameters:
displayName
- The display name to set- Returns:
AccountCreator.UsernameStatus.Ok
if everything is OK, or a specific error
otherwise.
-
getDomain
Get the domain.
- Returns:
- The domain of the
AccountCreator
.
-
setDomain
Set the domain.
- Parameters:
domain
- The domain to set- Returns:
AccountCreator.DomainStatus.Ok
if everything is OK, or a specific error
otherwise.
-
getEmail
Get the email.
- Returns:
- The email of the
AccountCreator
.
-
setEmail
Set the email.
- Parameters:
email
- The email to set- Returns:
AccountCreator.EmailStatus.Ok
if everything is OK, or a specific error
otherwise.
-
getHa1
Get the ha1.
- Returns:
- The ha1 of the
AccountCreator
.
-
setHa1
Set the ha1.
- Parameters:
ha1
- The ha1 to set- Returns:
AccountCreator.PasswordStatus.Ok
if everything is OK, or a specific error
otherwise.
-
getLanguage
Get the language use in email of SMS.
- Returns:
- The language of the
AccountCreator
.
-
setLanguage
Set the language to use in email or SMS if supported.
- Parameters:
lang
- The language to use- Returns:
AccountCreator.LanguageStatus.Ok
if everything is OK, or a specific error
otherwise.
-
getPassword
Get the password.
- Returns:
- The password of the
AccountCreator
.
-
setPassword
Set the password.
- Parameters:
password
- The password to set- Returns:
AccountCreator.PasswordStatus.Ok
if everything is OK, or specific(s) error(s)
otherwise.
-
getPhoneCountryCode
Get the international prefix.
- Returns:
- The international prefix (or phone country code) of the
AccountCreator
.
-
getPhoneNumber
Get the RFC 3966 normalized phone number.
- Returns:
- The phone number of the
AccountCreator
.
-
getPnParam
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
-
setPnParam
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
-
getPnPrid
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
-
setPnPrid
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
-
getPnProvider
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
-
setPnProvider
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
Assign a proxy config pointer to the LinphoneAccountCreator.
- Parameters:
cfg
- The LinphoneProxyConfig to associate with the
LinphoneAccountCreator.
-
getRoute
Get the route.
- Returns:
- The route of the
AccountCreator
.
-
setRoute
Set the route.
- Parameters:
route
- The route to set- Returns:
AccountCreator.Status.RequestOk
if everything is OK, or a specific error
otherwise.
-
getSetAsDefault
boolean getSetAsDefault()Get the set_as_default property.
- Returns:
- true if account will be set as default, false otherwise.
-
getToken
Get the authentication token set (if any) to be used to authenticate next
queries, if required.
- Returns:
- The token set, if any
-
setToken
Set the authentication token received by push notification to be used to
authenticate next queries, if required.
- Parameters:
token
- The token to set
-
getTransport
TransportType getTransport()Get Transport.
- Returns:
- The
TransportType
of the creator.
-
setTransport
Set Transport.
- Parameters:
transport
- TheTransportType
to set- Returns:
AccountCreator.TransportStatus.Ok
if everything is OK, or a specific error
otherwise.
-
getUsername
Get the username.
- Returns:
- The username of the
AccountCreator
.
-
setUsername
Set the username.
- Parameters:
username
- The username to set- Returns:
AccountCreator.UsernameStatus.Ok
if everything is OK, or a specific error
otherwise.
-
activateAccount
AccountCreator.Status activateAccount()Send a request to activate an account on server.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
activateAlias
AccountCreator.Status activateAlias()Send a request to activate an alias.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
createAccount
AccountCreator.Status createAccount()Send a request to create an account on server.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
createAccountInCore
- Returns:
- A
Account
object if successful, null otherwise.
-
createProxyConfig
Deprecated.05/05/2023 UsecreateAccountInCore()
instead.Create and configure a proxy config and a authentication info for an account
creator.
- Returns:
- A
ProxyConfig
object if successful, null otherwise.
-
createPushAccount
AccountCreator.Status 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:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
isAccountActivated
AccountCreator.Status isAccountActivated()Send a request to know if an account is activated on server.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
isAccountExist
AccountCreator.Status isAccountExist()Send a request to know the existence of account on server.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
isAccountLinked
AccountCreator.Status isAccountLinked()Send a request to know if an account is linked.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
isAliasUsed
AccountCreator.Status isAliasUsed()Send a request to know if an alias is used.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
linkAccount
AccountCreator.Status linkAccount()Send a request to link an account to an alias.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
loginLinphoneAccount
AccountCreator.Status loginLinphoneAccount()Send a request to get the password & algorithm of an account using the
confirmation key.
- Returns:
AccountCreator.Status.RequestOk
if everything is OK, or a specific error
otherwise.
-
recoverAccount
AccountCreator.Status recoverAccount()Send a request to recover an account.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
requestAccountCreationRequestToken
AccountCreator.Status 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:
AccountCreator.Status.RequestOk
if everything is OK, or a specific error
otherwise.
-
requestAccountCreationTokenUsingRequestToken
AccountCreator.Status 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:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
requestAuthToken
AccountCreator.Status requestAuthToken()Request an auth token to be send by the backend by push notification.
- Returns:
AccountCreator.Status.RequestOk
if everything is OK, or a specific error
otherwise.
-
reset
void reset()Reset the account creator entries like username, password, phone number...
-
setPhoneNumber
Set the phone number normalized.
- Parameters:
phoneNumber
- The phone number to setcountryCode
- Country code to associate phone number with- Returns:
AccountCreator.PhoneNumberStatus.Ok
if everything is OK, or specific(s)
error(s) otherwise.
-
updateAccount
AccountCreator.Status updateAccount()Send a request to update an account.
- Returns:
AccountCreator.Status.RequestOk
if the request has been sent,AccountCreator.Status.RequestFailed
otherwise
-
useTestAdminAccount
void 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. -
create
- Parameters:
core
- TheCore
used for the XML-RPC communication- Returns:
- The new
AccountCreator
object.
-
addListener
-
removeListener
-
setUserData
Sets the object to store in this object user's data- Parameters:
data
- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-
createAccountInCore()
instead.