#pragma once #ifdef EGOREMOTE_EXPORTS #define EGOREMOTE_API __declspec(dllexport) #else #define EGOREMOTE_API __declspec(dllimport) #endif namespace remote { class Robot; } namespace webrtc { class VideoFrame; } class IRemoteNotify { public: virtual void OnConnected(bool bRet) = 0; virtual void OnRobot(const remote::Robot& robot) = 0; virtual void OnLogin(int32_t uid, bool bRet) = 0; virtual void OnVideoReq(int32_t index, int32_t peer) = 0; virtual void OnVideoOffer(int32_t index, const char* type, const char* sdp) = 0; virtual void OnVideoAnswer(int32_t index, const char* type, const char* sdp) = 0; virtual void OnVideoCandidate(int32_t index, const char* candidate, int32_t sdp_mline_index, const char* sdp_mid) = 0; virtual void OnNotifyState(int32_t rid, UserState state) = 0; virtual void OnVideoRep(bool ok, int32_t index, int32_t peer) = 0; virtual void OnNotifyDel(int32_t peer, EgoType type) = 0; virtual void OnVideoLeave(int32_t peer, EgoType type) = 0; }; class IRemoteCtrl { public: virtual void Start(EgoType type,std::array& ar) = 0;//Monitor virtual void Login(std::string account, std::string pass) = 0; virtual void ReqUserList() = 0; virtual void OnConnect(int32_t peer) = 0; virtual void OnLeave() = 0; virtual void OverlayVideo(RenderPosition pos,const webrtc::VideoFrame& frame) = 0; virtual std::string GetAccount() = 0; virtual std::string GetPassword() = 0; virtual std::string GetName() = 0; }; class IMonitroNotify { public: virtual void OnRobot(std::unique_ptr& info) = 0; virtual void OnLogin(bool bRet) = 0; virtual void OnNotifyDel(int32_t peer) = 0; virtual void OnNotifyLeave(int32_t peer) = 0; virtual void OnNotifyVideoFail(int32_t uid) = 0; virtual void OnNotifyState(int32_t uid, UserState state) = 0; }; EGOREMOTE_API IRemoteCtrl* GetRemoteController(IMonitroNotify* n);