NIM Unity SDK V2.6.0
载入中...
搜索中...
未找到
| 枚举 | 函数
NIMChatRoom 命名空间参考

class  AnonymousInfo
 
class  CallbackBridge
 
class  ChatRoomApi
 聊天室 更多...
 
class  ChatRoomInfo
 聊天室信息 更多...
 
class  ChatRoomLoginResultParam
 
class  ChatRoomNativeMethods
 
class  LoginData
 聊天室登录信息 更多...
 
class  MemberInfo
 聊天室成员信息 更多...
 
class  MemberProperty
 
class  Message
 聊天室消息 更多...
 
class  NIMChatRoomConfig
 暂时仅应用于匿名登录方式的配置 更多...
 
class  Notification
 
class  PrivateSetting
 
class  QueryChatRoomMembersParam
 
class  QueryMessageHistoryParam
 

枚举

enum  NIMChatRoomMsgFeature { kNIMChatRoomMsgFeatureDefault = 0 }
 消息属性
 
enum  NIMChatRoomExitReason {
  kNIMChatRoomExitReasonExit = 0 , kNIMChatRoomExitReasonRoomInvalid = 1 , kNIMChatRoomExitReasonKickByManager = 2 , kNIMChatRoomExitReasonKickByMultiSpot = 3 ,
  kNIMChatRoomExitReasonIllegalState = 4 , kNIMChatRoomExitReasonBeBlacklisted = 5
}
 聊天室离开原因 更多...
 
enum  NIMChatRoomLinkCondition { kNIMChatRoomLinkConditionAlive = 0 , kNIMChatRoomLinkConditionDeadAndRetry = 1 , kNIMChatRoomLinkConditionDead = 2 }
 聊天室链接情况,一般都是有本地网路情况引起 更多...
 
enum  NIMChatRoomEnterStep {
  kNIMChatRoomEnterStepInit = 1 , kNIMChatRoomEnterStepServerConnecting = 2 , kNIMChatRoomEnterStepServerConnectOver = 3 , kNIMChatRoomEnterStepRoomAuthing = 4 ,
  kNIMChatRoomEnterStepRoomAuthOver = 5
}
 聊天室进入状态 更多...
 
enum  NIMChatRoomProxyType {
  kNIMChatRoomProxyNone = 0 , kNIMChatRoomProxyHttp11 = 1 , kNIMChatRoomProxySocks4 = 4 , kNIMChatRoomProxySocks4a = 5 ,
  kNIMChatRoomProxySocks5 = 6
}
 代理类型 更多...
 
enum  NIMChatRoomLoginStep {
  kNIMChatRoomLoginStepInit = 1 , kNIMChatRoomLoginStepServerConnecting = 2 , kNIMChatRoomLoginStepServerConnectOver = 3 , kNIMChatRoomLoginStepRoomAuthing = 4 ,
  kNIMChatRoomLoginStepRoomAuthOver = 5
}
 聊天室登录状态 更多...
 
enum  ChatRoomMemberType { Restricted = -1 , Normal = 0 , Creator = 1 , Manager = 2 }
 成员类型, -1:受限用户; 0:普通;1:创建者;2:管理员
 
enum  NIMChatRoomGetMemberType { kNIMChatRoomGetMemberTypeSolid = 0 , kNIMChatRoomGetMemberTypeTemp = 1 }
 查询成员的成员类型 更多...
 
enum  NIMChatRoomGuestFlag { kNIMChatRoomGuestFlagNoGuest = 0 , kNIMChatRoomGuestFlagGuest = 1 }
 成员类型 更多...
 
enum  NIMChatRoomOnlineState { kNIMChatRoomOnlineStateOffline = 0 , kNIMChatRoomOnlineStateOnline = 1 }
 在线状态 更多...
 
enum  NIMChatRoomMemberAttribute { kNIMChatRoomMemberAttributeAdminister = 1 , kNIMChatRoomMemberAttributeNomalSold = 2 , kNIMChatRoomMemberAttributeBlackList = -1 , kNIMChatRoomMemberAttributeMuteList = -2 }
 设置成员的成员身份 更多...
 
