NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_chatroom 命名空间参考

聊天室 更多...

class  ChatRoom
 聊天室 更多...
 
struct  ChatRoomAnoymityEnterInfo
 
struct  ChatRoomBatchMembers
 聊天室批量更新成员 更多...
 
struct  ChatRoomEnterInfo
 聊天室登录信息 更多...
 
struct  ChatRoomGetMembersByTagParameters
 根据 tag 获取聊天室成员参数 更多...
 
struct  ChatRoomGetMembersParameters
 获取聊天室成员参数 更多...
 
struct  ChatRoomGetMsgHistoryByTagsParameters
 
struct  ChatRoomGetMsgHistoryParameters
 获取聊天室消息历史参数 更多...
 
struct  ChatRoomIndependentEnterInfo
 
struct  ChatRoomInfo
 聊天室信息 更多...
 
struct  ChatRoomMemberInfo
 聊天室成员信息 更多...
 
struct  ChatRoomMessage
 聊天室消息 更多...
 
struct  ChatRoomMessageSetting
 聊天室消息属性设置 更多...
 
struct  ChatRoomNotification
 聊天室通知 更多...
 
struct  ChatRoomQueueBatchChangedNotification
 通知麦序队列中有批量变更,发生在元素提交者离开聊天室或者从聊天室异常掉线时 更多...
 
struct  ChatRoomQueueChangedNotification
 聊天室队列通知内容 更多...
 
struct  ChatRoomQueueElement
 聊天室麦序队列元素 更多...
 
struct  ChatRoomQueueOfferOption
 聊天室麦序添加、更新选项 更多...
 
struct  ChatRoomSetMemberAttributeParameters
 设置聊天室成员身份标识参数 更多...
 
struct  ChatRoomUpdateTagsInfo
 聊天室更新标签 更多...
 
struct  NIMChatRoomExitReasonInfo
 聊天室退出时的信息 更多...
 
struct  RobotInfo
 机器人信息 更多...
 

类型定义

typedef std::list< ChatRoomQueueElementChatRoomQueue
 聊天室麦序队列
 
typedef std::list< RobotInfoRobotInfos
 机器人信息
 
typedef ChatRoomQueueElement ChatRoomMember
 

函数

