cn.tee3.avd_SDK-C++  2.1.0
avdengine.h
浏览该文件的文档.
1 #ifndef RT_AVDEngine_H_
2 #define RT_AVDEngine_H_
3 
4 #include "common.h"
5 #include "room.h"
6 
7 namespace tee3 {
8  namespace avd {
15  public:
21  class IListener {
22  public:
24 
29  virtual void onInitResult(Result result) = 0;
30 
36  virtual void onUninitResult(Result reason) = 0;
37 
38 
48  virtual void onGetRoomResult(uint32 callId, Result result, const RoomInfo& room) = 0;
57  virtual void onFindRoomsResult(uint32 callId, Result result, const RoomInfosType& rooms) = 0;
66  virtual void onScheduleRoomResult(uint32 callId, Result result, const RoomId& roomId) = 0;
75  virtual void onCancelRoomResult(uint32 callId, Result result, const RoomId& roomId) = 0;
83  virtual void onGetUsersCountResult(uint32 callId, Result result, uint32 usersCount, const RoomId& roomId) = 0;
84  protected:
85  virtual ~IListener() {
86  }
87  };
88  public:
94  static IAVDEngine* Instance();
97  virtual void release() = 0;
98  public:
108  virtual Result init(
109  IListener* listener, const String& severuri, const String& appkey, const String& secretkey) = 0;
110 
119  virtual Result init(IAVDEngine::IListener* listener, const String& severuri, const String& token) = 0;
120 
129  virtual Result initWithOEM(
130  IListener* listener, const String& severuri, const String& oemName) = 0;
131 
137  virtual Result uninit() = 0;
138 
143  virtual bool isWorking() const = 0;
144 
145  //
154  virtual Result getRoomByRoomId(uint32& callId, const String& roomId) = 0;
155 
156  typedef void(*FuncGetRoomResult) (uint32 callId, Result result, const RoomInfo& room);
157  virtual Result getRoomByRoomId(uint32& callId, const String& roomId, FuncGetRoomResult func) = 0;
158 
167  virtual Result getRoomByAppRoomId(uint32& callId, const String& appRoomId) = 0;
168  virtual Result getRoomByAppRoomId(uint32& callId, const String& appRoomId, FuncGetRoomResult func) = 0;
169 
178  virtual Result findRooms(uint32& callId, const String& filter) = 0;
196  virtual Result scheduleRoom(uint32& callId, const RoomInfo& roomInfo) = 0;
197 
198  typedef void(*FuncScheduleRoomResult) (uint32 callId, Result result, const RoomId& roomId);
199  virtual Result scheduleRoom(uint32& callId, const RoomInfo& roomInfo, FuncScheduleRoomResult func) = 0;
200 
209  virtual Result cancelRoom(uint32& callId, const RoomId& roomId) = 0;
210 
219  virtual Result getUsersCount(uint32& callId, const RoomId& roomId) = 0;
220 
221  public:
229  static Result setLogParams(const String& params, const String& filename);
230 
236  static Result uploadLogFile(const String& rooturl);
237 
242  static String getVersion();
247  static String getErrorMessage(Result code);
248 
253  virtual bool hasFunction(FunctionType ft) const = 0;
258  virtual uint32 getFunctions() const = 0;
259  public:
267  virtual Result setOption(EngineOption type, void* value) = 0;
268  virtual Result setOption(EngineOption type, const String& value) = 0;
276  virtual Result getOption(EngineOption type, void* value) = 0;
277  virtual String getOption(EngineOption type) = 0;
278 
279  public:
287  virtual Result setUserInfo(const User& info) = 0;
291  virtual const User& getUserInfo() const = 0;
292 
293  virtual const String& getTempDir() const = 0;
294  protected:
295  virtual ~IAVDEngine() {
296  }
297  };
298 
299  } // namespace avd
300 } // namespace tee3
301 
302 #endif//RT_AVDEngine_H_
AVD引擎回调接口类
Definition: avdengine.h:21
房间信息结构.
Definition: common.h:30
int Result
返回值类型
Definition: combase.h:9
#define RT_API_EXPORT
Definition: defines.h:186
unsigned int uint32
Definition: defines.h:391
EngineOption
引擎选项
Definition: combase.h:290
virtual ~IAVDEngine()
Definition: avdengine.h:295
std::string String
tee3定义的String类型
Definition: common.h:10
std::vector< RoomInfo > RoomInfosType
房间信息集合类型.
Definition: common.h:74
AVD引擎接口类
Definition: avdengine.h:14
String RoomId
房间号类型,唯一标识房间内一个房间,长度不大于Max_RoomId定义;定义如下:[RId_P|T_H|F_P|M_type_guid];...
Definition: common.h:11
用户数据结构.用户集合类型
Definition: musermanager.h:14
FunctionType
AVD功能点定义
Definition: combase.h:495
Definition: audiocapture.h:5
virtual ~IListener()
Definition: avdengine.h:85