NIM SDK API  9.0.0
Public Member Functions | List of all members
nim_chatroom::ChatRoomEnterInfo Struct Reference

聊天室登录信息 More...

#include <nim_chatroom_helper.h>

Public Member Functions

void SetNick (const std::string &nick)
 设置进入聊天室后展示的昵称,选填 More...
 
void SetAvatar (const std::string &avatar)
 设置进入聊天室后展示的头像,选填 More...
 
void SetExt (const nim_cpp_wrapper_util::Json::Value &ext)
 设置聊天室可用的扩展字段,选填 More...
 
void SetNotifyExt (const nim_cpp_wrapper_util::Json::Value &notify_ext)
 设置进入聊天室通知开发者扩展字段,选填 More...
 
void SetLoginTag (const std::list< std::string > &login_tags)
 设置登录携带的 tag 列表,允许多个 More...
 
void SetNotifyTags (const std::string &expression)
 登录时携带的 notify tag 表达式 More...
 
void SetLocation (NIMChatRoomLocation location)
 登录聊天室时传递的位置信息 More...
 
void EnableLocation (bool enable)
 是否启用聊天室空间位置信息功能,启用后 SetLocation 功能才生效,否则 SDK 不解析 Location 信息 More...
 
void SetAuthType (int auth_type)
 设置鉴权方式 More...
 
void SetLoginExt (const std::string &login_ext)
 登录自定义字段 More...
 
void SetAntiSpamBusinessID (const std::string &anti_spam_business_id)
 
std::string ToJsonString () const
 组装Json Value字符串 More...
 

Detailed Description

聊天室登录信息

Member Function Documentation

◆ EnableLocation()

void nim_chatroom::ChatRoomEnterInfo::EnableLocation ( bool  enable)
inline

是否启用聊天室空间位置信息功能,启用后 SetLocation 功能才生效,否则 SDK 不解析 Location 信息

Parameters
enabletrue 为启用,false 为关闭,该功能默认关闭
Returns
void

◆ SetAuthType()

nim_chatroom::ChatRoomEnterInfo::SetAuthType ( int  auth_type)
inline

设置鉴权方式

Parameters
auth_type0表示最初的loginToken的校验方式,1表示基于appSecret计算的token鉴权方式,2表示基于第三方回调的token鉴权方式,默认0
Returns
void

◆ SetAvatar()

void nim_chatroom::ChatRoomEnterInfo::SetAvatar ( const std::string &  avatar)
inline

设置进入聊天室后展示的头像,选填

Parameters
[in]avatar聊天室头像下载地址
Returns
void

◆ SetExt()

void nim_chatroom::ChatRoomEnterInfo::SetExt ( const nim_cpp_wrapper_util::Json::Value &  ext)
inline

设置聊天室可用的扩展字段,选填

Parameters
[in]ext聊天室可用的扩展字段
Returns
void

◆ SetLocation()

void nim_chatroom::ChatRoomEnterInfo::SetLocation ( NIMChatRoomLocation  location)
inline

登录聊天室时传递的位置信息

Parameters
location位置坐标描述
Returns
void

◆ SetLoginExt()

nim_chatroom::ChatRoomEnterInfo::SetLoginExt ( const std::string &  login_ext)
inline

登录自定义字段

配置反垃圾相关业务id

Parameters
login_ext用于提交给用户的第三方回调服务进行登录检测
Returns
void
Parameters
anti_spam_business_id用于配置反垃圾相关业务id
Returns
void

◆ SetLoginTag()

void nim_chatroom::ChatRoomEnterInfo::SetLoginTag ( const std::list< std::string > &  login_tags)
inline

设置登录携带的 tag 列表,允许多个

Parameters
login_tags要设置的 tag 列表
Returns
void

◆ SetNick()

void nim_chatroom::ChatRoomEnterInfo::SetNick ( const std::string &  nick)
inline

设置进入聊天室后展示的昵称,选填

Parameters
[in]nick聊天室昵称
Returns
void

◆ SetNotifyExt()

void nim_chatroom::ChatRoomEnterInfo::SetNotifyExt ( const nim_cpp_wrapper_util::Json::Value &  notify_ext)
inline

设置进入聊天室通知开发者扩展字段,选填

Parameters
[in]notify_ext进入聊天室通知开发者扩展字段
Returns
void

◆ SetNotifyTags()

void nim_chatroom::ChatRoomEnterInfo::SetNotifyTags ( const std::string &  expression)
inline

登录时携带的 notify tag 表达式

Parameters
expression表达式字符串,如 {"tag": "abc"} or {"tag": "def"}
Returns
void

◆ ToJsonString()

std::string nim_chatroom::ChatRoomEnterInfo::ToJsonString ( ) const
inline

组装Json Value字符串

Returns
void

The documentation for this struct was generated from the following file: