com.gs.account.api

BaseAccountApi

帐号相关的接口

支持的产品:

All


详情

方法

方法 描述
public static List<SipAccount> getAllSipAccounts(); 获取所有的sip帐号(不检验是否注册/激活)

返回值:

return List 帐号列表

支持的产品:

All

public static List<SipAccount> getUsableSipAccounts(); 获取可用的Sip帐号(检验是否注册/激活)

返回值:

return List 帐号列表

支持的产品:

All

public static BaseAccount getAccountById(int accountId); 根据帐号编号获取帐号

参数:

accountId
帐号编号

返回值:

return 返回BaseAccount类型的帐号,可根据帐号类型进行强转型

支持的产品:

All

public static boolean updateSipAccount(SipAccount sipAccount); 更新SIP帐号信息。注意空值会导致原有数值清除。

参数:

sipAccount
需要更新的SIP帐号信息。SIP实例可以通过{@link #getAccountById(int)}获取或者通过 {@link SipAccount.Builder} 重新创建一个。

支持的产品:

All

public static boolean addStatusListener(String pkgForDebug, IAccountStatusListener callback, int events, boolean notifyNow); 注册监听,关注线路注册、激活等相关状态的变化

参数:

pkgForDebug
接口使用者的包名/类名信息,用于判断是否重复注册
callback
回调方法,当关心的信息发生变化时将被回调
events
要监听哪些状态的变化,比如: SIP_ACCOUNT_STATUS|GS_ACCOUNT_STATUS 将监听线路及会议的变化 {@link com.gs.account.context.AccountContext.ListenType}
notifyNow
注册成功后是否立即调用一次回调方法

返回值:

return 请求操作是否成功,不代表该功能的结果, true:成功 false:失败

支持的产品:

All

public static boolean removeStatusListener(IAccountStatusListener callback); 注销监听

参数:

callback
已注册过的回调方法

返回值:

return 请求操作是否成功,不代表该功能的结果, true:成功 false:失败

支持的产品:

All

public static boolean isSipAccount(int accountId); 判断是否为sip帐号

参数:

accountId
帐号编号

返回值:

return 是否为sip帐号

支持的产品:

All


成员和常量

成员 描述
public static final String API BaseAccountApi的标签名,用于在ApiClient中注册.
{@link com.gs.common.client.ApiClient.Builder#addApi(String)}

支持的产品:

All