大规模房间
可以在后台创建大规模房间。 当普通一对多 的房间中用户人数达到 100人 时,此房间会自动升级成为大房间。可以在-
void onBecomeBigRoom()回调中监听,表示此时房间已升级为大房间。 以下接口均是在大房间情况的调用生效。
getUserNumberByRoles
- 
简要描述 获取大房间特定用户的人数 根据用户角色搜索用户,返回人数 
- 
回调 结果会以 void onGotUserNumber(int num)回调函数返回结果
- 
接口详情 void getUserNumberByRoles(const int *roles_in = 0, int roles_in_size = 0)
- 
参数 参数名 说明 roles_in 用户角色数组 roles_in_size 用户角色大小 
getUserInfoByRoles
- 
简要描述 大房间时,获取房间用户列表 根据角色,分页请求,获取特定数量的用户。 
- 
回调 结果会以 void onGotUserInfo(const std::string& jsonResult)回调函数返回结果
- 
接口详情 void getUserInfoByRoles(int start, int max, const int* roles_in = 0, int roles_in_size = 0)
- 
参数 | 参数名 | 说明 | | ---- | ---- | | start | 起始位置,比如:0,20,40等 | | max | 最大数量,比如:20 | | roles_in | 用户角色数组 | | roles_in_size | 角色大小 | 
changeUserPropertyByRoles
- 
简要描述 大房间时,批量改变指定用户的属性 
- 
回调 结果会以 void onUserPropertyChanged(tk_uid peerId,const std::string& key,const tk::Variant& value)回调函数通知其他的用户
- 
接口详情 int changeUserPropertyByRoles(const int* roles_in int roles_in_size, tk_uid tellWhom, const tk::VariantMap& properties) 
- 
参数 参数名 说明 roles_in 用户角色数组 roles_in_size 用户数量 tellWhom 接受者ID(要通知给哪些用户。“all”:所有人;“allExceptSender”:除自己以外的所有人;“allExceptAuditor”:除旁听用户以外的所有人;“None”:不通知任何人;某用户的peerID:只发给该用户) properties 被修改的用户属性 
changeUserPropertyByIds
- 
简要描述 大房间时,批量改变指定用户的属性 
- 
回调 结果会以 void onUserPropertyChanged(tk_uid peerId,const std::string& key,const tk::Variant& value)回调函数通知其他的用户
- 
接口详情 1 2 3 4 int changeUserPropertyByIds(const char** ids , int ids_len , tk_uid tellWhom , const tk::VariantMap& properties)
- 
参数 | 参数名 | 说明 | | ---- | ---- | | ids | 用户id数组 | | ids_len | 用户数量 | | tellWhom | 接受者ID(要通知给哪些用户。“all”:所有人;“allExceptSender”:除自己以外的所有人;“allExceptAuditor”:除旁听用户以外的所有人;“None”:不通知任何人;某用户的peerID:只发给该用户) | | properties | 被修改的用户属性 | 




 
                   
                  