enum  NIMChatRoomMsgType {
  kNIMChatRoomMsgTypeText = 0 , kNIMChatRoomMsgTypeImage = 1 , kNIMChatRoomMsgTypeAudio = 2 , kNIMChatRoomMsgTypeVideo = 3 ,
  kNIMChatRoomMsgTypeLocation = 4 , kNIMChatRoomMsgTypeNotification = 5 , kNIMChatRoomMsgTypeFile = 6 , kNIMChatRoomMsgTypeTips = 10 ,
  kNIMChatRoomMsgTypeRobot , kNIMChatRoomMsgTypeCustom = 100 , kNIMChatRoomMsgTypeUnknown = 1000
}
 聊天室消息类型 更多...
 
enum  NIMChatRoomClientType {
  kNIMChatRoomClientTypeDefault = 0 , kNIMChatRoomClientTypeAndroid = 1 , kNIMChatRoomClientTypeiOS = 2 , kNIMChatRoomClientTypePCWindows = 4 ,
  kNIMChatRoomClientTypeWindowsPhone = 8 , kNIMChatRoomClientTypeWeb = 16 , kNIMChatRoomClientTypeRestAPI = 32 , kNIMChatRoomClientTypeMacOS = 64
}
 聊天室消息来源端 更多...
 
enum  NIMChatRoomNotificationId {
  kNIMChatRoomNotificationIdMemberIn = 301 , kNIMChatRoomNotificationIdMemberExit = 302 , kNIMChatRoomNotificationIdAddBlack = 303 , kNIMChatRoomNotificationIdRemoveBlack = 304 ,
  kNIMChatRoomNotificationIdAddMute = 305 , kNIMChatRoomNotificationIdRemoveMute = 306 , kNIMChatRoomNotificationIdAddManager = 307 , kNIMChatRoomNotificationIdRemoveManager = 308 ,
  kNIMChatRoomNotificationIdAddFixed = 309 , kNIMChatRoomNotificationIdRemoveFixed = 310 , kNIMChatRoomNotificationIdClosed = 311 , kNIMChatRoomNotificationIdInfoUpdated = 312 ,
  kNIMChatRoomNotificationIdMemberKicked = 313 , kNIMChatRoomNotificationIdMemberTempMute = 314 , kNIMChatRoomNotificationIdMemberTempUnMute = 315 , kNIMChatRoomNotificationIdMyRoleUpdated = 316 ,
  kNIMChatRoomNotificationIdRoomMuted = 318 , kNIMChatRoomNotificationIdRoomDeMuted = 319 , kNIMChatRoomNotificationMessageRecall = 323
}
 聊天室通知类型 更多...
 

函数

delegate void RequestChatRoomLinkInfoDelegate (long roomId, NIM.ResponseCode errorCode, string[] linkAddrs)
 
delegate void ChatRoomLoginDelegate (NIMChatRoomLoginStep loginStep, NIM.ResponseCode errorCode, ChatRoomInfo roomInfo, MemberInfo memberInfo)
 
delegate void ExitChatRoomDelegate (long roomId, NIM.ResponseCode errorCode, NIMChatRoomExitReason reason)
 
delegate void QueryMembersResultDelegate (long roomId, NIM.ResponseCode errorCode, MemberInfo[] members)
 
delegate void QueryMessageHistoryResultDelegate (long roomId, NIM.ResponseCode errorCode, Message[] messages)
 
delegate void SetMemberPropertyDelegate (long roomId, NIM.ResponseCode errorCode, MemberInfo info)
 
delegate void CloseRoomDelegate (long roomId, NIM.ResponseCode errorCode)
 
delegate void RemoveMemberDelegate (long roomId, NIM.ResponseCode errorCode)
 
delegate void UpdateRoomInfoDelegate (long roomId, NIM.ResponseCode errorCode)
 
delegate void UpdateMyRoleDelegate (long roomId, NIM.ResponseCode errorCode)
 
delegate void GetRoomInfoDelegate (long roomId, NIM.ResponseCode errorCode, ChatRoomInfo info)
 
delegate void TempMuteMemberDelegate (long roomId, NIM.ResponseCode errorCode, MemberInfo info)
 
delegate void ChatRoomQueueListDelegate (long room_id, NIM.ResponseCode error_code, string result)
 
delegate void ChatRoomQueueDropDelegate (long room_id, NIM.ResponseCode error_code)
 
