7#ifndef _NIM_SDK_CPP_RTS_H_
8#define _NIM_SDK_CPP_RTS_H_
67 values_temp[nim::kNIMRtsVChatCustomAudio] =
custom_audio_ ? 1 : 0;
68 values_temp[nim::kNIMRtsVChatCustomVideo] =
custom_video_ ? 1 : 0;
69 values_temp[nim::kNIMRtsDataRecord] =
data_record_ ? 1 : 0;
71 values_temp[nim::kNIMRtsApnsText] =
apns_;
72 values_temp[nim::kNIMRtsCreateCustomInfo] =
custom_info_;
73 values_temp[nim::kNIMRtsPushEnable] =
push_enable_ ? 1 : 0;
74 values_temp[nim::kNIMRtsNeedBadge] =
need_badge_ ? 1 : 0;
75 values_temp[nim::kNIMRtsNeedFromNick] =
need_nick_ ? 1 : 0;
76 values_temp[nim::kNIMRtsApnsPayload] =
payload_;
77 values_temp[nim::kNIMRtsSound] =
sound_;
78 values_temp[nim::kNIMRtsKeepCalling] =
keepcalling_ ? 1 : 0;
79 values_temp[nim::kNIMRtsWebRtc] =
webrtc_ ? 1 : 0;
92 typedef std::function<void(
const std::string& session_id,
int channel_type,
const std::string& uid,
const std::string& custom_info)>
95 typedef std::function<void(
NIMResCode res_code,
const std::string& session_id, int64_t channel_id,
const std::string& custom_info)>
97 typedef std::function<void(
NIMResCode res_code,
const std::string& session_id,
int channel_type,
bool accept)>
AckCallback;
98 typedef std::function<void(
const std::string& session_id,
int channel_type,
bool accept,
const std::string& uid)>
AckNotifyCallback;
99 typedef std::function<void(
const std::string& session_id,
int channel_type,
bool accept)>
SyncAckNotifyCallback;
100 typedef std::function<void(
const std::string& session_id,
int channel_type,
int code,
const std::string& json)>
ConnectNotifyCallback;
101 typedef std::function<void(
const std::string& session_id,
int channel_type,
const std::string& uid,
int code,
int leave_type)>
106 typedef std::function<void(
const std::string& session_id,
const std::string& info,
const std::string& uid)>
ControlNotifyCallback;
107 typedef std::function<void(
const std::string& session_id,
int channel_type,
const std::string& uid,
const std::string& data)>
RecDataCallback;
108 typedef std::function<void(
NIMResCode res_code,
const std::string& session_id,
int channel_type,
const std::string& json)>
OptCallback;
119 static void SetProxy(
NIMProxyType type,
const std::string& host,
int port,
const std::string& user,
const std::string& password);
136 static void StartChannel(
int channel_type,
const std::string& uid,
RtsStartInfo info,
const StartChannelCallback& cb);
146 static void SetStartNotifyCb(
const StartNotifyCallback& cb);
157 static void CreateConf(
const std::string& name,
const std::string& custom_info,
const CreateConfCallback& cb);
169 static void JoinConf(
const std::string& name,
const std::string& session_id,
bool record,
const JoinConfCallback& cb);
181 static void Ack(
const std::string& session_id,
int channel_type,
bool accept,
bool data_record,
bool audio_record,
const AckCallback& cb);
190 static void SetAckNotifyCb(
const AckNotifyCallback& cb);
197 static void SetSyncAckNotifyCb(
const SyncAckNotifyCallback& cb);
205 static void SetConnectNotifyCb(
const ConnectNotifyCallback& cb);
213 static void SetMemberChangeCb(
const MemberNotifyCallback& cb);
223 static void Control(
const std::string& session_id,
const std::string& info,
const ControlCallback& cb);
230 static void SetControlNotifyCb(
const ControlNotifyCallback& cb);
238 static void SetVChatMode(
const std::string& session_id,
int mode);
247 static void Hangup(
const std::string& session_id,
const HangupCallback& cb);
254 static void SetHangupNotifyCb(
const HangupNotifyCallback& cb);
263 static void Relogin(
const std::string& session_id,
int channel_type, OptCallback cb);
275 static void SendData(
const std::string& session_id,
int channel_type,
const std::string& data,
const std::string& uid =
"");
283 static void SetRecDataCb(
const RecDataCallback& cb);
NIM Rts提供的相关接口
Definition nim_cpp_rts.h:89
std::function< void(const std::string &session_id, int channel_type, const std::string &uid, const std::string &data) RecDataCallback)
Definition nim_cpp_rts.h:107
std::function< void(NIMResCode res_code)> CreateConfCallback
Definition nim_cpp_rts.h:94
std::function< void(NIMResCode res_code, const std::string &session_id, int channel_type, bool accept) AckCallback)
Definition nim_cpp_rts.h:97
std::function< void(NIMResCode res_code, const std::string &session_id, const std::string &info) ControlCallback)
Definition nim_cpp_rts.h:105
std::function< void(const std::string &session_id, int channel_type, const std::string &uid, int code, int leave_type) MemberNotifyCallback)
Definition nim_cpp_rts.h:102
std::function< void(const std::string &session_id, const std::string &info, const std::string &uid) ControlNotifyCallback)
Definition nim_cpp_rts.h:106
std::function< void(NIMResCode res_code, const std::string &session_id, int channel_type, const std::string &json) OptCallback)
Definition nim_cpp_rts.h:108
std::function< void(const std::string &session_id, const std::string &uid) HangupNotifyCallback)
Definition nim_cpp_rts.h:104
std::function< void(const std::string &session_id, int channel_type, const std::string &uid, const std::string &custom_info) StartNotifyCallback)
Definition nim_cpp_rts.h:93
std::function< void(const std::string &session_id, int channel_type, int code, const std::string &json) ConnectNotifyCallback)
Definition nim_cpp_rts.h:100
std::function< void(const std::string &session_id, int channel_type, bool accept) SyncAckNotifyCallback)
Definition nim_cpp_rts.h:99
std::function< void(NIMResCode res_code, const std::string &session_id, int channel_type, const std::string &uid) StartChannelCallback)
Definition nim_cpp_rts.h:91
std::function< void(const std::string &session_id, int channel_type, bool accept, const std::string &uid) AckNotifyCallback)
Definition nim_cpp_rts.h:98
std::function< void(NIMResCode res_code, const std::string &session_id) HangupCallback)
Definition nim_cpp_rts.h:103
std::function< void(NIMResCode res_code, const std::string &session_id, int64_t channel_id, const std::string &custom_info) JoinConfCallback)
Definition nim_cpp_rts.h:96
Represents a JSON value.
Definition value.h:196
std::string GetJsonStringWithNoStyled(const nim_cpp_wrapper_util::Json::Value &values)
获得非格式化的Json string,传入SDK的json string格式要求为非格式化的,如果是格式化的json string可能会影响功能
Definition nim_json_util.cpp:89
NIMProxyType
Definition nim_global_def.h:204
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition nim_sdk_cpp_wrapper.h:38
NIMResCode
Definition public_defines.h:21
点对点白板发起的参数信息
Definition nim_cpp_rts.h:23
bool need_nick_
是否需要推送昵称
Definition nim_cpp_rts.h:41
std::string payload_
JSON格式,推送payload
Definition nim_cpp_rts.h:43
bool keepcalling_
是否强制持续呼叫(对方离线也会呼叫)
Definition nim_cpp_rts.h:47
std::string custom_info_
string 自定义数据,透传给被邀请方
Definition nim_cpp_rts.h:35
std::string apns_
推送用的文本
Definition nim_cpp_rts.h:33
bool custom_video_
是否用自主的视频数据
Definition nim_cpp_rts.h:25
RtsStartInfo()
Definition nim_cpp_rts.h:53
std::string GetJsonStr()
Definition nim_cpp_rts.h:64
bool webrtc_
是否支持webrtc互通(针对点对点中的音频通话)
Definition nim_cpp_rts.h:49
bool custom_audio_
是否用自主的音频数据
Definition nim_cpp_rts.h:27
bool data_record_
是否需要服务器录制白板数据
Definition nim_cpp_rts.h:29
std::string session_id_
会话id
Definition nim_cpp_rts.h:51
std::string sound_
推送声音
Definition nim_cpp_rts.h:45
bool need_badge_
是否需要角标计数
Definition nim_cpp_rts.h:39
bool audio_record_
是否需要服务器录制音频数据
Definition nim_cpp_rts.h:31
bool push_enable_
是否需要推送
Definition nim_cpp_rts.h:37