NIM PC Cross Platform SDK
nim_cpp_robot.h
Go to the documentation of this file.
1
7#ifndef _NIM_SDK_CPP_ROBOT_H_
8#define _NIM_SDK_CPP_ROBOT_H_
9
10#include <functional>
11#include <string>
18namespace nim {
19
23class NIM_SDK_CPPWRAPPER_DLL_API Robot {
24public:
26 typedef std::function<void(NIMResCode rescode, NIMRobotInfoChangeType type, const RobotInfos&)> RobotChangedCallback;
28 typedef std::function<void(NIMResCode rescode, const RobotInfos& infos)> RobotQueryCallback;
29
36 static void RegChangedCallback(const RobotChangedCallback& callback, const std::string& json_extension = "");
37
43 static RobotInfos QueryAllRobotInfosBlock(const std::string& json_extension = "");
44
51 static RobotInfo QueryRobotInfoByAccidBlock(const std::string& accid, const std::string& json_extension = "");
52
60 static void GetRobotInfoAsync(const int64_t timetag, const RobotQueryCallback& callback, const std::string& json_extension = "");
65 static void UnregRobotCb();
66};
67
68} // namespace nim
69
70#endif //_NIM_SDK_CPP_ROBOT_H_
NIM SDK提供的Robot接口
Definition: nim_cpp_robot.h:23
std::function< void(NIMResCode rescode, NIMRobotInfoChangeType type, const RobotInfos &)> RobotChangedCallback
机器人信息变更事件通知回调模板
Definition: nim_cpp_robot.h:26
std::function< void(NIMResCode rescode, const RobotInfos &infos)> RobotQueryCallback
获取机器人信息事件通知回调模板
Definition: nim_cpp_robot.h:28
namespace nim
NIMResCode
Definition: nim_chatroom_res_code_def.h:15
NIMRobotInfoChangeType
Definition: nim_robot_def.h:36
SDK波特机器人辅助方法
定义导出宏
机器人信息
Definition: nim_robot_helper.h:23