NIM PC Cross Platform SDK
nim_qchat_member_cpp_def.h
Go to the documentation of this file.
1
11#ifndef __NIM_QCHAT_MEMBER_CPP_DEF_H__
12#define __NIM_QCHAT_MEMBER_CPP_DEF_H__
13
16
17namespace nim_qchat {
18
20struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatMemberInfo {
22 uint64_t server_id{0};
24 uint64_t channel_id{0};
26 std::string accid{""};
28 std::string nick{""};
30 std::string avatar{""};
32 std::string custom{""};
34 uint32_t type{0};
36 uint64_t join_time{0};
38 std::string inviter{""};
40 bool valid_flag{true};
42 uint64_t create_time{0};
44 uint64_t update_time{0};
45 QChatMemberInfo() = default;
46 QChatMemberInfo(const NIMQChatMemberInfo& c_param) {
47 server_id = c_param.server_id;
48 channel_id = c_param.channel_id;
49 accid = c_param.accid ? c_param.accid : "";
50 nick = c_param.nick ? c_param.nick : "";
51 avatar = c_param.avatar ? c_param.avatar : "";
52 custom = c_param.custom ? c_param.custom : "";
53 type = c_param.type;
54 join_time = c_param.join_time;
55 inviter = c_param.inviter ? c_param.inviter : "";
56 valid_flag = c_param.valid_flag;
57 create_time = c_param.create_time;
58 update_time = c_param.update_time;
59 }
60 const NIMQChatMemberInfo ToCParam() const {
61 NIMQChatMemberInfo c_param = {};
62 c_param.server_id = server_id;
63 c_param.channel_id = channel_id;
64 c_param.accid = const_cast<char*>(accid.c_str());
65 c_param.nick = const_cast<char*>(nick.c_str());
66 c_param.avatar = const_cast<char*>(avatar.c_str());
67 c_param.custom = const_cast<char*>(custom.c_str());
68 c_param.type = type;
69 c_param.join_time = join_time;
70 c_param.inviter = const_cast<char*>(inviter.c_str());
71 c_param.valid_flag = valid_flag;
72 c_param.create_time = create_time;
73 c_param.update_time = update_time;
74 return c_param;
75 }
76};
77
79struct NIM_QCHAT_SDK_CPPWRAPPER_DLL_API QChatMemberBanInfo {
81 uint64_t server_id{0};
83 std::string accid{""};
85 std::string custom{""};
87 uint64_t ban_time{0};
89 bool valid_flag{false};
91 uint64_t create_time{0};
93 uint64_t update_time{0};
94 QChatMemberBanInfo() = default;
96 server_id = c_param.server_id;
97 accid = c_param.accid ? c_param.accid : "";
98 custom = c_param.custom ? c_param.custom : "";
99 ban_time = c_param.ban_time;
100 valid_flag = c_param.valid_flag;
101 create_time = c_param.create_time;
102 update_time = c_param.update_time;
103 }
104 const NIMQChatMemberBanInfo ToCParam() const {
105 NIMQChatMemberBanInfo c_param = {};
106 c_param.server_id = server_id;
107 c_param.accid = const_cast<char*>(accid.c_str());
108 c_param.custom = const_cast<char*>(custom.c_str());
109 c_param.ban_time = ban_time;
110 c_param.valid_flag = valid_flag;
111 c_param.create_time = create_time;
112 c_param.update_time = update_time;
113 return c_param;
114 }
115};
116
117} // namespace nim_qchat
118
119#endif // __NIM_QCHAT_MEMBER_CPP_DEF_H__
namespace nim_qchat
Definition: nim_qchat_member_def.h:49
char * accid
用户accid
Definition: nim_qchat_member_def.h:53
uint64_t server_id
server id
Definition: nim_qchat_member_def.h:51
char * custom
自定义字段
Definition: nim_qchat_member_def.h:55
uint64_t create_time
创建时间
Definition: nim_qchat_member_def.h:61
bool valid_flag
有效标记,false:无效 true:有效
Definition: nim_qchat_member_def.h:59
uint64_t ban_time
封禁时间
Definition: nim_qchat_member_def.h:57
uint64_t update_time
更新时间
Definition: nim_qchat_member_def.h:63
Definition: nim_qchat_member_def.h:21
uint32_t type
用户类型,0:普通用户 1:所有者
Definition: nim_qchat_member_def.h:35
uint64_t update_time
更新时间
Definition: nim_qchat_member_def.h:45
char * avatar
头像url
Definition: nim_qchat_member_def.h:31
uint64_t server_id
server id
Definition: nim_qchat_member_def.h:23
uint64_t create_time
创建时间
Definition: nim_qchat_member_def.h:43
char * inviter
邀请人
Definition: nim_qchat_member_def.h:39
char * custom
自定义字段
Definition: nim_qchat_member_def.h:33
bool valid_flag
有效标记,false:无效 true:有效
Definition: nim_qchat_member_def.h:41
uint64_t join_time
加入时间
Definition: nim_qchat_member_def.h:37
char * nick
昵称
Definition: nim_qchat_member_def.h:29
char * accid
用户accid
Definition: nim_qchat_member_def.h:27
uint64_t channel_id
channel id
Definition: nim_qchat_member_def.h:25
Definition: nim_qchat_member_cpp_def.h:79
Definition: nim_qchat_member_cpp_def.h:20