AccountCreator

public class AccountCreator : LinphoneObject

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/.

  • Declaration

    Swift

    public static func getSwiftObject(cObject: OpaquePointer) -> AccountCreator
  • Declaration

    Swift

    public var getCobject: OpaquePointer? { get }
  • Enum describing the status of server request, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum Status : Int
  • Enum describing transport checking, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum TransportStatus : Int
  • Enum describing domain checking, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum DomainStatus : Int
  • Enum describing activation code checking, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum ActivationCodeStatus : Int
  • Enum describing language checking, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum LanguageStatus : Int
  • Enum describing password checking, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum PasswordStatus : Int
  • Enum describing email checking, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum EmailStatus : Int
  • Enum describing username checking, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum UsernameStatus : Int
  • Enum describing phone number checking, used by the AccountCreator.

    See more

    Declaration

    Swift

    public enum PhoneNumberStatus : Int
  • Declaration

    Swift

    public func addDelegate(delegate: AccountCreatorDelegate)
  • Declaration

    Swift

    public func removeDelegate(delegate: AccountCreatorDelegate)
  • Create a AccountCreator and set Linphone Request callbacks.

    Declaration

    Swift

    public static func create(core: Core) throws -> AccountCreator

    Parameters

    core

    The Core used for the XML-RPC communication

    Return Value

    The new AccountCreator object.

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

    Declaration

    Swift

    public var accountCreationRequestToken: String { get set }

    Return Value

    The token set, if any

  • Set the activation code.

    Declaration

    Swift

    public var activationCode: String { get set }

    Return Value

    The activation code of the AccountCreator.

  • Set the supported algorithm.

    Declaration

    Swift

    public var algorithm: String { get set }

    Return Value

    The algorithm of the AccountCreator.

  • Set the set_as_default property.

    Declaration

    Swift

    public var asDefault: Bool? { get set }

    Parameters

    setAsDefault

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

    Return Value

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

  • Get the current LinphoneAccountCreatorCbs object associated with a LinphoneAccountCreator.

    Declaration

    Swift

    public var currentDelegate: AccountCreatorDelegate? { get }

    Return Value

    The current LinphoneAccountCreatorCbs object associated with the LinphoneAccountCreator.

  • Set the display name.

    Declaration

    Swift

    public var displayName: String { get set }

    Return Value

    The display name of the AccountCreator.

  • Set the domain.

    Declaration

    Swift

    public var domain: String { get set }

    Return Value

    The domain of the AccountCreator.

  • Set the email.

    Declaration

    Swift

    public var email: String { get set }

    Return Value

    The email of the AccountCreator.

  • ha1

    Set the ha1.

    Declaration

    Swift

    public var ha1: String { get set }

    Return Value

    The ha1 of the AccountCreator.

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

    Declaration

    Swift

    public var language: String { get set }

    Return Value

    The language of the AccountCreator.

  • Set the password.

    Declaration

    Swift

    public var password: String { get set }

    Return Value

    The password of the AccountCreator.

  • Get the international prefix.

    Declaration

    Swift

    public var phoneCountryCode: String { get }

    Return Value

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

  • Get the RFC 3966 normalized phone number.

    Declaration

    Swift

    public var phoneNumber: String { get }

    Return Value

    The phone number of the AccountCreator.

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

    Declaration

    Swift

    public var pnParam: String { get set }

    Return Value

    The pn_param set, if any

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

    Declaration

    Swift

    public var pnPrid: String { get set }

    Return Value

    The pn_prid set, if any

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

    Declaration

    Swift

    public var pnProvider: String { get set }

    Return Value

    The pn_provider set, if any

  • Assign a proxy config pointer to the LinphoneAccountCreator.

    Declaration

    Swift

    public var proxyConfig: ProxyConfig? { get set }

    Parameters

    cfg

    The LinphoneProxyConfig to associate with the LinphoneAccountCreator.

  • Get the set_as_default property.

    Declaration

    Swift

    public var setAsDefault: Bool { get }

    Return Value

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

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

    Declaration

    Swift

    public var token: String { get set }

    Return Value

    The token set, if any

  • Set Transport.

    Declaration

    Swift

    public var transport: TransportType { get set }

    Return Value

    The TransportType of the creator.

  • Assign a user pointer to the LinphoneAccountCreator.

    Declaration

    Swift

    public var userData: UnsafeMutableRawPointer? { get set }

    Return Value

    The user pointer associated with the LinphoneAccountCreator.

  • Set the username.

    Declaration

    Swift

    public var username: String { get set }

    Return Value

    The username of the AccountCreator.

  • Send a request to activate an account on server.

    Declaration

    Swift

    public func activateAccount() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

  • Send a request to activate an alias.

    Declaration

    Swift

    public func activateAlias() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

  • Send a request to create an account on server.

    Declaration

    Swift

    public func createAccount() throws -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

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

    Declaration

    Swift

    public func createAccountInCore() throws -> Account

    Return Value

    A Account object if successful, nil otherwise.

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

    • deprecated: 05/05/2023 Use createAccountInCore() instead.

    Declaration

    Swift

    @available(*, deprecated)
    public func createProxyConfig() throws -> ProxyConfig

    Return Value

    A ProxyConfig object if successful, nil otherwise.

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

    Declaration

    Swift

    public func isAccountActivated() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

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

    Declaration

    Swift

    public func isAccountExist() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

  • Send a request to know if an account is linked.

    Declaration

    Swift

    public func isAccountLinked() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

  • Send a request to know if an alias is used.

    Declaration

    Swift

    public func isAliasUsed() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

  • Send a request to link an account to an alias.

    Declaration

    Swift

    public func linkAccount() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

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

    Declaration

    Swift

    public func loginLinphoneAccount() -> AccountCreator.Status

    Return Value

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

  • Send a request to recover an account.

    Declaration

    Swift

    public func recoverAccount() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

  • 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

    Declaration

    Swift

    public func requestAccountCreationRequestToken() -> AccountCreator.Status

    Return Value

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

  • 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

    Declaration

    Swift

    public func requestAccountCreationTokenUsingRequestToken() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

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

    Declaration

    Swift

    public func requestAuthToken() -> AccountCreator.Status

    Return Value

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

  • Reset the account creator entries like username, password, phone number…

    Declaration

    Swift

    public func reset()
  • Set the phone number normalized.

    Declaration

    Swift

    public func setPhoneNumber(phoneNumber: String?, countryCode: String?) -> UInt

    Parameters

    phoneNumber

    The phone number to set

    countryCode

    Country code to associate phone number with

    Return Value

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

  • Send a request to update an account.

    Declaration

    Swift

    public func updateAccount() -> AccountCreator.Status

    Return Value

    RequestOk if the request has been sent, RequestFailed otherwise

  • 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.

    Declaration

    Swift

    public func useTestAdminAccount()