NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_rts_def.h
浏览该文件的文档.
1
8#ifndef NIM_SDK_DLL_EXPORT_HEADERS_NIM_RTS_DEF_H_
9#define NIM_SDK_DLL_EXPORT_HEADERS_NIM_RTS_DEF_H_
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
25};
26
33};
40};
41
48};
49
70};
71
78static const char* kNIMRtsSessionId = "session_id";
80static const char* kNIMRtsVChatMode = "mode";
82static const char* kNIMRtsVChatCustomVideo = "custom_video";
84static const char* kNIMRtsVChatCustomAudio = "custom_audio";
86static const char* kNIMRtsDataRecord = "data_record";
88static const char* kNIMRtsAudioRecord = "audio_record";
90static const char* kNIMRtsApnsText = "apns";
92static const char* kNIMRtsCreateCustomInfo = "custom_info";
94static const char* kNIMRtsPushEnable = "push_enable";
96static const char* kNIMRtsNeedBadge = "need_badge";
98static const char* kNIMRtsNeedFromNick = "need_nick";
100static const char* kNIMRtsApnsPayload = "payload";
102static const char* kNIMRtsSound = "sound";
104static const char* kNIMRtsKeepCalling = "keepcalling";
106static const char* kNIMRtsWebRtc = "webrtc"; // json extension params for nim_rts_start and nim_rts_ack
108
115static const char* kNIMRtsChannelId = "channel_id"; // json extension params for nim_rts_start_cb_func nim_rts_connect_notify_cb_func
117
124static const char* kNIMRtsCustomInfo = "custom_info"; // json extension params for nim_rts_join_cb_func
126
133static const char* kNIMRtsUid = "uid"; // json extension params for nim_rts_send_data
135
142static const char* kNIMRtsRecordAddr = "record_addr";
144static const char* kNIMRtsRecordFile = "record_file";
146static const char* kNIMRtsVideoRecordFile = "video_record_file"; // json extension params for nim_rts_connect_notify_cb_func
148
155static const char* kNIMRtsClientType = "client_type"; // json extension params for nim_rts_sync_ack_notify_cb_func
157
164static const char* kNIMRtsLeaveType = "leave_type"; // json extension params for nim_rts_member_change_cb_func
166
178typedef void (
179 *nim_rts_start_cb_func)(int code, const char* session_id, int channel_type, const char* uid, const char* json_extension, const void* user_data);
180
192typedef void (
193 *nim_rts_start_notify_cb_func)(const char* session_id, int channel_type, const char* uid, const char* json_extension, const void* user_data);
194
202typedef void (*nim_rts_create_cb_func)(int code, const char* json_extension, const void* user_data);
203
212typedef void (*nim_rts_join_cb_func)(int code, const char* session_id, const char* json_extension, const void* user_data);
213
225typedef void (
226 *nim_rts_ack_res_cb_func)(int code, const char* session_id, int channel_type, bool accept, const char* json_extension, const void* user_data);
227
239typedef void (*nim_rts_ack_notify_cb_func)(const char* session_id,
240 int channel_type,
241 bool accept,
242 const char* uid,
243 const char* json_extension,
244 const void* user_data);
245
256typedef void (
257 *nim_rts_sync_ack_notify_cb_func)(const char* session_id, int channel_type, bool accept, const char* json_extension, const void* user_data);
258
259// 状态回调相关
270typedef void (*nim_rts_connect_notify_cb_func)(const char* session_id, int channel_type, int code, const char* json_extension, const void* user_data);
271
283typedef void (*nim_rts_member_change_cb_func)(const char* session_id,
284 int channel_type,
285 int type,
286 const char* uid,
287 const char* json_extension,
288 const void* user_data);
289
290// 控制接口
301typedef void (*nim_rts_control_res_cb_func)(int code, const char* session_id, const char* info, const char* json_extension, const void* user_data);
302
313typedef void (
314 *nim_rts_control_notify_cb_func)(const char* session_id, const char* info, const char* uid, const char* json_extension, const void* user_data);
315
316// 结束相关
325typedef void (*nim_rts_hangup_res_cb_func)(int code, const char* session_id, const char* json_extension, const void* user_data);
326
335typedef void (*nim_rts_hangup_notify_cb_func)(const char* session_id, const char* uid, const char* json_extension, const void* user_data);
336
347typedef void (*nim_rts_rec_data_cb_func)(const char* session_id,
348 int channel_type,
349 const char* uid,
350 const char* data,
351 unsigned int size,
352 const char* json_extension,
353 const void* user_data);
354
364typedef void (*nim_rts_opt_cb_func)(int code, const char* session_id, int channel_type, const char* json_extension, const void* user_data);
365
366#ifdef __cplusplus
367};
368#endif //__cplusplus
369#endif // NIM_SDK_DLL_EXPORT_HEADERS_NIM_RTS_DEF_H_
static const char * kNIMRtsCreateCustomInfo
string 自定义数据,透传给被邀请方 nim_rts_ack无效
Definition: nim_rts_def.h:92
void(* nim_rts_opt_cb_func)(int code, const char *session_id, int channel_type, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:364
NIMRtsConnectStatus
Definition: nim_rts_def.h:51
@ kNIMRtsConnectStatusTimeout
超时
Definition: nim_rts_def.h:57
@ kNIMRtsConnectStatusDesKey
密码加密错误
Definition: nim_rts_def.h:63
@ kNIMRtsConnectStatusLogout
退出
Definition: nim_rts_def.h:69
@ kNIMRtsConnectStatusInvalidParam
错误参数
Definition: nim_rts_def.h:61
@ kNIMRtsConnectStatusSuccess
成功
Definition: nim_rts_def.h:59
@ kNIMRtsConnectStatusInvalidRequst
错误请求
Definition: nim_rts_def.h:65
@ kNIMRtsConnectStatusStartFail
启动失败
Definition: nim_rts_def.h:55
@ kNIMRtsConnectStatusDisconn
断开连接
Definition: nim_rts_def.h:53
@ kNIMRtsConnectStatusServerUnknown
服务器内部错误
Definition: nim_rts_def.h:67
void(* nim_rts_control_notify_cb_func)(const char *session_id, const char *info, const char *uid, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:314
static const char * kNIMRtsWebRtc
int, 是否支持webrtc互通(针对点对点中的音频通话)
Definition: nim_rts_def.h:106
void(* nim_rts_hangup_notify_cb_func)(const char *session_id, const char *uid, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:335
void(* nim_rts_ack_notify_cb_func)(const char *session_id, int channel_type, bool accept, const char *uid, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:239
static const char * kNIMRtsAudioRecord
int 是否需要服务器录制音频数据 >0表示是
Definition: nim_rts_def.h:88
static const char * kNIMRtsNeedBadge
int 是否需要角标计数 >0表示是 默认是
Definition: nim_rts_def.h:96
static const char * kNIMRtsUid
string 用户账号uid
Definition: nim_rts_def.h:133
static const char * kNIMRtsVideoRecordFile
string 录制的视频文件名(服务器开启录制时有效)
Definition: nim_rts_def.h:146
void(* nim_rts_member_change_cb_func)(const char *session_id, int channel_type, int type, const char *uid, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:283
void(* nim_rts_hangup_res_cb_func)(int code, const char *session_id, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:325
static const char * kNIMRtsApnsText
string 推送用的文本 nim_rts_ack无效
Definition: nim_rts_def.h:90
NIMRtsMemberLeftType
Definition: nim_rts_def.h:35
@ kNIMRtsMemberLeftTimeout
成员超时掉线
Definition: nim_rts_def.h:37
@ kNIMRtsMemberLeftNormal
成员离开
Definition: nim_rts_def.h:39
void(* nim_rts_join_cb_func)(int code, const char *session_id, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:212
static const char * kNIMRtsVChatCustomAudio
int 是否用自主的音频数据 >0表示是
Definition: nim_rts_def.h:84
void(* nim_rts_control_res_cb_func)(int code, const char *session_id, const char *info, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:301
NIMRtsChannelType
Definition: nim_rts_def.h:16
@ kNIMRtsChannelTypeTcp
tcp通道
Definition: nim_rts_def.h:20
@ kNIMRtsChannelTypeUdp
udp通道 暂不支持
Definition: nim_rts_def.h:22
@ kNIMRtsChannelTypeNone
无通道
Definition: nim_rts_def.h:18
@ kNIMRtsChannelTypeVchat
音视频通道
Definition: nim_rts_def.h:24
void(* nim_rts_start_cb_func)(int code, const char *session_id, int channel_type, const char *uid, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:179
static const char * kNIMRtsPushEnable
int 是否需要推送 >0表示是 默认是
Definition: nim_rts_def.h:94
static const char * kNIMRtsClientType
int 客户端类型NIMClientType,见nim_client_def.h
Definition: nim_rts_def.h:155
static const char * kNIMRtsApnsPayload
string JSON格式,推送payload
Definition: nim_rts_def.h:100
void(* nim_rts_rec_data_cb_func)(const char *session_id, int channel_type, const char *uid, const char *data, unsigned int size, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:347
void(* nim_rts_start_notify_cb_func)(const char *session_id, int channel_type, const char *uid, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:193
void(* nim_rts_connect_notify_cb_func)(const char *session_id, int channel_type, int code, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:270
static const char * kNIMRtsSound
string 推送声音
Definition: nim_rts_def.h:102
static const char * kNIMRtsRecordFile
string 录制的文件名(服务器开启录制时有效,音视频类型时为音频文件名)
Definition: nim_rts_def.h:144
static const char * kNIMRtsRecordAddr
string 录制地址(服务器开启录制时有效)
Definition: nim_rts_def.h:142
static const char * kNIMRtsVChatMode
int NIMRtsVideoChatMode,非视频模式时不会发送视频数据
Definition: nim_rts_def.h:80
static const char * kNIMRtsChannelId
int64 通话的通道id
Definition: nim_rts_def.h:115
static const char * kNIMRtsSessionId
string 发起会话的标识id,将在创建点对点和多人通话时,如果填写了此参数优先使用用户填写的session_id
Definition: nim_rts_def.h:78
static const char * kNIMRtsCustomInfo
string 自定义数据
Definition: nim_rts_def.h:124
void(* nim_rts_sync_ack_notify_cb_func)(const char *session_id, int channel_type, bool accept, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:257
void(* nim_rts_ack_res_cb_func)(int code, const char *session_id, int channel_type, bool accept, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:226
static const char * kNIMRtsKeepCalling
int, 是否强制持续呼叫(对方离线也会呼叫),1表示是,0表示否。默认是
Definition: nim_rts_def.h:104
static const char * kNIMRtsLeaveType
int 客户端类型NIMRtsMemberLeftType,见nim_client_def.h
Definition: nim_rts_def.h:164
NIMRtsVideoChatMode
Definition: nim_rts_def.h:43
@ kNIMRtsVideoChatModeAudio
语音通话模式
Definition: nim_rts_def.h:45
@ kNIMRtsVideoChatModeVideo
视频通话模式
Definition: nim_rts_def.h:47
static const char * kNIMRtsVChatCustomVideo
int 是否用自主的视频数据 >0表示是
Definition: nim_rts_def.h:82
static const char * kNIMRtsNeedFromNick
int 是否需要推送昵称 >0表示是 默认是
Definition: nim_rts_def.h:98
static const char * kNIMRtsDataRecord
int 是否需要服务器录制白板数据 >0表示是
Definition: nim_rts_def.h:86
NIMRtsMemberStatus
Definition: nim_rts_def.h:28
@ kNIMRtsMemberStatusJoined
成员进入
Definition: nim_rts_def.h:30
@ kNIMRtsMemberStatusLeaved
成员退出
Definition: nim_rts_def.h:32
void(* nim_rts_create_cb_func)(int code, const char *json_extension, const void *user_data)
Definition: nim_rts_def.h:202