delegate void ChatRoomQueuePollDelegate (long room_id, NIM.ResponseCode error_code, string result)
 
delegate void ChatRoomQueueOfferDelegate (long room_id, NIM.ResponseCode error_code)
 
delegate void ChatRoomQueueHeaderDelegate (long room_id, NIM.ResponseCode error_code, string result)
 
delegate void nim_chatroom_queue_offer_cb_func (long room_id, NIM.ResponseCode error_code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(NimUtility.Utf8StringMarshaler))] string json_extension, IntPtr user_data)
 
delegate void nim_chatroom_queue_poll_cb_func (long room_id, NIM.ResponseCode error_code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(NimUtility.Utf8StringMarshaler))] string result, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(NimUtility.Utf8StringMarshaler))] string json_extension, IntPtr user_data)
 
delegate void nim_chatroom_queue_list_cb_func (long room_id, NIM.ResponseCode error_code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(NimUtility.Utf8StringMarshaler))] string result, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(NimUtility.Utf8StringMarshaler))] string json_extension, IntPtr user_data)
 
delegate void nim_chatroom_queue_drop_cb_func (long room_id, NIM.ResponseCode error_code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(NimUtility.Utf8StringMarshaler))] string json_extension, IntPtr user_data)
 
delegate void nim_chatroom_queue_header_cb_func (long room_id, int error_code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(NimUtility.Utf8StringMarshaler))] string result, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(NimUtility.Utf8StringMarshaler))] string json_extension, IntPtr user_data)
 

枚举类型说明

◆ NIMChatRoomExitReason

聊天室离开原因

枚举值
kNIMChatRoomExitReasonExit 

自行退出,重登前需要重新请求登录

kNIMChatRoomExitReasonRoomInvalid 

聊天室已经被解散,重登前需要重新请求登录

kNIMChatRoomExitReasonKickByManager 

被管理员踢出,重登前需要重新请求登录

kNIMChatRoomExitReasonKickByMultiSpot 

多端被踢

kNIMChatRoomExitReasonIllegalState 

当前链接状态异常

kNIMChatRoomExitReasonBeBlacklisted 

被加黑了

◆ NIMChatRoomLinkCondition

聊天室链接情况,一般都是有本地网路情况引起

枚举值
kNIMChatRoomLinkConditionAlive 

链接正常

kNIMChatRoomLinkConditionDeadAndRetry 

链接失败,sdk尝试重链

kNIMChatRoomLinkConditionDead 

链接失败,开发者需要重新申请聊天室登录信息

◆ NIMChatRoomEnterStep

聊天室进入状态

枚举值
kNIMChatRoomEnterStepInit 

本地服务初始化

kNIMChatRoomEnterStepServerConnecting 

服务器连接中

kNIMChatRoomEnterStepServerConnectOver 

服务器连接结束,连接结果见error_code

kNIMChatRoomEnterStepRoomAuthing 

聊天室鉴权中

kNIMChatRoomEnterStepRoomAuthOver 

聊天室鉴权结束,鉴权结果见error_code, error_code非408则需要开发者重新请求聊天室进入信息

◆ NIMChatRoomProxyType

代理类型

枚举值
kNIMChatRoomProxyNone 

不使用代理

kNIMChatRoomProxyHttp11 

HTTP 1.1 Proxy(暂不支持)

kNIMChatRoomProxySocks4 

Socks4 Proxy

kNIMChatRoomProxySocks4a 

Socks4a Proxy

kNIMChatRoomProxySocks5 

Socks5 Proxy

◆ NIMChatRoomLoginStep

聊天室登录状态

枚举值
kNIMChatRoomLoginStepInit 

本地服务初始化

kNIMChatRoomLoginStepServerConnecting 

服务器连接中

kNIMChatRoomLoginStepServerConnectOver 

服务器连接结束,连接结果error_code

kNIMChatRoomLoginStepRoomAuthing 

聊天室鉴权中

kNIMChatRoomLoginStepRoomAuthOver 

聊天室鉴权结束,鉴权结果见error_code, error_code非408则需要开发者重新请求聊天室登录信息

◆ NIMChatRoomGetMemberType

查询成员的成员类型

枚举值
kNIMChatRoomGetMemberTypeSolid 

