cn.3tee.avd_SDK-C  3.2.0
avdengine_c.h
浏览该文件的文档.
1 #ifndef RT_AVDEngine_C_H_
2 #define RT_AVDEngine_C_H_
3 
4 #include "common_c.h"
5 #include "room_c.h"
6 
7 typedef rtc::EngineOption AVDEngineOption;
13 typedef struct AVDEngine_Callback {
15 
20  void(*onInitResult)(Result result);
26  void(*onUninitResult)(Result result);
36  void(*onGetRoomResult)(uint32 callId, Result result, const AVDRoomInfo& room);
46  void(*onFindRoomsResult)(uint32 callId, Result result, const LPAVDRoomInfo& rooms, uint32 numOfRoom);
55  void(*onScheduleRoomResult)(uint32 callId, Result result, const char* roomId);
64  void(*onCancelRoomResult)(uint32 callId, Result result, const char* roomId);
72  void(*onGetUsersCountResult)(uint32 callId, Result result, uint32 usersCount, const char* roomId);
73 
80  void(*onCallOutgoingDevice)(uint32 callId, Result result, const char* userId);
81 
88  void (*onCallOutgoingDeviceResult)(uint32 callId, Result result, const char* userId);
90  onInitResult = NULL;
91  onUninitResult = NULL;
92  onGetRoomResult = NULL;
93  onFindRoomsResult = NULL;
94  onScheduleRoomResult = NULL;
95  onCancelRoomResult = NULL;
96  onGetUsersCountResult = NULL;
97  onCallOutgoingDevice = NULL;
99  }
102 extern "C" {
118  RT_API_EXPORT Result avd_engine_init(LPAVDEngine_Callback cb, const char* severuri, const char* appkey, const char* secretkey);
127  RT_API_EXPORT Result avd_engine_initWithToken(LPAVDEngine_Callback cb, const char* severuri, const char* token);
136  RT_API_EXPORT Result avd_engine_initWithOEM(LPAVDEngine_Callback cb, const char* severuri, const char* oemName);
137 
138  //是否启用客户自己的认证token,默认为false
139  RT_API_EXPORT void avd_engine_setCustomerTokenEnabled(bool enable);
145  RT_API_EXPORT Result avd_engine_uninit();
150  RT_API_EXPORT AVDBool avd_engine_isWorking();
158  RT_API_EXPORT Result avd_engine_setLogParams(const char* params, const char* filename);
165  RT_API_EXPORT Result avd_engine_getVersion(char* szVersion, uint32& len);
172  RT_API_EXPORT Result avd_engine_getErrorMessage(Result code, char* message, uint32& size);
181  RT_API_EXPORT void avd_engine_setProxy(AVDProxyType type, const char* ip, int port, const char* username, const char* password);
189  RT_API_EXPORT Result avd_engine_setOption(AVDEngineOption type, void* value);
190  RT_API_EXPORT Result avd_engine_setOption2(AVDEngineOption type, const char* value);
198  RT_API_EXPORT Result avd_engine_getOption(AVDEngineOption type, void* value);
199  RT_API_EXPORT Result avd_engine_getOption2(AVDEngineOption type, char* value, uint32& size);
204  RT_API_EXPORT AVDBool avd_engine_hasFunction(rtc::FunctionType ft);
209  RT_API_EXPORT uint32 avd_engine_getFunctions();
210  //
219  RT_API_EXPORT Result avd_engine_findRooms(uint32& callId, const char* filter /*jason: fieldname=value,... fieldname use RoomInfo */);
228  RT_API_EXPORT Result avd_engine_scheduleRoom(uint32& callId, const AVDRoomInfo& roomInfo);
237  RT_API_EXPORT Result avd_engine_getRoomByRoomId(uint32& callId, const char* roomId);
246  RT_API_EXPORT Result avd_engine_getRoomByAppRoomId(uint32& callId, const char* appRoomId);
255  RT_API_EXPORT Result avd_engine_cancelRoom(uint32& callId, const char* roomId);
264  RT_API_EXPORT Result avd_engine_getUsersCount(uint32& callId, const char* roomId);
265 }
266 
267 #endif//RT_AVDEngine_C_H_
RT_API_EXPORT Result avd_engine_getOption(AVDEngineOption type, void *value)
获取引擎选项
struct AVDEngine_Callback * LPAVDEngine_Callback
AVD引擎回调接口
void(* onCallOutgoingDevice)(uint32 callId, Result result, const char *userId)
呼叫外部设备回调
Definition: avdengine_c.h:80
RT_API_EXPORT Result avd_engine_getOption2(AVDEngineOption type, char *value, uint32 &size)
RT_API_EXPORT Result avd_engine_initWithToken(LPAVDEngine_Callback cb, const char *severuri, const char *token)
初始化引擎
RT_API_EXPORT Result avd_engine_cancelRoom(uint32 &callId, const char *roomId)
根据房间Id获取房间信息
RT_API_EXPORT void avd_engine_setProxy(AVDProxyType type, const char *ip, int port, const char *username, const char *password)
设置代理信息
RT_API_EXPORT Result avd_engine_init(LPAVDEngine_Callback cb, const char *severuri, const char *appkey, const char *secretkey)
AVD引擎接口
AVD引擎回调接口
Definition: avdengine_c.h:13
rtc::AvdProxyType AVDProxyType
Definition: common_c.h:14
RT_API_EXPORT Result avd_engine_getRoomByRoomId(uint32 &callId, const char *roomId)
根据房间Id获取房间信息
void(* onCallOutgoingDeviceResult)(uint32 callId, Result result, const char *userId)
呼叫外部设备回调
Definition: avdengine_c.h:88
void(* onFindRoomsResult)(uint32 callId, Result result, const LPAVDRoomInfo &rooms, uint32 numOfRoom)
查询房间信息操作异步返回
Definition: avdengine_c.h:46
RT_API_EXPORT Result avd_engine_setOption(AVDEngineOption type, void *value)
设置引擎选项
RT_API_EXPORT Result avd_engine_findRooms(uint32 &callId, const char *filter)
查找房间信息
RT_API_EXPORT AVDBool avd_engine_isWorking()
判断引擎是否正常工作
void(* onUninitResult)(Result result)
反初始化引擎操作异步返回
Definition: avdengine_c.h:26
RT_API_EXPORT Result avd_engine_uninit()
反初始化引擎
RT_API_EXPORT void avd_engine_setCustomerTokenEnabled(bool enable)
void(* onInitResult)(Result result)
异步返回
Definition: avdengine_c.h:20
RT_API_EXPORT AVDBool avd_engine_hasFunction(rtc::FunctionType ft)
判断是否拥有功能
void(* onCancelRoomResult)(uint32 callId, Result result, const char *roomId)
取消房间操作异步返回
Definition: avdengine_c.h:64
RT_API_EXPORT Result avd_engine_initWithOEM(LPAVDEngine_Callback cb, const char *severuri, const char *oemName)
初始化引擎
RT_API_EXPORT Result avd_engine_getErrorMessage(Result code, char *message, uint32 &size)
根据错误代码获取关联的错误信息描述
RT_API_EXPORT uint32 avd_engine_getFunctions()
获取功能集
RT_API_EXPORT Result avd_engine_setOption2(AVDEngineOption type, const char *value)
RT_API_EXPORT Result avd_engine_getRoomByAppRoomId(uint32 &callId, const char *appRoomId)
根据应用层房间Id获取房间信息
void(* onScheduleRoomResult)(uint32 callId, Result result, const char *roomId)
安排房间操作异步返回
Definition: avdengine_c.h:55
int AVDBool
C语言自定义Bool类型.
Definition: common_c.h:20
AVDEngine_Callback()
Definition: avdengine_c.h:89
void(* onGetRoomResult)(uint32 callId, Result result, const AVDRoomInfo &room)
获取房间信息操作异步返回
Definition: avdengine_c.h:36
rtc::EngineOption AVDEngineOption
Definition: avdengine_c.h:7
RT_API_EXPORT Result avd_engine_getVersion(char *szVersion, uint32 &len)
获取引擎版本号
RT_API_EXPORT Result avd_engine_scheduleRoom(uint32 &callId, const AVDRoomInfo &roomInfo)
安排房间
Definition: room_c.h:18
void(* onGetUsersCountResult)(uint32 callId, Result result, uint32 usersCount, const char *roomId)
获取房间中参会者人数异步返回
Definition: avdengine_c.h:72
RT_API_EXPORT Result avd_engine_setLogParams(const char *params, const char *filename)
设置引擎日志配置
RT_API_EXPORT Result avd_engine_getUsersCount(uint32 &callId, const char *roomId)
根据房间号获取房间人数