webRtcManager~.h 3.6 KB

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