com.gs.account.api

BaseAccountApi

All apis of Account

Supported Products:

All


Detail

Method

method description
public static List<SipAccount> getAllSipAccounts(); Get all sip accounts

Return:

return List all sip accounts

Supported Products:

All

public static List<SipAccount> getUsableSipAccounts(); Get all usable sip accounts.

Return:

return List all usable sip accounts

Supported Products:

All

public static BaseAccount getAccountById(int accountId); Get the account by account ID

Params:

accountId
The ID of account

Return:

return BaseAccount This object can be cast to its subclasses if you know the account type.

Supported Products:

All

public static boolean updateSipAccount(SipAccount sipAccount); Update account information of a SIP account. Take care that the empty value will overwrite the exist value.

Params:

sipAccount
The SIP account that to update. You can get the SIP account instance by {@link #getAccountById(int)} or get a new SIP instance by {@link SipAccount.Builder}.

Supported Products:

All

public static boolean addStatusListener(String pkgForDebug, IAccountStatusListener callback, int events, boolean notifyNow); Register account status listener and specify which event to observe.

Params:

pkgForDebug
The caller's pkg name/class name,be used for judging if repeat
callback
account status listener
events
which event {@link com.gs.account.context.AccountContext.ListenType}
notifyNow
When register success,immediately callback?

Return:

return boolean true:register success false:register fail

Supported Products:

All

public static boolean removeStatusListener(IAccountStatusListener callback); remove account listener

Params:

callback
The account listener which has been registered.

Return:

return boolean true: remove ok;false: remove fail

Supported Products:

All

public static boolean isSipAccount(int accountId); Check if it is sip account.

Params:

accountId
The id of account

Return:

return boolean true or false

Supported Products:

All


Member & Constant

Member description
public static final String API The tag name of BaseAccountApi,which is used in
{@link com.gs.common.client.ApiClient.Builder#addApi(String)}

Supported Products:

All