webRtcManager.h 3.5 KB

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