static void CallbackEnter (int64_t room_id, int step, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackExit (int64_t room_id, int error_code, int exit_reason, const char *json_extension, const void *user_data)
 
static void CallbackExit_2 (int64_t room_id, int error_code, int exit_reason, const char *json_extension, const void *user_data)
 
static void CallbackSendMsgAck (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackReceiveMsg (int64_t room_id, const char *content, const char *json_extension, const void *user_data)
 
static void CallbackReceiveMsgs (int64_t room_id, const char *content, const char *json_extension, const void *user_data)
 
static void CallbackReceiveNotification (int64_t room_id, const char *content, const char *json_extension, const void *user_data)
 
static void CallbackLinkCondition (int64_t room_id, int condition, const char *json_extension, const void *user_data)
 
static void CallbackTagsChanged (int64_t room_id, const char *new_tags, const char *json_extension, const void *user_data)
 
static void CallbackCustomToken (char *auth_token, const uint32_t length, const char *json_params, const void *user_data)
 
static void CallbackRequestLoginToken (const char *app_key, const char *account, char *auth_token, const uint32_t length, const char *json_params, const void *user_data)
 
static void CallbackGetMembersOnline (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackGetMembersCountByTagCallback (int64_t room_id, int error_code, uint64_t count, const char *json_extension, const void *user_data)
 
static void CallbackGetMsgHistoryOnline (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackSetMemberAtribute (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackGetChatRoomInfo (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackKickMember (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
static void CallbackTempMuteMember (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackUpdateRoomInfo (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
static void CallbackUpdateMyRoomRole (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
static void CallbackQueueOffer (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
static void CallbackQueueDrop (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
static void CallbackQueuePoll (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackQueueList (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackQueueHeader (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
static void CallbackUpdateLocation (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
static void CallbackUpdateTags (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
static void CallbackRobotQuery (int rescode, const char *res, const char *json_extension, const void *callback)
 
static void CallbackBatchUpdate (int64_t room_id, int error_code, const char *res, const char *json_extension, const void *callback)
 
bool operator== (const NIMChatRoomExitReasonInfo &info, NIMChatRoomExitReason code)
 
bool ParseChatRoomEnterCallbackResultInfo (const std::string &result, ChatRoomInfo &room_info, ChatRoomMemberInfo &my_info)
 解析聊天室登录结果
 
bool ParseChatRoomMemberInfos (const std::string &infos_json_str, std::list< ChatRoomMemberInfo > &infos)
 解析聊天室成员信息
 
bool ParseChatRoomMsgs (const std::string &msgs_json_str, std::list< ChatRoomMessage > &msgs)
 解析聊天室成员信息
 
bool ParseRobotInfosStringToRobotInfos (const std::string &infos_json, RobotInfos &infos)
 解析机器人信息
 
bool ParseRobotInfoStringToRobotInfo (const std::string &info_json, RobotInfo &info)
 解析机器人信息
 
bool ParseBatchInfosStringToNotMembers (const std::string &infos_json, std::list< std::string > &lst_members)
 解析成员列表
 

变量

static ChatRoom::EnterCallback g_cb_enter_ = nullptr
 
static ChatRoom::ExitCallback g_cb_exit_ = nullptr
 
static ChatRoom::ExitCallback_2 g_cb_exit_2_ = nullptr
 
static ChatRoom::SendMsgAckCallback g_cb_send_msg_ack_ = nullptr
 
static ChatRoom::ReceiveMsgCallback g_cb_receive_msg_ = nullptr
 
static ChatRoom::ReceiveMsgsCallback g_cb_receive_msgs_ = nullptr
 
static ChatRoom::NotificationCallback g_cb_notification_ = nullptr
 
static ChatRoom::LinkConditionCallback g_cb_link_condition_ = nullptr
 
static ChatRoom::TagsChangedCallback g_cb_tags_changed_ = nullptr
 
static ChatRoom::CustomTokenCallback g_cb_custom_token_ = nullptr
 
static ChatRoom::RequestTokenCallback g_cb_request_token_ = nullptr
 
static ChatRoom::RequestExtensionCallback g_cb_request_login_extension_ = nullptr
 
static ChatRoom::SDKLogCallback g_sdk_log_cb = nullptr
 
nim::SDKInstancenim_chatroom_sdk_instance = nullptr
 

详细描述

聊天室

类型定义说明

◆ ChatRoomMember

◆ ChatRoomQueue

聊天室麦序队列

◆ RobotInfos

typedef std::list<RobotInfo> nim_chatroom::RobotInfos

机器人信息

函数说明

◆ CallbackBatchUpdate()

static void nim_chatroom::CallbackBatchUpdate ( int64_t  room_id,
int  error_code,
const char *  res,
const char *  json_extension,
const void *  callback 
)
static

◆ CallbackCustomToken()

static void nim_chatroom::CallbackCustomToken ( char *  auth_token,
const uint32_t  length,
const char *  json_params,
const void *  user_data 
)
static

◆ CallbackEnter()

static void nim_chatroom::CallbackEnter ( int64_t  room_id,
int  step,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackExit()

static void nim_chatroom::CallbackExit ( int64_t  room_id,
int  error_code,
int  exit_reason,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackExit_2()

static void nim_chatroom::CallbackExit_2 ( int64_t  room_id,
int  error_code,
int  exit_reason,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackGetChatRoomInfo()

static void nim_chatroom::CallbackGetChatRoomInfo ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackGetMembersCountByTagCallback()

static void nim_chatroom::CallbackGetMembersCountByTagCallback ( int64_t  room_id,
int  error_code,
uint64_t  count,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackGetMembersOnline()

static void nim_chatroom::CallbackGetMembersOnline ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackGetMsgHistoryOnline()

static void nim_chatroom::CallbackGetMsgHistoryOnline ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackKickMember()

static void nim_chatroom::CallbackKickMember ( int64_t  room_id,
int  error_code,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackLinkCondition()

static void nim_chatroom::CallbackLinkCondition ( int64_t  room_id,
int  condition,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackQueueDrop()

static void nim_chatroom::CallbackQueueDrop ( int64_t  room_id,
int  error_code,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackQueueHeader()

static void nim_chatroom::CallbackQueueHeader ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackQueueList()

static void nim_chatroom::CallbackQueueList ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackQueueOffer()

static void nim_chatroom::CallbackQueueOffer ( int64_t  room_id,
int  error_code,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackQueuePoll()

static void nim_chatroom::CallbackQueuePoll ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackReceiveMsg()

static void nim_chatroom::CallbackReceiveMsg ( int64_t  room_id,
const char *  content,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackReceiveMsgs()

static void nim_chatroom::CallbackReceiveMsgs ( int64_t  room_id,
const char *  content,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackReceiveNotification()

static void nim_chatroom::CallbackReceiveNotification ( int64_t  room_id,
const char *  content,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackRequestLoginToken()

static void nim_chatroom::CallbackRequestLoginToken ( const char *  app_key,
const char *  account,
char *  auth_token,
const uint32_t  length,
const char *  json_params,
const void *  user_data 
)
static

◆ CallbackRobotQuery()

static void nim_chatroom::CallbackRobotQuery ( int  rescode,
const char *  res,
const char *  json_extension,
const void *  callback 
)
static

◆ CallbackSendMsgAck()

static void nim_chatroom::CallbackSendMsgAck ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackSetMemberAtribute()

static void nim_chatroom::CallbackSetMemberAtribute ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackTagsChanged()

static void nim_chatroom::CallbackTagsChanged ( int64_t  room_id,
const char *  new_tags,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackTempMuteMember()

static void nim_chatroom::CallbackTempMuteMember ( int64_t  room_id,
int  error_code,
const char *  result,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackUpdateLocation()

static void nim_chatroom::CallbackUpdateLocation ( int64_t  room_id,
int  error_code,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackUpdateMyRoomRole()

static void nim_chatroom::CallbackUpdateMyRoomRole ( int64_t  room_id,
int  error_code,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackUpdateRoomInfo()

static void nim_chatroom::CallbackUpdateRoomInfo ( int64_t  room_id,
int  error_code,
const char *  json_extension,
const void *  user_data 
)
static

◆ CallbackUpdateTags()

static void nim_chatroom::CallbackUpdateTags ( int64_t  room_id,
int  error_code,
const char *  json_extension,
const void *  user_data 
)
static

◆ operator==()

NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API bool nim_chatroom::operator== ( const NIMChatRoomExitReasonInfo info,
NIMChatRoomExitReason  code 
)

重载符号=

◆ ParseBatchInfosStringToNotMembers()

NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API bool nim_chatroom::ParseBatchInfosStringToNotMembers ( const std::string &  infos_json,
std::list< std::string > &  lst_members 
)

解析成员列表

参数
[in]info_json成员列表信息 json格式字符串
[out]lst_members成员列表
返回
bool 解析成功或失败

◆ ParseChatRoomEnterCallbackResultInfo()

NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API bool nim_chatroom::ParseChatRoomEnterCallbackResultInfo ( const std::string &  result,
ChatRoomInfo room_info,
ChatRoomMemberInfo my_info 
)

解析聊天室登录结果

参数
[in]result
[out]room_info
[out]my_info
返回
bool 解析成功 或失败

◆ ParseChatRoomMemberInfos()

NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API bool nim_chatroom::ParseChatRoomMemberInfos ( const std::string &  infos_json_str,
std::list< ChatRoomMemberInfo > &  infos 
)

解析聊天室成员信息

参数
[in]infos_json_str
[out]infos
返回
bool 解析成功 或失败

◆ ParseChatRoomMsgs()

NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API bool nim_chatroom::ParseChatRoomMsgs ( const std::string &  msgs_json_str,
std::list< ChatRoomMessage > &  msgs 
)

解析聊天室成员信息

参数
[in]msgs_json_str
[out]msgs
返回
bool 解析成功 或失败

◆ ParseRobotInfosStringToRobotInfos()

NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API bool nim_chatroom::ParseRobotInfosStringToRobotInfos ( const std::string &  infos_json,
RobotInfos infos 
)

解析机器人信息

参数
[in]infos_json机器人信息(Json Value数据字符串)
[out]infos机器人信息
返回
bool 解析成功或失败

◆ ParseRobotInfoStringToRobotInfo()

NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API bool nim_chatroom::ParseRobotInfoStringToRobotInfo ( const std::string &  info_json,
RobotInfo info 
)

解析机器人信息

参数
[in]info_json机器人信息
[out]info机器人信息
返回
bool 解析成功或失败

变量说明

◆ g_cb_custom_token_

ChatRoom::CustomTokenCallback nim_chatroom::g_cb_custom_token_ = nullptr
static

◆ g_cb_enter_

ChatRoom::EnterCallback nim_chatroom::g_cb_enter_ = nullptr
static

◆ g_cb_exit_

ChatRoom::ExitCallback nim_chatroom::g_cb_exit_ = nullptr
static

◆ g_cb_exit_2_

ChatRoom::ExitCallback_2 nim_chatroom::g_cb_exit_2_ = nullptr
static

◆ g_cb_link_condition_

ChatRoom::LinkConditionCallback nim_chatroom::g_cb_link_condition_ = nullptr
static

◆ g_cb_notification_

ChatRoom::NotificationCallback nim_chatroom::g_cb_notification_ = nullptr
static

◆ g_cb_receive_msg_

ChatRoom::ReceiveMsgCallback nim_chatroom::g_cb_receive_msg_ = nullptr
static

◆ g_cb_receive_msgs_

ChatRoom::ReceiveMsgsCallback nim_chatroom::g_cb_receive_msgs_ = nullptr
static

◆ g_cb_request_login_extension_

ChatRoom::RequestExtensionCallback nim_chatroom::g_cb_request_login_extension_ = nullptr
static

◆ g_cb_request_token_

ChatRoom::RequestTokenCallback nim_chatroom::g_cb_request_token_ = nullptr
static

◆ g_cb_send_msg_ack_

ChatRoom::SendMsgAckCallback nim_chatroom::g_cb_send_msg_ack_ = nullptr
static

◆ g_cb_tags_changed_

ChatRoom::TagsChangedCallback nim_chatroom::g_cb_tags_changed_ = nullptr
static

◆ g_sdk_log_cb

ChatRoom::SDKLogCallback nim_chatroom::g_sdk_log_cb = nullptr
static

◆ nim_chatroom_sdk_instance

nim::SDKInstance * nim_chatroom::nim_chatroom_sdk_instance = nullptr
extern