webRtcManager.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //
  2. // webRtcManager.h
  3. // 双子星云手机
  4. //
  5. // Created by xd h on 2024/9/5.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <WebRTC/AMediaStream.h>
  9. #import <WebRTC/RTCMacros.h>
  10. #import <WebRTC/RTCIceCandidate.h>
  11. #import "webRtcMsgModel.h"
  12. #import "USBInsertPopView.h"
  13. #import "addLogObject.h"
  14. #import "BoxHeartbeatAlertTool.h"
  15. #import "queryHeartbeatModel.h"
  16. #import "BoxHeartbeatReStartSucView.h"
  17. #import "BoxHeartbeatReStartView.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. @interface webRtcManager : NSObject
  20. {
  21. USBInsertPopView *curUSBInsertPopV;
  22. //下载nas相关
  23. customDownloadOperation* curDownloadmodel;
  24. }
  25. /** 实例化对象(单例) */
  26. + (instancetype)shareManager;
  27. @property (nonatomic, strong) AMediaStream *mediaStream;
  28. @property (nonatomic, assign) BOOL didReportWebRtcOKType;
  29. @property (nonatomic, assign) BOOL didReportWebRtcFailType;
  30. @property(nonatomic,assign)BOOL isRebootIngType;//是否重启中
  31. @property(nonatomic,assign)BOOL isResetingType;//是否恢复出厂中
  32. @property(nonatomic,assign)BOOL isChangeBoxType;//是否更换盒子
  33. @property(nonatomic,assign)BOOL isLogoutByOtherType;//被挤下线
  34. @property(nonatomic,assign)BOOL isWaitShowLogoutAlert;//隐私模式等待被挤下线弹框是否弹出
  35. @property(nonatomic,assign)BOOL isDiDChangePhoneSizeType;//是否修改了分辨率(如果是 进去云机需要重设解码器)
  36. @property(nonatomic,assign) RTCDataChannelState channelState;
  37. @property(nonatomic,assign) RTCIceConnectionState ConnectionState;
  38. #pragma mark 分类属性
  39. #pragma mark 下载nas文件用到
  40. @property (nonatomic, copy) NSString*nasFullPath;
  41. //下载nas ws 文件 保存到文件 正在弹框中
  42. @property (nonatomic, assign) BOOL isShowingFileDocumentPickerType;
  43. @property(nonatomic,copy) NSString* webRtcChannelSessionId;//第一次链接webrtc信令的时间
  44. #pragma mark 开始链接
  45. - (void)beginToLinkWebRtcFun;
  46. #pragma mark 重新链接
  47. - (void)relinkWebRtcFun;
  48. #pragma mark 关闭链接
  49. - (void)closeLinkWebRtcFun;
  50. #pragma mark webrtc P2P通道发送消息
  51. - (void)send_data:(NSString *)dataStr;
  52. #pragma mark 获取云机系统镜像等信息
  53. - (void)getSysInfoFun;
  54. #pragma mark 获取云机基本信息
  55. - (void)getBaseInfoFun;
  56. #pragma mark 获取云机剩余空间(包含外挂磁盘)
  57. - (void)getExtraFilesListFun;
  58. #pragma mark 重启云机
  59. - (void)needToRebootFun;
  60. #pragma mark 恢复出厂设置云机
  61. - (void)needToResetFun;
  62. #pragma mark 云机截图保存到云机图库
  63. - (void)screenshotInCloudPhoneFun;
  64. #pragma mark 获取TV投屏状态
  65. - (void)getTvStatusFun;
  66. #pragma mark 关闭TV投屏状态
  67. - (void)offTvFun;
  68. #pragma mark 开启TV投屏状态
  69. - (void)onTvFun;
  70. //创建备份文件夹
  71. - (void)createBackupsFolderBy:(NSString*)backupsDefaultPath;
  72. //获取备份文件夹列表
  73. - (void)getBackupFolderListFun;
  74. #pragma mark 分类方向
  75. #pragma mark nas下载完成
  76. - (void)NasDownloadTaskFinishedNoti:(customDownloadOperation *)nasDownloadOperation;
  77. #pragma mark 上报打洞是否成功
  78. - (void)reportWebRtcRePoportTypeIsChannel:(BOOL)IsChannel withStats:(RTC_OBJC_TYPE(RTCStatisticsReport) *)stats withSessionId:(NSString*)sessionId;
  79. // IsChannel:是否是P2P通道
  80. - (void)reportWebRtcRePoportTypeIsChannel:(BOOL)IsChannel withLocal:(RTC_OBJC_TYPE(RTCIceCandidate) *)local remoteCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)remote withSessionId:(NSString*)sessionId;
  81. @end
  82. NS_ASSUME_NONNULL_END