NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim::EventData结构体 参考

事件数据 更多...

#include <nim_subscribe_event_helper.h>

Public 成员函数

 EventData ()
 
nim_cpp_wrapper_util::Json::Value ToJsonObject (bool use_to_send=true) const
 
std::string ToJsonString (bool use_to_send=true) const
 组装Json Value字符串
 

Public 属性

int event_type_
 事件类型,服务器保留1~99999的事件类型,客户端自定义事件类型需大于99999
 
int event_value_
 事件状态,在线状态事件服务器保留1~9999的事件值,客户端自定义事件值需大于9999
 
std::string client_msg_id_
 客户端生成的消息id
 
std::string config_
 用户自定义事件扩展属性,最长4K
 
int64_t ttl_
 事件有效期,单位:秒,时间范围:60s到7天
 
NIMEventBroadcastType broadcast_type_
 事件广播类型
 
NIMEventSyncType sync_self_
 事件同步类型
 
int readonly_ttl_type
 TtlType枚举值
 
int readonly_durable_
 是否需要持久化(可选字段),默认为需要持久化,0:不需要持久化,1:需要持久化
 
int64_t readonly_event_time_
 事件发布的时间戳,服务器补充
 
std::string readonly_server_msg_id_
 服务端生成的消息id
 
int readonly_client_type_
 发送客户端类型
 
std::string readonly_nim_config_
 预定义事件的扩展字段(在线状态事件:在线的客户端类型Json)
 
std::string readonly_multi_config_
 多端配置信息字段,JSON格式{"clent_type":"clent_config","1":"xxx","2":"xxx"}
 
std::string readonly_publisher_accid_
 事件发布者的accid
 
std::string readonly_consid_
 发送设备id
 

详细描述

事件数据

构造及析构函数说明

◆ EventData()

nim::EventData::EventData ( )
inline

构造函数

成员函数说明

◆ ToJsonObject()

nim_cpp_wrapper_util::Json::Value nim::EventData::ToJsonObject ( bool  use_to_send = true) const
inline

◆ ToJsonString()

std::string nim::EventData::ToJsonString ( bool  use_to_send = true) const
inline

组装Json Value字符串

返回
string Json Value字符串

类成员变量说明

◆ broadcast_type_

NIMEventBroadcastType nim::EventData::broadcast_type_

事件广播类型

◆ client_msg_id_

std::string nim::EventData::client_msg_id_

客户端生成的消息id

◆ config_

std::string nim::EventData::config_

用户自定义事件扩展属性,最长4K

◆ event_type_

int nim::EventData::event_type_

事件类型,服务器保留1~99999的事件类型,客户端自定义事件类型需大于99999

◆ event_value_

int nim::EventData::event_value_

事件状态,在线状态事件服务器保留1~9999的事件值,客户端自定义事件值需大于9999

◆ readonly_client_type_

int nim::EventData::readonly_client_type_

发送客户端类型

◆ readonly_consid_

std::string nim::EventData::readonly_consid_

发送设备id

◆ readonly_durable_

int nim::EventData::readonly_durable_

是否需要持久化(可选字段),默认为需要持久化,0:不需要持久化,1:需要持久化

◆ readonly_event_time_

int64_t nim::EventData::readonly_event_time_

事件发布的时间戳,服务器补充

◆ readonly_multi_config_

std::string nim::EventData::readonly_multi_config_

多端配置信息字段,JSON格式{"clent_type":"clent_config","1":"xxx","2":"xxx"}

◆ readonly_nim_config_

std::string nim::EventData::readonly_nim_config_

预定义事件的扩展字段(在线状态事件:在线的客户端类型Json)

◆ readonly_publisher_accid_

std::string nim::EventData::readonly_publisher_accid_

事件发布者的accid

◆ readonly_server_msg_id_

std::string nim::EventData::readonly_server_msg_id_

服务端生成的消息id

◆ readonly_ttl_type

int nim::EventData::readonly_ttl_type

TtlType枚举值

◆ sync_self_

NIMEventSyncType nim::EventData::sync_self_

事件同步类型

◆ ttl_

int64_t nim::EventData::ttl_

事件有效期,单位:秒,时间范围:60s到7天


该结构体的文档由以下文件生成: