8#ifndef NIM_CHATROOM_SDK_API_NIM_CHATROOM_H_
9#define NIM_CHATROOM_SDK_API_NIM_CHATROOM_H_
97 const void* user_data);
149 const char* anonymity_info,
150 const char* enter_info,
151 const char* json_extension);
165 const char* anonymity_info,
166 const char* enter_info,
167 const NIMChatRoomConfigGetter config_getter);
194NIM_SDK_DLL_API
bool nim_chatroom_enter(
const int64_t room_id,
const char* request_enter_data,
const char* enter_info,
const char* json_extension);
243 const char* parameters_json_str,
244 const char* json_extension,
246 const void* user_data);
262 const char* parameters_json_str,
263 const char* json_extension,
265 const void* user_data);
281 const char* parameters_json_str,
282 const char* json_extension,
284 const void* user_data);
298 const char* parameters_json_str,
299 const char* json_extension,
301 const void* user_data);
325 const char* notify_ext,
326 const char* json_extension,
328 const void* user_data);
339 const char* json_extension,
341 const void* user_data);
359 const char* ids_json_array_string,
360 const char* json_extension,
362 const void* user_data);
384 const char* notify_ext,
385 const char* json_extension,
387 const void* user_data);
426 const int64_t duration,
428 const char* notify_ext,
429 const char* json_extension,
431 const void* user_data);
455 const char* target_tag,
456 const int64_t duration,
458 const char* notify_ext,
459 const char* notify_tags,
460 const char* json_extension,
462 const void* user_data);
478 const char* target_tag,
479 const char* json_extension,
481 const void* user_data);
508 const char* room_info_json_str,
510 const char* notify_ext,
511 const char* json_extension,
513 const void* user_data);
534 const char* role_info_json_str,
536 const char* notify_ext,
537 const char* json_extension,
539 const void* user_data);
560 const char* element_key,
561 const char* element_value,
562 const char* json_extension,
564 const void* user_data);
583 const char* element_key,
584 const char* json_extension,
586 const void* user_data);
600 const char* json_extension,
602 const void* user_data);
616 const char* json_extension,
618 const void* user_data);
632 const char* json_extension,
634 const void* user_data);
651 const char* json_extension,
653 const void* user_data);
691 const char* element_info_json_str,
693 const char* notify_ext,
694 const char* json_extension,
696 const void* user_data);
711 const char* json_extension,
712 const void* user_data);
727 const char* json_extension,
728 const void* user_data);
NIM_SDK_DLL_API void nim_chatroom_kick_member_async(const int64_t room_id, const char *id, const char *notify_ext, const char *json_extension, nim_chatroom_kick_member_cb_func cb, const void *user_data)
异步踢掉指定成员
NIM_SDK_DLL_API void nim_chatroom_reg_link_condition_cb(const char *json_extension, nim_chatroom_link_condition_cb_func cb, const void *user_data)
注册聊天室链接状况回调
NIM_SDK_DLL_API void nim_chatroom_reg_tags_changed_cb(const char *json_extension, nim_chatroom_tags_changed_cb_func cb, const void *user_data)
NIM_SDK_DLL_API void nim_chatroom_queue_offer_async(const int64_t room_id, const char *element_key, const char *element_value, const char *json_extension, nim_chatroom_queue_offer_cb_func cb, const void *user_data)
新加(更新)麦序队列元素,如果element_key对应的元素已经在队列中存在了,那就是更新操作,如果不存在,就放到队列尾部
NIM_SDK_DLL_API void nim_chatroom_get_msg_history_online_async(const int64_t room_id, const char *parameters_json_str, const char *json_extension, nim_chatroom_get_msg_cb_func cb, const void *user_data)
异步获取消息历史
NIM_SDK_DLL_API void nim_chatroom_exit(const int64_t room_id, const char *json_extension)
聊天室登出
NIM_SDK_DLL_API void nim_chatroom_set_proxy(enum NIMChatRoomProxyType type, const char *host, int port, const char *user, const char *password)
设置Chatroom SDK统一的网络代理。不需要代理时,type设置为kNIMProxyNone,其余参数都传空字符串(端口设为0)。有些代理不需要用户名和密码,相应参数也传空字符串。
NIM_SDK_DLL_API void nim_chatroom_queue_header_async(const int64_t room_id, const char *json_extension, nim_chatroom_queue_header_cb_func cb, const void *user_data)
查看麦序头元素
NIM_SDK_DLL_API int nim_chatroom_get_login_state(const int64_t room_id, const char *json_extension)
获取登录状态
NIM_SDK_DLL_API void nim_chatroom_reg_enter_cb(const char *json_extension, nim_chatroom_enter_cb_func cb, const void *user_data)
注册全局进入聊天室的回调
NIM_SDK_DLL_API void nim_chatroom_reg_receive_msg_cb(const char *json_extension, nim_chatroom_receive_msg_cb_func cb, const void *user_data)
注册全局接收消息回调
NIM_SDK_DLL_API void nim_chatroom_reg_send_msg_ack_cb(const char *json_extension, nim_chatroom_sendmsg_arc_cb_func cb, const void *user_data)
注册全局发送消息回执回调
NIM_SDK_DLL_API void nim_chatroom_send_msg(const int64_t room_id, const char *msg, const char *json_extension)
发送消息
NIM_SDK_DLL_API bool nim_chatroom_enter(const int64_t room_id, const char *request_enter_data, const char *enter_info, const char *json_extension)
聊天室进入
NIM_SDK_DLL_API void nim_chatroom_update_room_info_async(const int64_t room_id, const char *room_info_json_str, bool need_notify, const char *notify_ext, const char *json_extension, nim_chatroom_update_room_info_cb_func cb, const void *user_data)
更新聊天室信息,目前只支持更新 kNIMChatRoomInfoKeyName, kNIMChatRoomInfoKeyAnnouncement, kNIMChatRoomInfoKeyBroadcas...
NIM_SDK_DLL_API void nim_chatroom_reg_receive_msgs_cb(const char *json_extension, nim_chatroom_receive_msg_cb_func cb, const void *user_data)
注册全局接收批量消息回调
NIM_SDK_DLL_API bool nim_chatroom_independent_enter(const int64_t room_id, const char *enter_info)
独立进入聊天室
NIM_SDK_DLL_API void nim_chatroom_get_msg_history_by_tags_online_async(const int64_t room_id, const char *parameters_json_str, const char *json_extension, nim_chatroom_get_msg_cb_func cb, const void *user_data)
根据发送消息时绑定的标签查询历史消息
NIM_SDK_DLL_API void nim_chatroom_get_members_by_ids_online_async(const int64_t room_id, const char *ids_json_array_string, const char *json_extension, nim_chatroom_get_members_cb_func cb, const void *user_data)
异步获取指定成员信息
NIM_SDK_DLL_API void nim_chatroom_get_members_online_async(const int64_t room_id, const char *parameters_json_str, const char *json_extension, nim_chatroom_get_members_cb_func cb, const void *user_data)
异步获取聊天室成员信息
NIM_SDK_DLL_API void nim_chatroom_update_location_async(const int64_t room_id, NIMChatRoomLocation location, nim_chatroom_update_location_cb_func cb, const char *json_extension, const void *user_data)
更新聊天室当前用户的位置信息,一般配合游戏业务使用
NIM_SDK_DLL_API void nim_chatroom_query_members_count_by_tag_async(const int64_t room_id, const char *target_tag, const char *json_extension, nim_chatroom_query_members_count_by_tag_cb_func cb, const void *user_data)
查询指定 tag 在聊天室的成员数量
NIM_SDK_DLL_API void nim_chatroom_reg_receive_notification_cb(const char *json_extension, nim_chatroom_receive_notification_cb_func cb, const void *user_data)
注册全局接收通知回调
NIM_SDK_DLL_API void nim_chatroom_temp_mute_member_async(const int64_t room_id, const char *accid, const int64_t duration, bool need_notify, const char *notify_ext, const char *json_extension, nim_chatroom_temp_mute_member_cb_func cb, const void *user_data)
异步临时禁言/解禁成员
NIM_SDK_DLL_API char * nim_chatroom_query_all_robots_block(const int64_t room_id, const char *json_extension)
获取全部机器人信息(同步接口,堵塞NIM内部线程)
NIM_SDK_DLL_API void nim_chatroom_set_msgs_batch_report(bool set_batch, const char *json_extension)
设置消息接收批量上报开关
NIM_SDK_DLL_API void nim_chatroom_update_my_role_async(const int64_t room_id, const char *role_info_json_str, bool need_notify, const char *notify_ext, const char *json_extension, nim_chatroom_update_my_role_cb_func cb, const void *user_data)
更新我的信息,目前只支持更新kNIMChatRoomMemberInfoKeyNick,kNIMChatRoomMemberInfoKeyAvatar,kNIMChatRoomMemberInfoKey...
NIM_SDK_DLL_API void nim_chatroom_temp_mute_member_by_tag_async(const int64_t room_id, const char *target_tag, const int64_t duration, bool need_notify, const char *notify_ext, const char *notify_tags, const char *json_extension, nim_chatroom_temp_mute_member_cb_func cb, const void *user_data)
异步禁言指定 tag 成员
NIM_SDK_DLL_API bool nim_chatroom_independent_enter2(const int64_t room_id, const char *enter_info, const NIMChatRoomConfigGetter config_getter)
独立进入聊天室
NIM_SDK_DLL_API void nim_chatroom_reg_exit_cb(const char *json_extension, nim_chatroom_exit_cb_func cb, const void *user_data)
注册全局登出、被踢回调
NIM_SDK_DLL_API void nim_chatroom_cleanup(const char *json_extension)
聊天室模块清理(SDK卸载前调用一次)
NIM_SDK_DLL_API bool nim_chatroom_enter_with_anoymity(const int64_t room_id, const char *anonymity_info, const char *enter_info, const char *json_extension)
聊天室匿名进入
NIM_SDK_DLL_API void nim_chatroom_queue_list_async(const int64_t room_id, const char *json_extension, nim_chatroom_queue_list_cb_func cb, const void *user_data)
排序列出所有麦序元素
NIM_SDK_DLL_API bool nim_chatroom_enter_with_anoymity2(const int64_t room_id, const char *anonymity_info, const char *enter_info, const NIMChatRoomConfigGetter config_getter)
聊天室匿名进入
NIM_SDK_DLL_API void nim_chatroom_queue_poll_async(const int64_t room_id, const char *element_key, const char *json_extension, nim_chatroom_queue_poll_cb_func cb, const void *user_data)
取出麦序头元素
NIM_SDK_DLL_API void nim_chatroom_batch_upate_async(const int64_t room_id, const char *element_info_json_str, bool need_notify, const char *notify_ext, const char *json_extension, nim_chatroom_batch_update_cb cb, const void *user_data)
批量更新队列信息
NIM_SDK_DLL_API void nim_chatroom_init(const char *json_extension)
聊天室模块初始化(SDK初始化时调用一次)
NIM_SDK_DLL_API void nim_chatroom_update_tags_async(const int64_t room_id, NIMChatRoomUpdateTagsInfo tags_info, nim_chatroom_update_tags_cb_func cb, const char *json_extension, const void *user_data)
更新聊天室标签
NIM_SDK_DLL_API void nim_chatroom_reg_custom_token_cb(const char *json_extension, nim_chatroom_custom_token_cb_func cb, const void *user_data)
NIM_SDK_DLL_API void nim_chatroom_get_members_by_tag_online_async(const int64_t room_id, const char *parameters_json_str, const char *json_extension, nim_chatroom_get_members_cb_func cb, const void *user_data)
根据 tag 分页获取聊天室成员列表
NIM_SDK_DLL_API void nim_chatroom_queue_drop_async(const int64_t room_id, const char *json_extension, nim_chatroom_queue_drop_cb_func cb, const void *user_data)
(聊天室管理员权限)删除麦序队列
NIM_SDK_DLL_API char * nim_chatroom_query_robot_by_accid_block(const int64_t room_id, const char *accid, const char *json_extension)
获取指定机器人信息(同步接口,堵塞NIM内部线程)
NIM_SDK_DLL_API void nim_chatroom_get_info_async(const int64_t room_id, const char *json_extension, nim_chatroom_get_info_cb_func cb, const void *user_data)
异步获取当前聊天室信息
NIM_SDK_DLL_API void nim_chatroom_get_robots_async(const int64_t room_id, int64_t timetag, const char *json_extension, nim_chatroom_query_robots_cb_func cb, const void *user_data)
获取全部机器人信息
NIM_SDK_DLL_API void nim_chatroom_set_member_attribute_async(const int64_t room_id, const char *notify_ext, const char *json_extension, nim_chatroom_set_member_attribute_cb_func cb, const void *user_data)
异步修改成员身份标识
void(* nim_chatroom_tags_changed_cb_func)(int64_t room_id, const char *new_tags, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:358
void(* nim_chatroom_update_my_role_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:238
void(* nim_chatroom_queue_header_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:287
void(* nim_chatroom_enter_cb_func)(int64_t room_id, int enter_step, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:49
void(* nim_chatroom_custom_token_cb_func)(char *auth_token, const uint32_t length, const char *json_params, const void *user_data)
Definition: nim_chatroom_def.h:348
void(* nim_chatroom_link_condition_cb_func)(int64_t room_id, int condition, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:75
void(* nim_chatroom_get_msg_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:132
void(* nim_chatroom_temp_mute_member_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:183
void(* nim_chatroom_receive_notification_cb_func)(int64_t room_id, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:107
void(* nim_chatroom_batch_update_cb)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:328
void(* nim_chatroom_update_room_info_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:228
void(* nim_chatroom_sdk_log_cb_func)(const char *log_content, const void *user_data)
Definition: nim_chatroom_def.h:376
void(* nim_chatroom_query_robots_cb_func)(int rescode, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:317
void(* nim_chatroom_sendmsg_arc_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:87
void(* nim_chatroom_queue_poll_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:261
NIMChatRoomProxyType
Definition: nim_chatroom_def.h:863
void(* nim_chatroom_get_members_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:120
void(* nim_chatroom_receive_msg_cb_func)(int64_t room_id, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:97
void(* nim_chatroom_queue_offer_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:248
void(* nim_chatroom_update_location_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:338
void(* nim_chatroom_queue_list_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:274
void(* nim_chatroom_queue_drop_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:297
void(* nim_chatroom_kick_member_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:170
void(* nim_chatroom_get_info_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:160
void(* nim_chatroom_set_member_attribute_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:144
void(* nim_chatroom_exit_cb_func)(int64_t room_id, int error_code, int exit_type, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:65
void(* nim_chatroom_update_tags_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:368
void(* nim_chatroom_query_members_count_by_tag_cb_func)(int64_t room_id, int error_code, uint64_t count, const char *json_extension, const void *user_data)
Definition: nim_chatroom_def.h:198
NIM SDK 及 NIM ChatRoom SDK 公用头文件
Definition: nim_chatroom_def.h:16