NIM C# SDK
6.3.0
|
NIM SDK提供的Client接口,主要包括SDK初始化/清理、客户端登录/退出/重连/掉线/被踢等流程 More...
Public Member Functions | |
delegate void | KickOtherClientResultHandler (NIMKickOtherResult result) |
delegate void | MultiSpotLoginNotifyResultHandler (NIMMultiSpotLoginNotifyResult result) |
delegate void | KickoutResultHandler (NIMKickoutResult result) |
delegate void | LogoutResultDelegate (NIMLogoutResult result) |
delegate void | LoginResultDelegate (NIMLoginResult result) |
delegate void | DndConfigureDelegate (ResponseCode resCode, DndConfigParam config) |
Static Public Member Functions | |
static bool | Init (string appDataDir, string appInstallDir="", NimUtility.NimConfig config=null) |
NIM SDK初始化 More... | |
static bool | Init (string appKey, string appDataDir, string appInstallDir="", NimUtility.NimConfig config=null) |
NIM SDK初始化 More... | |
static void | RegisterSdkCallbacks () |
注册全局回调函数,在切换账号都需要重新注册 More... | |
static void | Cleanup () |
NIM SDK清理 More... | |
static void | CleanupEx () |
static void | Login (string appKey, string account, string token, LoginResultDelegate handler=null) |
NIM客户端登录 More... | |
static void | Relogin (string jsonExtension=null) |
NIM客户端手动重连(注意 APP需要统一处理自动重连/手动重连的回调,因为如果处于某次自动重连的过程中调用手动重连接口,不起作用!) . More... | |
static void | Logout (NIMLogoutType logoutType, LogoutResultDelegate @delegate) |
NIM客户端注销/退出,异步方法,回调函数中报告执行结果 More... | |
static void | Logout (NIMLogoutType logoutType, int waitSeconds=10) |
NIM客户端注销/退出,同步方法 More... | |
static void | KickOtherClients (NIMKickoutOtherDeviceInfo devices) |
将本帐号的其他端踢下线.通过注册RegKickOtherClientCb回调得到结果 More... | |
static void | RegAutoReloginCb (LoginResultDelegate handler, string jsonExtension=null) |
注册NIM客户端自动重连回调。重连失败时,如果不是网络错误引起的(网络相关的错误号为kNIMResTimeoutError和kNIMResConnectionError),而是服务器返回了非kNIMResSuccess的错误号, 则说明重连的机制已经失效,需要APP层调用Logout执行注销操作并退回到登录界面后进行重新登录. More... | |
static void | RegKickoutCb (KickoutResultHandler handler) |
注册NIM客户端被踢回调. More... | |
static void | RegDisconnectedCb (Action handler) |
注册NIM客户端掉线回调. More... | |
static void | RegMultiSpotLoginNotifyCb (MultiSpotLoginNotifyResultHandler handler) |
注册NIM客户端多点登录通知回调. More... | |
static void | RegKickOtherClientCb (KickOtherClientResultHandler handler) |
注册NIM客户端将本帐号的其他端踢下线结果回调. More... | |
static void | EnableMultiportPush (ConfigMultiportPushDelegate cb) |
开启多端推送 More... | |
static void | DisableMultiportPush (ConfigMultiportPushDelegate cb) |
禁止多端推送 More... | |
static void | IsMultiportPushEnabled (ConfigMultiportPushDelegate cb) |
获取多端推送控制开关 More... | |
static void | RegMulitiportPushEnableChangedCb (ConfigMultiportPushDelegate cb) |
注册多端推送设置同步回调 More... | |
static void | UpdateApnsToken (string token) |
更新ios推送token More... | |
static void | SetDndConfig (DndConfigParam param, DndConfigureDelegate cb) |
ios 免打扰设置 More... | |
static void | GetDndConfig (DndConfigureDelegate cb) |
获取ios 免打扰设置 More... | |
static NIMLoginState | GetLoginState (string jsonExt=null) |
获取NIM客户端登录状态 More... | |
static string | GetVersion () |
获取NIM SDK 版本号 More... | |
Static Public Attributes | |
static EventHandler< LoginResultEventArgs > | LoginResultHandler |
Properties | |
static bool | SdkInitialized [get] |
SDK是否已经初始化 More... | |
NIM SDK提供的Client接口,主要包括SDK初始化/清理、客户端登录/退出/重连/掉线/被踢等流程
|
static |
NIM SDK清理
|
static |
|
static |
禁止多端推送
cb | 操作结果委托 |
delegate void NIM.ClientAPI.DndConfigureDelegate | ( | ResponseCode | resCode, |
DndConfigParam | config | ||
) |
|
static |
开启多端推送
cb | 操作结果委托 |
|
static |
获取ios 免打扰设置
cb |
|
static |
获取NIM客户端登录状态
jsonExt |
|
static |
获取NIM SDK 版本号
|
static |
NIM SDK初始化
appDataDir | 使用默认路径时只需传入单个目录名(不以反斜杠结尾),使用自定义路径时需传入完整路径(以反斜杠结尾,并确保有正确的读写权限!). |
appInstallDir | 目前不需要传入(SDK可以自动获取). |
config | The config. |
true
成功, false
失败
|
static |
NIM SDK初始化
appKey | AppKey,必填 |
appDataDir | 使用默认路径时只需传入单个目录名(不以反斜杠结尾),使用自定义路径时需传入完整路径(以反斜杠结尾,并确保有正确的读写权限!). |
appInstallDir | 目前不需要传入(SDK可以自动获取). |
config | The config. |
true
成功, false
失败
|
static |
获取多端推送控制开关
cb |
delegate void NIM.ClientAPI.KickOtherClientResultHandler | ( | NIMKickOtherResult | result | ) |
|
static |
将本帐号的其他端踢下线.通过注册RegKickOtherClientCb回调得到结果
devices | 设备标识 |
delegate void NIM.ClientAPI.KickoutResultHandler | ( | NIMKickoutResult | result | ) |
|
static |
NIM客户端登录
appKey | The app key. |
account | The account. |
token | 令牌 (在后台绑定的登录token). |
handler | 登录流程的回调函数 |
delegate void NIM.ClientAPI.LoginResultDelegate | ( | NIMLoginResult | result | ) |
|
static |
NIM客户端注销/退出,异步方法,回调函数中报告执行结果
logoutType | Logout操作类型 |
delegate | 注销/退出的回调函数. |
|
static |
NIM客户端注销/退出,同步方法
logoutType | |
waitSeconds |
delegate void NIM.ClientAPI.LogoutResultDelegate | ( | NIMLogoutResult | result | ) |
delegate void NIM.ClientAPI.MultiSpotLoginNotifyResultHandler | ( | NIMMultiSpotLoginNotifyResult | result | ) |
|
static |
注册NIM客户端自动重连回调。重连失败时,如果不是网络错误引起的(网络相关的错误号为kNIMResTimeoutError和kNIMResConnectionError),而是服务器返回了非kNIMResSuccess的错误号, 则说明重连的机制已经失效,需要APP层调用Logout执行注销操作并退回到登录界面后进行重新登录.
jsonExtension | json扩展参数(备用,目前不需要) |
handler | 自动重连的回调函数 如果返回错误号kNIMResExist,说明无法继续重连,App层必须调用Logout退出到登录界面,以便用户重新进行登录. |
|
static |
注册NIM客户端掉线回调.
handler | 掉线的回调函数. |
|
static |
注册全局回调函数,在切换账号都需要重新注册
|
static |
注册NIM客户端将本帐号的其他端踢下线结果回调.
handler | 操作结果的回调函数. |
|
static |
注册NIM客户端被踢回调.
handler | 被踢回调 |
|
static |
注册多端推送设置同步回调
cb |
|
static |
注册NIM客户端多点登录通知回调.
handler | 多点登录通知的回调函数. |
|
static |
NIM客户端手动重连(注意 APP需要统一处理自动重连/手动重连的回调,因为如果处于某次自动重连的过程中调用手动重连接口,不起作用!) .
jsonExtension | json扩展参数(备用,目前不需要). |
|
static |
ios 免打扰设置
param | |
cb |
|
static |
更新ios推送token
token |
|
static |
|
staticget |
SDK是否已经初始化