NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_qchat_public_cpp_def.h
浏览该文件的文档.
1
11#ifndef __NIM_QCHAT_PUBLIC_CPP_DEF_H__
12#define __NIM_QCHAT_PUBLIC_CPP_DEF_H__
14
15#include <functional>
16#include <list>
17#include <map>
18#include <string>
19#include <vector>
28#include "nim_qchat_role_def.h"
31
32namespace nim {
33static const char* kNIMQChatWidth = "w";
34static const char* kNIMQChatHeight = "h";
35static const char* kNIMQChatDuration = "dur";
36static const char* kNIMQChatLatitude = "lat";
37static const char* kNIMQChatLongitude = "lng";
38static const char* kNIMQChatTitle = "title";
39static const char* kNIMQChatFilePath = "file_path";
40static const char* kNIMQChatURL = "url";
41static const char* kNIMQChatMD5 = "md5";
42static const char* kNIMQChatName = "name";
43static const char* kNIMQChatExt = "ext";
44static const char* kNIMQChatID = "id";
45static const char* kNIMQChatType = "type";
46static const char* kNIMQChatData = "data";
47
51 uint32_t res_code = 0;
52 QChatBaseResp() = default;
53 QChatBaseResp(const NIMQChatBaseResp& c_resp) { res_code = c_resp.res_code; }
55 NIMQChatBaseResp c_response{};
56 c_response.res_code = res_code;
57 return c_response;
58 }
59};
60
64 std::string text_bid;
66 std::string pic_bid;
69 text_bid = c_info.text_bid;
70 pic_bid = c_info.pic_bid;
71 }
74 c_info.text_bid = const_cast<char*>(text_bid.c_str());
75 c_info.pic_bid = const_cast<char*>(pic_bid.c_str());
76 return c_info;
77 }
78};
79
85 uint64_t next_timestamp{0};
87 std::string cursor;
88 QChatPageInfo() = default;
90 has_more = c_info.has_more;
91 next_timestamp = c_info.next_timestamp;
92 cursor = c_info.cursor ? c_info.cursor : "";
93 }
95 NIMQChatPageInfo c_info{};
96 c_info.has_more = has_more;
97 c_info.next_timestamp = next_timestamp;
98 c_info.cursor = const_cast<char*>(cursor.c_str());
99 return c_info;
100 }
101};
102
104typedef std::function<void(const QChatBaseResp&)> QChatBaseCallback;
105
106} // namespace nim
107
108#endif // __NIM_QCHAT_PUBLIC_CPP_DEF_H__
namespace nim
static const char * kNIMQChatExt
Definition nim_qchat_public_cpp_def.h:43
static const char * kNIMQChatMD5
Definition nim_qchat_public_cpp_def.h:41
static const char * kNIMQChatWidth
Definition nim_qchat_public_cpp_def.h:33
static const char * kNIMQChatHeight
Definition nim_qchat_public_cpp_def.h:34
static const char * kNIMQChatName
Definition nim_qchat_public_cpp_def.h:42
static const char * kNIMQChatLongitude
Definition nim_qchat_public_cpp_def.h:37
static const char * kNIMQChatTitle
Definition nim_qchat_public_cpp_def.h:38
static const char * kNIMQChatID
Definition nim_qchat_public_cpp_def.h:44
static const char * kNIMQChatDuration
Definition nim_qchat_public_cpp_def.h:35
static const char * kNIMQChatURL
Definition nim_qchat_public_cpp_def.h:40
static const char * kNIMQChatLatitude
Definition nim_qchat_public_cpp_def.h:36
static const char * kNIMQChatType
Definition nim_qchat_public_cpp_def.h:45
static const char * kNIMQChatData
Definition nim_qchat_public_cpp_def.h:46
std::function< void(const QChatBaseResp &) QChatBaseCallback)
通用回调模板
Definition nim_qchat_public_cpp_def.h:104
static const char * kNIMQChatFilePath
Definition nim_qchat_public_cpp_def.h:39
JSON辅助方法
圈组CPP wrapper helpers
圈组身份组相关数据结构声明
#define NIM_QCHAT_SDK_CPPWRAPPER_DLL_API
Definition nim_qchat_sdk_cpp_wrapper.h:38
Definition nim_qchat_public_def.h:141
uint32_t res_code
操作结果, 参考NIMResCode
Definition nim_qchat_public_def.h:143
Definition nim_qchat_public_def.h:149
char * pic_bid
反垃圾图片业务id
Definition nim_qchat_public_def.h:153
char * text_bid
反垃圾文本业务id
Definition nim_qchat_public_def.h:151
Definition nim_qchat_public_def.h:204
uint64_t next_timestamp
下一次分页起始时间
Definition nim_qchat_public_def.h:208
bool has_more
是否还有更多
Definition nim_qchat_public_def.h:206
char * cursor
下一次分页起始游标
Definition nim_qchat_public_def.h:210
Definition nim_qchat_public_cpp_def.h:49
NIMQChatBaseResp ToCParam() const
Definition nim_qchat_public_cpp_def.h:54
QChatBaseResp()=default
QChatBaseResp(const NIMQChatBaseResp &c_resp)
Definition nim_qchat_public_cpp_def.h:53
Definition nim_qchat_public_cpp_def.h:62
std::string pic_bid
反垃圾图片业务id
Definition nim_qchat_public_cpp_def.h:66
std::string text_bid
反垃圾文本业务id
Definition nim_qchat_public_cpp_def.h:64
QChatBusinessAntiSpamInfo(const NIMQChatBusinessAntiSpamInfo &c_info)
Definition nim_qchat_public_cpp_def.h:68
NIMQChatBusinessAntiSpamInfo ToCParam() const
Definition nim_qchat_public_cpp_def.h:72
Definition nim_qchat_public_cpp_def.h:81
NIMQChatPageInfo ToCParam() const
Definition nim_qchat_public_cpp_def.h:94
QChatPageInfo()=default
QChatPageInfo(const NIMQChatPageInfo &c_info)
Definition nim_qchat_public_cpp_def.h:89
bool has_more
是否还有更多
Definition nim_qchat_public_cpp_def.h:83
std::string cursor
下一次分页起始游标
Definition nim_qchat_public_cpp_def.h:87