NIM PC Cross Platform SDK
nim_chatroom Namespace Reference

聊天室 More...

Classes

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

Typedefs

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

Functions

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 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)
 解析聊天室登录结果 More...
 
bool ParseChatRoomMemberInfos (const std::string &infos_json_str, std::list< ChatRoomMemberInfo > &infos)
 解析聊天室成员信息 More...
 
bool ParseChatRoomMsgs (const std::string &msgs_json_str, std::list< ChatRoomMessage > &msgs)
 解析聊天室成员信息 More...
 
bool ParseRobotInfosStringToRobotInfos (const std::string &infos_json, RobotInfos &infos)
 解析机器人信息 More...
 
bool ParseRobotInfoStringToRobotInfo (const std::string &info_json, RobotInfo &info)
 解析机器人信息 More...
 
bool ParseBatchInfosStringToNotMembers (const std::string &infos_json, std::list< std::string > &lst_members)
 解析成员列表 More...
 

Variables

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::SDKLogCallback g_sdk_log_cb = nullptr
 
nim::SDKInstancenim_chatroom_sdk_instance = nullptr
 

Detailed Description

聊天室

Function Documentation

◆ 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 
)

解析成员列表

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

◆ ParseChatRoomEnterCallbackResultInfo()

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

解析聊天室登录结果

Parameters
[in]result
[out]room_info
[out]my_info
Returns
bool 解析成功 或失败

◆ ParseChatRoomMemberInfos()

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

解析聊天室成员信息

Parameters
[in]infos_json_str
[out]infos
Returns
bool 解析成功 或失败

◆ ParseChatRoomMsgs()

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

解析聊天室成员信息

Parameters
[in]msgs_json_str
[out]msgs
Returns
bool 解析成功 或失败

◆ ParseRobotInfosStringToRobotInfos()

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

解析机器人信息

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

◆ ParseRobotInfoStringToRobotInfo()

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

解析机器人信息

Parameters
[in]info_json机器人信息
[out]info机器人信息
Returns
bool 解析成功或失败