26 typedef std::function<void(
const std::function<
void()>&)>
SDKClosure;
28 typedef std::function<
40 typedef std::function<void(int64_t room_id,
const std::list<ChatRoomMessage>& result)>
ReceiveMsgsCallback;
44 typedef std::function<void(int64_t room_id,
int error_code,
const std::list<ChatRoomMemberInfo>& infos)>
GetMembersCallback;
48 typedef std::function<void(int64_t room_id,
int error_code,
const std::list<ChatRoomMessage>& msgs)>
GetMsgHistoryCallback;
62 typedef std::function<void(
const std::string& appkey,
const std::string& account, std::string& token)>
RequestTokenCallback;
64 typedef std::function<void(
const std::string& appkey,
const std::string& account, std::string& token)>
RequestExtensionCallback;
88 typedef std::function<void(int64_t room_id,
int error_code,
const std::list<std::string>& not_in_queue)>
QueueBatchUpdateCallback;
99 static void RegEnterCb(
const EnterCallback& cb,
const std::string& json_extension =
"");
107 static void RegExitCb(
const ExitCallback& cb,
const std::string& json_extension =
"");
115 static void RegExitCb_2(
const ExitCallback_2& cb,
const std::string& json_extension =
"");
123 static void RegSendMsgAckCb(
const SendMsgAckCallback& cb,
const std::string& json_extension =
"");
131 static void RegReceiveMsgCb(
const ReceiveMsgCallback& cb,
const std::string& json_extension =
"");
139 static void RegReceiveMsgsCb(
const ReceiveMsgsCallback& cb,
const std::string& json_extension =
"");
147 static void RegNotificationCb(
const NotificationCallback& cb,
const std::string& json_extension =
"");
155 static void RegLinkConditionCb(
const LinkConditionCallback& cb,
const std::string& json_extension =
"");
157 static void RegTagsChangedCb(
const TagsChangedCallback& cb,
const std::string& json_extension =
"");
165 static void RegCustomTokenCb(
const CustomTokenCallback& cb,
const std::string& json_extension =
"");
173 static void RegRequestLoginTokenCb(
const RequestTokenCallback& cb,
const std::string& json_extension =
"");
184 static void RegRequestLoginExtensionCb(
const RequestExtensionCallback& cb,
const std::string& json_extension =
"");
191 static void RegSDKLogCallback(
const SDKLogCallback& callback);
199 static bool Init(
const std::string& app_install_dir,
const std::string& json_extension =
"");
215 static void Cleanup(
const std::string& json_extension =
"");
256 static bool AnonymousEnter(
const int64_t room_id,
259 const std::string& json_extension =
"");
270 static bool AnonymousEnter2(
const int64_t room_id,
284 static bool Enter(
const int64_t room_id,
285 const std::string& request_login_data,
287 const std::string& json_extension =
"");
295 static void Exit(
const int64_t room_id,
const std::string& json_extension =
"");
303 static NIMChatRoomLoginState GetLoginState(
const int64_t room_id,
const std::string& json_extension =
"");
311 static void SetMsgsBatchReport(
bool set_batch,
const std::string& json_extension =
"");
320 static void SendMsg(
const int64_t room_id,
const std::string& json_msg,
const std::string& json_extension =
"");
329 static void SendMsg(
const int64_t room_id,
const ChatRoomMessage& message,
const std::string& json_extension =
"");
346 const std::string& client_msg_id,
347 const std::string& attach,
348 const std::string& msg_body,
351 int32_t msg_sub_type = 0,
352 const std::string& target_tags =
"");
363 static void GetMembersOnlineAsync(
const int64_t room_id,
365 const GetMembersCallback& callback,
366 const std::string& json_extension =
"");
376 static void GetMembersByTagOnlineAsync(
const int64_t room_id,
378 const GetMembersCallback& callback,
379 const std::string& json_extension =
"");
389 static void GetMembersCountByTagOnlineAsync(
const int64_t room_id,
390 const std::string& target_tag,
392 const std::string& json_extension);
403 static void GetMessageHistoryOnlineAsync(
const int64_t room_id,
405 const GetMsgHistoryCallback& callback,
406 const std::string& json_extension =
"");
417 static void GetMessageHistoryByTagsOnlineAsync(
const int64_t room_id,
419 const GetMsgHistoryCallback& callback,
420 const std::string& json_extension =
"");
431 static void SetMemberAttributeOnlineAsync(
const int64_t room_id,
433 const SetMemberAttributeCallback& callback,
434 const std::string& json_extension =
"");
443 static void GetInfoAsync(
const int64_t room_id,
const GetChatRoomInfoCallback& callback,
const std::string& json_extension =
"");
454 static void GetMemberInfoByIDsAsync(
const int64_t room_id,
455 const std::list<std::string>& ids,
456 const GetMembersCallback& callback,
457 const std::string& json_extension =
"");
469 static void KickMemberAsync(
const int64_t room_id,
470 const std::string&
id,
471 const std::string& notify_ext,
473 const std::string& json_extension =
"");
484 static void SetProxy(
NIMChatRoomProxyType type,
const std::string& host,
int port,
const std::string& user,
const std::string& password);
498 static void TempMuteMemberAsync(
const int64_t room_id,
499 const std::string& accid,
500 const int64_t duration,
502 const std::string& notify_ext,
504 const std::string& json_extension =
"");
518 static void TempMuteMemberByTagAsync(
const int64_t room_id,
519 const std::string& target_tag,
520 const int64_t duration,
522 const std::string& notify_ext,
524 const std::string& notify_tags =
"",
525 const std::string& json_extension =
"");
539 static void UpdateRoomInfoAsync(
const int64_t room_id,
542 const std::string& notify_ext,
544 const std::string& json_extension =
"");
558 static void UpdateMyRoomRoleAsync(
const int64_t room_id,
561 const std::string& notify_ext,
563 const std::string& json_extension =
"");
574 static void QueueOfferAsync(
const int64_t room_id,
577 const std::string& json_extension =
"{\"transient\":true}");
589 static void QueueOfferAsyncEx(
const int64_t room_id,
603 static void QueuePollAsync(
const int64_t room_id,
604 const std::string& element_key,
605 const QueuePollCallback& callback,
606 const std::string& json_extension =
"");
615 static void QueueListAsync(
const int64_t room_id,
const QueueListCallback& callback,
const std::string& json_extension =
"");
624 static void QueueHeaderAsync(
const int64_t room_id,
const QueueHeaderCallback& callback,
const std::string& json_extension =
"");
633 static void QueueDropAsync(
const int64_t room_id,
const QueueDropCallback& callback,
const std::string& json_extension =
"");
639 static void UnregChatroomCb();
647 static RobotInfos QueryAllRobotInfosBlock(
const int64_t room_id,
const std::string& json_extension =
"");
656 static RobotInfo QueryRobotInfoByAccidBlock(
const int64_t room_id,
const std::string& accid,
const std::string& json_extension =
"");
667 static void GetRobotInfoAsync(
const int64_t room_id,
668 const int64_t timetag,
669 const RobotQueryCallback& callback,
670 const std::string& json_extension =
"");
681 static void QueueBatchUpdateAsync(
const int64_t room_id,
684 const std::string& notify_ext,
685 const QueueBatchUpdateCallback& callback,
686 const std::string& json_extension =
"");
697 static bool UpdateLocation(
const int64_t room_id,
700 const std::string& json_extension =
"");
711 static bool UpdateTags(
const int64_t room_id,
714 const std::string& json_extension =
"");