固定成员,固定成员,包括创建者,管理员,普通等级用户,受限用户(禁言+黑名单),即使非在线也可以在列表中看到,有数量限制

kNIMChatRoomGetMemberTypeTemp 

非固定成员,非固定成员,又称临时成员,只有在线时才能在列表中看到,数量无上限

◆ NIMChatRoomGuestFlag

成员类型

枚举值
kNIMChatRoomGuestFlagNoGuest 

非游客

kNIMChatRoomGuestFlagGuest 

游客

◆ NIMChatRoomOnlineState

在线状态

枚举值
kNIMChatRoomOnlineStateOffline 

不在线

kNIMChatRoomOnlineStateOnline 

在线

◆ NIMChatRoomMemberAttribute

设置成员的成员身份

枚举值
kNIMChatRoomMemberAttributeAdminister 

固定成员,operator必须是创建者

kNIMChatRoomMemberAttributeNomalSold 

非固定成员,operator必须是创建者或管理员

kNIMChatRoomMemberAttributeBlackList 

黑名单,operator必须是创建者或管理员

kNIMChatRoomMemberAttributeMuteList 

禁言,operator必须是创建者或管理员

◆ NIMChatRoomMsgType

聊天室消息类型

枚举值
kNIMChatRoomMsgTypeText 

文本类型消息

kNIMChatRoomMsgTypeImage 

图片类型消息

kNIMChatRoomMsgTypeAudio 

声音类型消息

kNIMChatRoomMsgTypeVideo 

视频类型消息

kNIMChatRoomMsgTypeLocation 

位置类型消息

kNIMChatRoomMsgTypeNotification 

活动室通知

kNIMChatRoomMsgTypeFile 

文件类型消息

kNIMChatRoomMsgTypeTips 

提醒类型消息

kNIMChatRoomMsgTypeRobot 

机器人消息

kNIMChatRoomMsgTypeCustom 

自定义消息

kNIMChatRoomMsgTypeUnknown 

未知类型消息,作为默认值

◆ NIMChatRoomClientType

聊天室消息来源端

枚举值
kNIMChatRoomClientTypeDefault 

default,unset

kNIMChatRoomClientTypeAndroid 

android

kNIMChatRoomClientTypeiOS 

ios

kNIMChatRoomClientTypePCWindows 

PC

kNIMChatRoomClientTypeWindowsPhone 

WindowsPhone

kNIMChatRoomClientTypeWeb 

web

kNIMChatRoomClientTypeRestAPI 

RestAPI

kNIMChatRoomClientTypeMacOS 

Mac

◆ NIMChatRoomNotificationId

聊天室通知类型

枚举值
kNIMChatRoomNotificationIdMemberIn 

成员进入聊天室

kNIMChatRoomNotificationIdMemberExit 

成员离开聊天室

kNIMChatRoomNotificationIdAddBlack 

成员被加黑

kNIMChatRoomNotificationIdRemoveBlack 

成员被取消黑名单

kNIMChatRoomNotificationIdAddMute 

成员被设置禁言

kNIMChatRoomNotificationIdRemoveMute 

成员被取消禁言

kNIMChatRoomNotificationIdAddManager 

设置为管理员

kNIMChatRoomNotificationIdRemoveManager 

取消管理员

kNIMChatRoomNotificationIdAddFixed 

成员设定为固定成员

kNIMChatRoomNotificationIdRemoveFixed 

成员取消固定成员

kNIMChatRoomNotificationIdClosed 

聊天室被关闭了

kNIMChatRoomNotificationIdInfoUpdated 

聊天室信息被更新了

kNIMChatRoomNotificationIdMemberKicked 

成员被踢了

kNIMChatRoomNotificationIdMemberTempMute 

临时禁言

kNIMChatRoomNotificationIdMemberTempUnMute 

主动解除临时禁言

kNIMChatRoomNotificationIdMyRoleUpdated 

成员主动更新了聊天室内的角色信息(仅指nick/avator/ext)

kNIMChatRoomNotificationIdRoomMuted 

聊天室被禁言了,只有管理员可以发言,其他人都处于禁言状态

kNIMChatRoomNotificationIdRoomDeMuted 

聊天室解除全体禁言状态

kNIMChatRoomNotificationMessageRecall 

聊天室消息被撤回通知