NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_talkex_helper_quick_comment.h
浏览该文件的文档.
1
7#ifndef _NIM_SDK_CPP_TALKEX_HELPER_QUICK_COMMENT_H_
8#define _NIM_SDK_CPP_TALKEX_HELPER_QUICK_COMMENT_H_
9
10#include <algorithm>
11#include <functional>
12#include <list>
13#include <string>
17#include "nim_define_include.h"
23namespace nim {
26 std::string id;
28 std::string from_account;
30 int64_t reply_type;
32 std::string client_id;
34 uint64_t server_id{0};
36 uint64_t time{0};
38 std::string ext;
44 std::string push_title;
46 std::string push_content;
48 std::string push_payload;
49
50 static std::string ToJsonString(const QuickCommentInfo& info);
51 static nim_cpp_wrapper_util::Json::Value ToJsonObject(const QuickCommentInfo& info);
52 static void FromJsonString(const std::string& json_info, QuickCommentInfo& info);
53 static void FromJsonObject(const nim_cpp_wrapper_util::Json::Value& json_info, QuickCommentInfo& info);
54};
55
59 std::string id;
61 int64_t reply_type;
63 std::string ext;
64 static std::string ToJsonString(const RemoveQuickCommentParam& param);
65};
66
69 bool AddMessage(const IMMessage& message) {
70 if (message_list.size() > 20)
71 return false;
72 if (std::find_if(message_list.begin(), message_list.end(), [&](const IMMessage& it) {
73 return message.client_msg_id_.compare(it.client_msg_id_) == 0;
74 }) != message_list.end())
75 return false;
76 message_list.emplace_back(message);
77 return true;
78 }
79 static std::string ToJsonString(const QueryQuickCommentsParam& param);
80
82 std::list<IMMessage> message_list;
83};
84
88 std::string message_client_id;
89 std::list<QuickCommentInfo> quick_comment_list;
90 };
91 std::list<QueryQuickCommentsResponseItem> message_quick_comment_list;
92 static void FromJsonString(const std::string& json_info, QueryQuickCommentsResponse& info);
93};
94} // namespace nim
95
96#endif //_NIM_SDK_CPP_TALKEX_HELPER_QUICK_COMMENT_H_
Represents a JSON value.
Definition: value.h:196
namespace nim
NIM 公共数据类型定义总的包含文件
JSON辅助方法
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
加载 NIM SDK 的帮助类头文件
Talk 辅助方法和数据结构定义
Definition: nim_talk_helper.h:305
查询快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:68
std::list< IMMessage > message_list
list 要查询的消息 一次最多查询20条
Definition: nim_talkex_helper_quick_comment.h:82
bool AddMessage(const IMMessage &message)
Definition: nim_talkex_helper_quick_comment.h:69
Definition: nim_talkex_helper_quick_comment.h:87
std::list< QuickCommentInfo > quick_comment_list
Definition: nim_talkex_helper_quick_comment.h:89
std::string message_client_id
Definition: nim_talkex_helper_quick_comment.h:88
查询快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:86
std::list< QueryQuickCommentsResponseItem > message_quick_comment_list
Definition: nim_talkex_helper_quick_comment.h:91
快捷回复属性
Definition: nim_talkex_helper_quick_comment.h:25
std::string push_payload
推送自定义字段JSON
Definition: nim_talkex_helper_quick_comment.h:48
std::string ext
自定义扩展字段,最大8字符
Definition: nim_talkex_helper_quick_comment.h:38
std::string from_account
回复者的 accid
Definition: nim_talkex_helper_quick_comment.h:28
int64_t reply_type
开发者自定义的回复类型
Definition: nim_talkex_helper_quick_comment.h:30
bool need_badge
是否需要角标,0表示不需要,1表示需要,默认0
Definition: nim_talkex_helper_quick_comment.h:42
std::string id
Definition: nim_talkex_helper_quick_comment.h:26
std::string push_title
推送标题
Definition: nim_talkex_helper_quick_comment.h:44
std::string push_content
推送文案
Definition: nim_talkex_helper_quick_comment.h:46
bool need_push
是否需要推送,0表示不需要,1表示需要,默认0
Definition: nim_talkex_helper_quick_comment.h:40
std::string client_id
被回复消息的客户端ID
Definition: nim_talkex_helper_quick_comment.h:32
删除快捷回复参数定义
Definition: nim_talkex_helper_quick_comment.h:57
int64_t reply_type
int64_t 开发者自定义的回复类型
Definition: nim_talkex_helper_quick_comment.h:61
std::string ext
string 取消操作的扩展字段
Definition: nim_talkex_helper_quick_comment.h:63
std::string id
string 服务端没有这个字段,本地为了好处理记录加上的
Definition: nim_talkex_helper_quick_comment.h:59