1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #pragma once
- #include "include/remote_notify.h"
-
- class SocketRemote;
- class CMessageQueue;
- class CRemoteCtrl:public IRemoteCtrl,public IRemoteNotify
- {
- public:
- CRemoteCtrl(IMonitroNotify* n);
- virtual void Login(std::string account, std::string pass) override;
- virtual void Start(EgoType type, std::array<IRender*, RenderPosition::ALL>& ar) override;
- virtual std::string GetAccount() override;
- virtual std::string GetPassword() override;
- virtual std::string GetName() override;
- virtual void ReqUserList() override;
- virtual void OnConnect(int32_t peer) override;
- virtual void OnLeave() override;
- virtual void OnConnected(bool bRet) override;
- virtual void OnRobot(const remote::Robot& robot) override;
- virtual void OnLogin(int32_t uid, bool bRet) override;
- virtual void OnVideoReq(int32_t index, int32_t peer) override;
- virtual void OnVideoOffer(int32_t index, const char* type, const char* sdp) override;
- virtual void OnVideoAnswer(int32_t index, const char* type, const char* sdp) override;
- virtual void OnVideoCandidate(int32_t index, const char* candidate,
- int32_t sdp_mline_index,
- const char* sdp_mid) override;
- virtual void OnNotifyState(int32_t rid, UserState state) override;
- virtual void OnVideoRep(bool ok, int32_t index, int32_t peer) override;
- virtual void OnNotifyDel(int32_t peer, EgoType type) override;
- virtual void OnVideoLeave(int32_t peer, EgoType type) override;
- virtual void OverlayVideo(RenderPosition pos,const webrtc::VideoFrame& frame) override;
-
- EgoType GetType();
- SocketRemote* GetRemoteClient();
- private:
- IMonitroNotify* _notify;
- EgoType _type = EgoType::User;
- std::unique_ptr<SocketRemote> _client;
- bool _connected = false;
- std::string _accountText;
- std::string _passText;
- std::string _account;
- std::string _pass;
- std::string _name;
- int32_t _peer = -1;
- std::unique_ptr< CMessageQueue> _message;
- int32_t _uid = -1;
- };
|