瀏覽代碼

1.websocket 剥离进行中

huangxiaodong 1 年之前
父節點
當前提交
dc19d35cb5
共有 25 個文件被更改,包括 831 次插入1215 次删除
  1. 60 48
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 1 6
      创维盒子/双子星云手机/AppDelegate/Config/Notification.h
  3. 0 1
      创维盒子/双子星云手机/AppDelegate/SceneDelegate.m
  4. 1 2
      创维盒子/双子星云手机/Class/Set/uploadFile/downLoadFile/downLoadPreviewViewController.m
  5. 2 2
      创维盒子/双子星云手机/Class/Set/uploadFile/fileTransfeSet/fileTransferPathCheckViewController.m
  6. 1 1
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+AppDelegate.m
  7. 0 25
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+backupsFile.h
  8. 0 19
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+downloadThumbnailImage.h
  9. 2 20
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.h
  10. 1 358
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm
  11. 0 26
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+upLoadFile.h
  12. 1 6
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController.h
  13. 15 464
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm
  14. 18 0
      创维盒子/双子星云手机/cloudPhone/webSocketManager+backupsFile.h
  15. 7 6
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+backupsFile.m
  16. 16 0
      创维盒子/双子星云手机/cloudPhone/webSocketManager+baseDownload.h
  17. 116 0
      创维盒子/双子星云手机/cloudPhone/webSocketManager+baseDownload.m
  18. 5 6
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+downloadFile.h
  19. 25 22
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+downloadFile.m
  20. 17 0
      创维盒子/双子星云手机/cloudPhone/webSocketManager+downloadThumbnailImage.h
  21. 5 5
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+downloadThumbnailImage.m
  22. 20 0
      创维盒子/双子星云手机/cloudPhone/webSocketManager+upLoadFile.h
  23. 5 5
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+upLoadFile.m
  24. 50 0
      创维盒子/双子星云手机/cloudPhone/webSocketManager.h
  25. 463 193
      创维盒子/双子星云手机/cloudPhone/webSocketManager.m

+ 60 - 48
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -198,10 +198,6 @@
 		6B1FBD272B4503E700926382 /* photosBackupsTaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD252B4503E700926382 /* photosBackupsTaskModel.m */; };
 		6B1FBD2A2B452B3800926382 /* backupsFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD282B452B3800926382 /* backupsFileManager.h */; };
 		6B1FBD2B2B452B3800926382 /* backupsFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD292B452B3800926382 /* backupsFileManager.m */; };
-		6B1FBD322B455DBD00926382 /* PlayerViewController+upLoadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD302B455DBD00926382 /* PlayerViewController+upLoadFile.h */; };
-		6B1FBD332B455DBD00926382 /* PlayerViewController+upLoadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD312B455DBD00926382 /* PlayerViewController+upLoadFile.m */; };
-		6B1FBD362B455DD600926382 /* PlayerViewController+backupsFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD342B455DD600926382 /* PlayerViewController+backupsFile.h */; };
-		6B1FBD372B455DD600926382 /* PlayerViewController+backupsFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD352B455DD600926382 /* PlayerViewController+backupsFile.m */; };
 		6B1FBD3A2B467A8000926382 /* backupsFilerecordTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD382B467A8000926382 /* backupsFilerecordTableView.h */; };
 		6B1FBD3B2B467A8000926382 /* backupsFilerecordTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD392B467A8000926382 /* backupsFilerecordTableView.m */; };
 		6B1FBD3E2B46875300926382 /* backupsFileRecordCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD3C2B46875300926382 /* backupsFileRecordCell.h */; };
@@ -510,12 +506,8 @@
 		6B5D40342B4BE358000965CF /* downloadFileBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D40322B4BE358000965CF /* downloadFileBottomView.m */; };
 		6B5D40372B4BEEF8000965CF /* downloadThumbnailManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D40352B4BEEF8000965CF /* downloadThumbnailManager.h */; };
 		6B5D40382B4BEEF8000965CF /* downloadThumbnailManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D40362B4BEEF8000965CF /* downloadThumbnailManager.m */; };
-		6B5D403B2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D40392B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.h */; };
-		6B5D403C2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D403A2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.m */; };
 		6B5D403F2B4CE40F000965CF /* downloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D403D2B4CE40F000965CF /* downloadManager.h */; };
 		6B5D40402B4CE40F000965CF /* downloadManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D403E2B4CE40F000965CF /* downloadManager.m */; };
-		6B5D40432B4CF04C000965CF /* PlayerViewController+downloadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D40412B4CF04C000965CF /* PlayerViewController+downloadFile.h */; };
-		6B5D40442B4CF04C000965CF /* PlayerViewController+downloadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D40422B4CF04C000965CF /* PlayerViewController+downloadFile.m */; };
 		6B5D86662C227C71008D25EA /* NASViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D86652C227C71008D25EA /* NASViewController.m */; };
 		6B5D86672C227C71008D25EA /* NASViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D86642C227C71008D25EA /* NASViewController.h */; };
 		6B5D86682C227C71008D25EA /* NASViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D86642C227C71008D25EA /* NASViewController.h */; };
@@ -689,12 +681,31 @@
 		6BC741412C23DCD10049BA8D /* webSocketManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC7413F2C23DCD10049BA8D /* webSocketManager.m */; };
 		6BC741422C23DCD10049BA8D /* webSocketManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC7413E2C23DCD10049BA8D /* webSocketManager.h */; };
 		6BC741432C23DCD10049BA8D /* webSocketManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC7413F2C23DCD10049BA8D /* webSocketManager.m */; };
+		6BC741462C24097E0049BA8D /* webSocketManager+baseDownload.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC741442C24097E0049BA8D /* webSocketManager+baseDownload.h */; };
+		6BC741472C24097E0049BA8D /* webSocketManager+baseDownload.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC741452C24097E0049BA8D /* webSocketManager+baseDownload.m */; };
+		6BC741482C24097E0049BA8D /* webSocketManager+baseDownload.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC741442C24097E0049BA8D /* webSocketManager+baseDownload.h */; };
+		6BC741492C24097E0049BA8D /* webSocketManager+baseDownload.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC741452C24097E0049BA8D /* webSocketManager+baseDownload.m */; };
+		6BC7414C2C240A670049BA8D /* webSocketManager+downloadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC7414A2C240A670049BA8D /* webSocketManager+downloadFile.h */; };
+		6BC7414D2C240A670049BA8D /* webSocketManager+downloadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC7414B2C240A670049BA8D /* webSocketManager+downloadFile.m */; };
+		6BC7414E2C240A670049BA8D /* webSocketManager+downloadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC7414A2C240A670049BA8D /* webSocketManager+downloadFile.h */; };
+		6BC7414F2C240A670049BA8D /* webSocketManager+downloadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC7414B2C240A670049BA8D /* webSocketManager+downloadFile.m */; };
+		6BC741522C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC741502C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.h */; };
+		6BC741532C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC741512C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.m */; };
+		6BC741542C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC741502C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.h */; };
+		6BC741552C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC741512C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.m */; };
+		6BC741582C2413B20049BA8D /* webSocketManager+upLoadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC741562C2413B20049BA8D /* webSocketManager+upLoadFile.h */; };
+		6BC741592C2413B20049BA8D /* webSocketManager+upLoadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC741572C2413B20049BA8D /* webSocketManager+upLoadFile.m */; };
+		6BC7415A2C2413B20049BA8D /* webSocketManager+upLoadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC741562C2413B20049BA8D /* webSocketManager+upLoadFile.h */; };
+		6BC7415B2C2413B20049BA8D /* webSocketManager+upLoadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC741572C2413B20049BA8D /* webSocketManager+upLoadFile.m */; };
+		6BC7415E2C24150C0049BA8D /* webSocketManager+backupsFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC7415C2C24150C0049BA8D /* webSocketManager+backupsFile.h */; };
+		6BC7415F2C24150C0049BA8D /* webSocketManager+backupsFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC7415D2C24150C0049BA8D /* webSocketManager+backupsFile.m */; };
+		6BC741602C24150C0049BA8D /* webSocketManager+backupsFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BC7415C2C24150C0049BA8D /* webSocketManager+backupsFile.h */; };
+		6BC741612C24150C0049BA8D /* webSocketManager+backupsFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC7415D2C24150C0049BA8D /* webSocketManager+backupsFile.m */; };
 		6BD5069D2B9576A4006E7CB0 /* NSArray+Log.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B21709A2B15CDB400656670 /* NSArray+Log.h */; };
 		6BD5069E2B9576A4006E7CB0 /* CustomerWebViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 184C8ACE2A94980C00F26650 /* CustomerWebViewController.h */; };
 		6BD5069F2B9576A4006E7CB0 /* forgetSecretKeyViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF26972AFA16D900FCB4F7 /* forgetSecretKeyViewController.h */; };
 		6BD506A02B9576A4006E7CB0 /* cloudPhoneExtraFileListModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B45C4FB2B57BC87007E6911 /* cloudPhoneExtraFileListModel.h */; };
 		6BD506A12B9576A4006E7CB0 /* AuthCodeTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF268F2AF9D88200FCB4F7 /* AuthCodeTextField.h */; };
-		6BD506A22B9576A4006E7CB0 /* PlayerViewController+downloadThumbnailImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D40392B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.h */; };
 		6BD506A32B9576A4006E7CB0 /* HaveNewVersionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 184C8AD82A949DAC00F26650 /* HaveNewVersionView.h */; };
 		6BD506A42B9576A4006E7CB0 /* AudioSessionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BBB35DB2AE76AD800E4A59B /* AudioSessionObject.h */; };
 		6BD506A52B9576A4006E7CB0 /* TZAssetModel+imageData.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0582762AFF7C6D00D37290 /* TZAssetModel+imageData.h */; };
@@ -718,7 +729,6 @@
 		6BD506B72B9576A4006E7CB0 /* playerShowSecretkeyView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF26862AF8949F00FCB4F7 /* playerShowSecretkeyView.h */; };
 		6BD506B82B9576A4006E7CB0 /* DeviceThirdIdModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BF0F3D32AD3937B000AA133 /* DeviceThirdIdModel.h */; };
 		6BD506B92B9576A4006E7CB0 /* NSDictionary+Log.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2170962B15CD9200656670 /* NSDictionary+Log.h */; };
-		6BD506BA2B9576A4006E7CB0 /* PlayerViewController+backupsFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD342B455DD600926382 /* PlayerViewController+backupsFile.h */; };
 		6BD506BC2B9576A4006E7CB0 /* HelpDownScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 181E84F02A8F0A9A00292B96 /* HelpDownScrollView.h */; };
 		6BD506BD2B9576A4006E7CB0 /* allVersionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2170862B1444CC00656670 /* allVersionView.h */; };
 		6BD506BE2B9576A4006E7CB0 /* diskListBgView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B45C50A2B5FA80E007E6911 /* diskListBgView.h */; };
@@ -770,7 +780,6 @@
 		6BD506EC2B9576A4006E7CB0 /* uploadFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0582832B0457C400D37290 /* uploadFileManager.h */; };
 		6BD506ED2B9576A4006E7CB0 /* forgetPwdViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF268A2AF8E1C600FCB4F7 /* forgetPwdViewController.h */; };
 		6BD506EE2B9576A4006E7CB0 /* Reachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BF52C932AD5546500A617DB /* Reachability.h */; };
-		6BD506EF2B9576A4006E7CB0 /* PlayerViewController+downloadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D40412B4CF04C000965CF /* PlayerViewController+downloadFile.h */; };
 		6BD506F02B9576A4006E7CB0 /* couldPhoneCommonModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D40132B47F27A000965CF /* couldPhoneCommonModel.h */; };
 		6BD506F12B9576A4006E7CB0 /* RYShearDeviceUDPManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 18BB183F2AC417CB00A36F63 /* RYShearDeviceUDPManager.h */; };
 		6BD506F22B9576A4006E7CB0 /* AboutViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 184C8AD32A949D5900F26650 /* AboutViewController.h */; };
@@ -783,7 +792,6 @@
 		6BD506F92B9576A4006E7CB0 /* cloudPhoneCommonModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3A4B132B6F69A500F74679 /* cloudPhoneCommonModel.h */; };
 		6BD506FA2B9576A4006E7CB0 /* AJPhotoListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B05819D2AFCF4E800D37290 /* AJPhotoListView.h */; };
 		6BD506FB2B9576A4006E7CB0 /* GuideView.h in Headers */ = {isa = PBXBuildFile; fileRef = 18963B442AB84397006E7C50 /* GuideView.h */; };
-		6BD506FC2B9576A4006E7CB0 /* PlayerViewController+upLoadFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD302B455DBD00926382 /* PlayerViewController+upLoadFile.h */; };
 		6BD506FD2B9576A4006E7CB0 /* uploadFileRecordBgScorllView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7272592B0E22D000C03F87 /* uploadFileRecordBgScorllView.h */; };
 		6BD506FE2B9576A4006E7CB0 /* ComontAlretViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 18A909962ABC4A3300E6D2BE /* ComontAlretViewController.h */; };
 		6BD506FF2B9576A4006E7CB0 /* cachesFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7272512B0CABC600C03F87 /* cachesFileManager.h */; };
@@ -836,7 +844,6 @@
 		6BD5072F2B9576A4006E7CB0 /* cloudPhoneExtraFileListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B45C4FC2B57BC87007E6911 /* cloudPhoneExtraFileListModel.m */; };
 		6BD507302B9576A4006E7CB0 /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 183AE6372A8A2CF000B11CB0 /* UIActivityIndicatorView+AFNetworking.m */; };
 		6BD507312B9576A4006E7CB0 /* BaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A003F69E27D841C800715CBF /* BaseViewController.m */; };
-		6BD507322B9576A4006E7CB0 /* PlayerViewController+upLoadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD312B455DBD00926382 /* PlayerViewController+upLoadFile.m */; };
 		6BD507332B9576A4006E7CB0 /* Calculator.m in Sources */ = {isa = PBXBuildFile; fileRef = 18E5571B2A3C5D75005CC84B /* Calculator.m */; };
 		6BD507342B9576A4006E7CB0 /* HWWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A003F6EC27D84D9C00715CBF /* HWWebViewController.m */; };
 		6BD507352B9576A4006E7CB0 /* HWBookmarkListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A031DD6B27EC1FCD00909527 /* HWBookmarkListCell.m */; };
@@ -876,7 +883,6 @@
 		6BD507572B9576A4006E7CB0 /* PhotoPreviewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0582622AFF4B7D00D37290 /* PhotoPreviewViewController.m */; };
 		6BD507582B9576A4006E7CB0 /* UIView+HWCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = A003F6B027D841EE00715CBF /* UIView+HWCategory.m */; };
 		6BD507592B9576A4006E7CB0 /* Const.m in Sources */ = {isa = PBXBuildFile; fileRef = A003F6D927D8428200715CBF /* Const.m */; };
-		6BD5075A2B9576A4006E7CB0 /* PlayerViewController+backupsFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD352B455DD600926382 /* PlayerViewController+backupsFile.m */; };
 		6BD5075B2B9576A4006E7CB0 /* couldphoneSysInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B21708B2B14BDAA00656670 /* couldphoneSysInfoModel.m */; };
 		6BD5075C2B9576A4006E7CB0 /* BGTool.m in Sources */ = {isa = PBXBuildFile; fileRef = A08A94EC27E9A4E300C544BB /* BGTool.m */; };
 		6BD5075D2B9576A4006E7CB0 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 183AE5F52A89CE3C00B11CB0 /* JSONModelClassProperty.m */; };
@@ -960,7 +966,6 @@
 		6BD507AC2B9576A4006E7CB0 /* GuideLastView.m in Sources */ = {isa = PBXBuildFile; fileRef = 186820182AB94877005702A6 /* GuideLastView.m */; };
 		6BD507AD2B9576A4006E7CB0 /* TvStatusModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA533372B16E65500D1CB5C /* TvStatusModel.m */; };
 		6BD507AE2B9576A4006E7CB0 /* fileTransferPathCheckTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5B60712B3D8098009A2AE2 /* fileTransferPathCheckTableViewCell.m */; };
-		6BD507AF2B9576A4006E7CB0 /* PlayerViewController+downloadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D40422B4CF04C000965CF /* PlayerViewController+downloadFile.m */; };
 		6BD507B02B9576A4006E7CB0 /* ModifyPWDSecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18F9CAFE2ABD3643003FF71A /* ModifyPWDSecondViewController.m */; };
 		6BD507B12B9576A4006E7CB0 /* photoPreViewBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B05826E2AFF692700D37290 /* photoPreViewBottomView.m */; };
 		6BD507B22B9576A4006E7CB0 /* TipsQRCodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1868201C2AB97BE1005702A6 /* TipsQRCodeViewController.m */; };
@@ -988,7 +993,6 @@
 		6BD507C82B9576A4006E7CB0 /* uploadFileRecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B05827F2B01C67400D37290 /* uploadFileRecordViewController.m */; };
 		6BD507C92B9576A4006E7CB0 /* BaseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A003F6A127D841C800715CBF /* BaseModel.m */; };
 		6BD507CA2B9576A4006E7CB0 /* HWHistoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A0295B1527EDA0EC009C5D8B /* HWHistoryModel.m */; };
-		6BD507CB2B9576A4006E7CB0 /* PlayerViewController+downloadThumbnailImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D403A2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.m */; };
 		6BD507CC2B9576A4006E7CB0 /* PlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 183AE6B32A8CA00300B11CB0 /* PlayerView.m */; };
 		6BD507CD2B9576A4006E7CB0 /* HWToolBar.m in Sources */ = {isa = PBXBuildFile; fileRef = A003F6F227D8593600715CBF /* HWToolBar.m */; };
 		6BD507CE2B9576A4006E7CB0 /* PlayerViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 18FCE5362AD1351A0020F623 /* PlayerViewController.mm */; };
@@ -1412,10 +1416,6 @@
 		6B1FBD252B4503E700926382 /* photosBackupsTaskModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = photosBackupsTaskModel.m; sourceTree = "<group>"; };
 		6B1FBD282B452B3800926382 /* backupsFileManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = backupsFileManager.h; sourceTree = "<group>"; };
 		6B1FBD292B452B3800926382 /* backupsFileManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = backupsFileManager.m; sourceTree = "<group>"; };
-		6B1FBD302B455DBD00926382 /* PlayerViewController+upLoadFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlayerViewController+upLoadFile.h"; sourceTree = "<group>"; };
-		6B1FBD312B455DBD00926382 /* PlayerViewController+upLoadFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PlayerViewController+upLoadFile.m"; sourceTree = "<group>"; };
-		6B1FBD342B455DD600926382 /* PlayerViewController+backupsFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlayerViewController+backupsFile.h"; sourceTree = "<group>"; };
-		6B1FBD352B455DD600926382 /* PlayerViewController+backupsFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PlayerViewController+backupsFile.m"; sourceTree = "<group>"; };
 		6B1FBD382B467A8000926382 /* backupsFilerecordTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = backupsFilerecordTableView.h; sourceTree = "<group>"; };
 		6B1FBD392B467A8000926382 /* backupsFilerecordTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = backupsFilerecordTableView.m; sourceTree = "<group>"; };
 		6B1FBD3C2B46875300926382 /* backupsFileRecordCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = backupsFileRecordCell.h; sourceTree = "<group>"; };
@@ -1602,12 +1602,8 @@
 		6B5D40322B4BE358000965CF /* downloadFileBottomView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = downloadFileBottomView.m; sourceTree = "<group>"; };
 		6B5D40352B4BEEF8000965CF /* downloadThumbnailManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = downloadThumbnailManager.h; sourceTree = "<group>"; };
 		6B5D40362B4BEEF8000965CF /* downloadThumbnailManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = downloadThumbnailManager.m; sourceTree = "<group>"; };
-		6B5D40392B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlayerViewController+downloadThumbnailImage.h"; sourceTree = "<group>"; };
-		6B5D403A2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PlayerViewController+downloadThumbnailImage.m"; sourceTree = "<group>"; };
 		6B5D403D2B4CE40F000965CF /* downloadManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = downloadManager.h; sourceTree = "<group>"; };
 		6B5D403E2B4CE40F000965CF /* downloadManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = downloadManager.m; sourceTree = "<group>"; };
-		6B5D40412B4CF04C000965CF /* PlayerViewController+downloadFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlayerViewController+downloadFile.h"; sourceTree = "<group>"; };
-		6B5D40422B4CF04C000965CF /* PlayerViewController+downloadFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PlayerViewController+downloadFile.m"; sourceTree = "<group>"; };
 		6B5D86642C227C71008D25EA /* NASViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NASViewController.h; sourceTree = "<group>"; };
 		6B5D86652C227C71008D25EA /* NASViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NASViewController.m; sourceTree = "<group>"; };
 		6B5D866B2C22AE2B008D25EA /* NASMySpaceView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NASMySpaceView.h; sourceTree = "<group>"; };
@@ -1723,6 +1719,16 @@
 		6BC741392C23C8860049BA8D /* cloudPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = cloudPhoneViewController.m; sourceTree = "<group>"; };
 		6BC7413E2C23DCD10049BA8D /* webSocketManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = webSocketManager.h; sourceTree = "<group>"; };
 		6BC7413F2C23DCD10049BA8D /* webSocketManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = webSocketManager.m; sourceTree = "<group>"; };
+		6BC741442C24097E0049BA8D /* webSocketManager+baseDownload.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "webSocketManager+baseDownload.h"; sourceTree = "<group>"; };
+		6BC741452C24097E0049BA8D /* webSocketManager+baseDownload.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "webSocketManager+baseDownload.m"; sourceTree = "<group>"; };
+		6BC7414A2C240A670049BA8D /* webSocketManager+downloadFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "webSocketManager+downloadFile.h"; sourceTree = "<group>"; };
+		6BC7414B2C240A670049BA8D /* webSocketManager+downloadFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "webSocketManager+downloadFile.m"; sourceTree = "<group>"; };
+		6BC741502C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "webSocketManager+downloadThumbnailImage.h"; sourceTree = "<group>"; };
+		6BC741512C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "webSocketManager+downloadThumbnailImage.m"; sourceTree = "<group>"; };
+		6BC741562C2413B20049BA8D /* webSocketManager+upLoadFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "webSocketManager+upLoadFile.h"; sourceTree = "<group>"; };
+		6BC741572C2413B20049BA8D /* webSocketManager+upLoadFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "webSocketManager+upLoadFile.m"; sourceTree = "<group>"; };
+		6BC7415C2C24150C0049BA8D /* webSocketManager+backupsFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "webSocketManager+backupsFile.h"; sourceTree = "<group>"; };
+		6BC7415D2C24150C0049BA8D /* webSocketManager+backupsFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "webSocketManager+backupsFile.m"; sourceTree = "<group>"; };
 		6BD5080C2B9576A4006E7CB0 /* 计算器.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "计算器.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		6BD5080D2B9576A9006E7CB0 /* jiSuanQi_Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = jiSuanQi_Info.plist; path = "/Users/xdh/Desktop/创维盒子/创维盒子/jiSuanQi_Info.plist"; sourceTree = "<absolute>"; };
 		6BEA31732BB65606005167AA /* clearCacheAlretViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = clearCacheAlretViewController.h; sourceTree = "<group>"; };
@@ -2220,14 +2226,6 @@
 				18FCE5472AD15E750020F623 /* PlayerViewController+AppDelegate.m */,
 				6B7B65562AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h */,
 				6B7B65572AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm */,
-				6B1FBD302B455DBD00926382 /* PlayerViewController+upLoadFile.h */,
-				6B1FBD312B455DBD00926382 /* PlayerViewController+upLoadFile.m */,
-				6B1FBD342B455DD600926382 /* PlayerViewController+backupsFile.h */,
-				6B1FBD352B455DD600926382 /* PlayerViewController+backupsFile.m */,
-				6B5D40392B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.h */,
-				6B5D403A2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.m */,
-				6B5D40412B4CF04C000965CF /* PlayerViewController+downloadFile.h */,
-				6B5D40422B4CF04C000965CF /* PlayerViewController+downloadFile.m */,
 				6B41C3502C09E55600DFDADC /* PlayerViewController+downloadNasFile.h */,
 				6B41C3512C09E55600DFDADC /* PlayerViewController+downloadNasFile.m */,
 				183AE6B12A8C9F5800B11CB0 /* View */,
@@ -2925,6 +2923,16 @@
 				6BC741392C23C8860049BA8D /* cloudPhoneViewController.m */,
 				6BC7413E2C23DCD10049BA8D /* webSocketManager.h */,
 				6BC7413F2C23DCD10049BA8D /* webSocketManager.m */,
+				6BC741442C24097E0049BA8D /* webSocketManager+baseDownload.h */,
+				6BC741452C24097E0049BA8D /* webSocketManager+baseDownload.m */,
+				6BC7414A2C240A670049BA8D /* webSocketManager+downloadFile.h */,
+				6BC7414B2C240A670049BA8D /* webSocketManager+downloadFile.m */,
+				6BC741502C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.h */,
+				6BC741512C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.m */,
+				6BC741562C2413B20049BA8D /* webSocketManager+upLoadFile.h */,
+				6BC741572C2413B20049BA8D /* webSocketManager+upLoadFile.m */,
+				6BC7415C2C24150C0049BA8D /* webSocketManager+backupsFile.h */,
+				6BC7415D2C24150C0049BA8D /* webSocketManager+backupsFile.m */,
 			);
 			path = cloudPhone;
 			sourceTree = "<group>";
@@ -3369,7 +3377,6 @@
 				6B45C4FD2B57BC87007E6911 /* cloudPhoneExtraFileListModel.h in Headers */,
 				6B2C1E642C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS15.h in Headers */,
 				6BFF26912AF9D88200FCB4F7 /* AuthCodeTextField.h in Headers */,
-				6B5D403B2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.h in Headers */,
 				184C8ADA2A949DAC00F26650 /* HaveNewVersionView.h in Headers */,
 				6BBB35DD2AE76AD800E4A59B /* AudioSessionObject.h in Headers */,
 				6B2C1EA02C070ADE00FDCF82 /* ZFPortraitViewController.h in Headers */,
@@ -3379,6 +3386,7 @@
 				6B5D40372B4BEEF8000965CF /* downloadThumbnailManager.h in Headers */,
 				6B9354AD2BF3879200AA8D31 /* shareRecordTableViewCell.h in Headers */,
 				6B0582802B01C67400D37290 /* uploadFileRecordViewController.h in Headers */,
+				6BC7415E2C24150C0049BA8D /* webSocketManager+backupsFile.h in Headers */,
 				6BEA31752BB65606005167AA /* clearCacheAlretViewController.h in Headers */,
 				6B4C0F842C0315880070EF2E /* audioPlayerViewController.h in Headers */,
 				6B5D866E2C22AE2B008D25EA /* NASMySpaceView.h in Headers */,
@@ -3413,7 +3421,6 @@
 				6B4C0F622C0314BA0070EF2E /* DFPlayerFileManager.h in Headers */,
 				6B2170982B15CD9200656670 /* NSDictionary+Log.h in Headers */,
 				6B4C0F932C0320710070EF2E /* NSObject+Extensions.h in Headers */,
-				6B1FBD362B455DD600926382 /* PlayerViewController+backupsFile.h in Headers */,
 				181E84F22A8F0A9B00292B96 /* HelpDownScrollView.h in Headers */,
 				6B6ABEE62BFF49C800480BAC /* receiveDownloadRecordTableView.h in Headers */,
 				6B2170882B1444CC00656670 /* allVersionView.h in Headers */,
@@ -3483,6 +3490,7 @@
 				6B45C5082B5FA2DD007E6911 /* diskListTableCell.h in Headers */,
 				183AE6D42A8CAFAE00B11CB0 /* UIView+View.h in Headers */,
 				6B9354892BF2FE8700AA8D31 /* editTypeHeadView.h in Headers */,
+				6BC7414C2C240A670049BA8D /* webSocketManager+downloadFile.h in Headers */,
 				6B2C1E4A2C070ADE00FDCF82 /* ZFSpeedLoadingView.h in Headers */,
 				6BED888A2B4E819000F76DDC /* downloadFileRecordTableView.h in Headers */,
 				6B2C1E562C070ADE00FDCF82 /* UIScrollView+ZFPlayer.h in Headers */,
@@ -3493,6 +3501,7 @@
 				6BED888E2B4E901900F76DDC /* downloadFileRecordCell.h in Headers */,
 				184C8ACC2A94557200F26650 /* HidenMaskSetViewController.h in Headers */,
 				6B6ABEF22BFF6B4C00480BAC /* boxSaveFileManager.h in Headers */,
+				6BC741582C2413B20049BA8D /* webSocketManager+upLoadFile.h in Headers */,
 				6BA08F532C01D05B00A2242D /* CWUploadTask.h in Headers */,
 				6B2C1E682C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS16.h in Headers */,
 				6B9714402BCD00CA00CE0096 /* ComontAlretType2ViewController.h in Headers */,
@@ -3510,7 +3519,6 @@
 				6B2C1E422C070ADE00FDCF82 /* ZFSliderView.h in Headers */,
 				6BFF268C2AF8E1C600FCB4F7 /* forgetPwdViewController.h in Headers */,
 				6BF52C992AD5546500A617DB /* Reachability.h in Headers */,
-				6B5D40432B4CF04C000965CF /* PlayerViewController+downloadFile.h in Headers */,
 				6B5D40152B47F27A000965CF /* couldPhoneCommonModel.h in Headers */,
 				6B2C1E962C070ADE00FDCF82 /* ZFPlayerMediaPlayback.h in Headers */,
 				6B6ABEDA2BFF3AA400480BAC /* receiveView.h in Headers */,
@@ -3523,6 +3531,7 @@
 				6B2C1E602C070ADE00FDCF82 /* ZFKVOController.h in Headers */,
 				6B0581A22AFCF50300D37290 /* AJPhotoListCell.h in Headers */,
 				6B3AD68A2BF4AE630096D6B7 /* backupsOptionViewController.h in Headers */,
+				6BC741462C24097E0049BA8D /* webSocketManager+baseDownload.h in Headers */,
 				187076772A9F400300F15F7F /* PlayerLoadingView.h in Headers */,
 				6B7EA7982BF5B4A6002D5CC2 /* NASFilePicModel.h in Headers */,
 				6B2C1E902C070ADE00FDCF82 /* ZFPlayerLogManager.h in Headers */,
@@ -3537,10 +3546,10 @@
 				6B05819F2AFCF4E800D37290 /* AJPhotoListView.h in Headers */,
 				6B9354A72BF3848D00AA8D31 /* shareRecordViewController.h in Headers */,
 				18963B462AB84398006E7C50 /* GuideView.h in Headers */,
-				6B1FBD322B455DBD00926382 /* PlayerViewController+upLoadFile.h in Headers */,
 				6B2C1E742C070ADE00FDCF82 /* ZFLandscapeViewController.h in Headers */,
 				6B5D86742C22C63F008D25EA /* NASCommonUsedView.h in Headers */,
 				6B72725B2B0E22D000C03F87 /* uploadFileRecordBgScorllView.h in Headers */,
+				6BC741522C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.h in Headers */,
 				6B1F7FD62C00772500954720 /* boxDownloadFileManager.h in Headers */,
 				18A909982ABC4A3300E6D2BE /* ComontAlretViewController.h in Headers */,
 				6B7272532B0CABC600C03F87 /* cachesFileManager.h in Headers */,
@@ -3596,7 +3605,6 @@
 				6BD506A02B9576A4006E7CB0 /* cloudPhoneExtraFileListModel.h in Headers */,
 				6B2C1E652C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS15.h in Headers */,
 				6BD506A12B9576A4006E7CB0 /* AuthCodeTextField.h in Headers */,
-				6BD506A22B9576A4006E7CB0 /* PlayerViewController+downloadThumbnailImage.h in Headers */,
 				6BD506A32B9576A4006E7CB0 /* HaveNewVersionView.h in Headers */,
 				6BD506A42B9576A4006E7CB0 /* AudioSessionObject.h in Headers */,
 				6B2C1EA12C070ADE00FDCF82 /* ZFPortraitViewController.h in Headers */,
@@ -3606,6 +3614,7 @@
 				6BD506A72B9576A4006E7CB0 /* downloadThumbnailManager.h in Headers */,
 				6B9354AE2BF3879200AA8D31 /* shareRecordTableViewCell.h in Headers */,
 				6BD506A82B9576A4006E7CB0 /* uploadFileRecordViewController.h in Headers */,
+				6BC741602C24150C0049BA8D /* webSocketManager+backupsFile.h in Headers */,
 				6BEA31782BB65606005167AA /* clearCacheAlretViewController.h in Headers */,
 				6B4C0F872C0315880070EF2E /* audioPlayerViewController.h in Headers */,
 				6B5D866F2C22AE2B008D25EA /* NASMySpaceView.h in Headers */,
@@ -3640,7 +3649,6 @@
 				6B4C0F632C0314BA0070EF2E /* DFPlayerFileManager.h in Headers */,
 				6BD506B92B9576A4006E7CB0 /* NSDictionary+Log.h in Headers */,
 				6B4C0F962C0320710070EF2E /* NSObject+Extensions.h in Headers */,
-				6BD506BA2B9576A4006E7CB0 /* PlayerViewController+backupsFile.h in Headers */,
 				6BD506BC2B9576A4006E7CB0 /* HelpDownScrollView.h in Headers */,
 				6B6ABEE82BFF49C800480BAC /* receiveDownloadRecordTableView.h in Headers */,
 				6BD506BD2B9576A4006E7CB0 /* allVersionView.h in Headers */,
@@ -3710,6 +3718,7 @@
 				6BD506E32B9576A4006E7CB0 /* diskListTableCell.h in Headers */,
 				6BD506E42B9576A4006E7CB0 /* UIView+View.h in Headers */,
 				6B93548A2BF2FE8700AA8D31 /* editTypeHeadView.h in Headers */,
+				6BC7414E2C240A670049BA8D /* webSocketManager+downloadFile.h in Headers */,
 				6B2C1E4B2C070ADE00FDCF82 /* ZFSpeedLoadingView.h in Headers */,
 				6BD506E52B9576A4006E7CB0 /* downloadFileRecordTableView.h in Headers */,
 				6B2C1E572C070ADE00FDCF82 /* UIScrollView+ZFPlayer.h in Headers */,
@@ -3720,6 +3729,7 @@
 				6BD506E92B9576A4006E7CB0 /* downloadFileRecordCell.h in Headers */,
 				6BD506EA2B9576A4006E7CB0 /* HidenMaskSetViewController.h in Headers */,
 				6B6ABEF42BFF6B4C00480BAC /* boxSaveFileManager.h in Headers */,
+				6BC7415A2C2413B20049BA8D /* webSocketManager+upLoadFile.h in Headers */,
 				6BA08F542C01D05B00A2242D /* CWUploadTask.h in Headers */,
 				6B2C1E692C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS16.h in Headers */,
 				6B9714412BCD00CA00CE0096 /* ComontAlretType2ViewController.h in Headers */,
@@ -3737,7 +3747,6 @@
 				6B2C1E432C070ADE00FDCF82 /* ZFSliderView.h in Headers */,
 				6BD506ED2B9576A4006E7CB0 /* forgetPwdViewController.h in Headers */,
 				6BD506EE2B9576A4006E7CB0 /* Reachability.h in Headers */,
-				6BD506EF2B9576A4006E7CB0 /* PlayerViewController+downloadFile.h in Headers */,
 				6BD506F02B9576A4006E7CB0 /* couldPhoneCommonModel.h in Headers */,
 				6B2C1E972C070ADE00FDCF82 /* ZFPlayerMediaPlayback.h in Headers */,
 				6B6ABEDC2BFF3AA400480BAC /* receiveView.h in Headers */,
@@ -3750,6 +3759,7 @@
 				6B2C1E612C070ADE00FDCF82 /* ZFKVOController.h in Headers */,
 				6BD506F32B9576A4006E7CB0 /* AJPhotoListCell.h in Headers */,
 				6B3AD68D2BF4AE630096D6B7 /* backupsOptionViewController.h in Headers */,
+				6BC741482C24097E0049BA8D /* webSocketManager+baseDownload.h in Headers */,
 				6BD506F42B9576A4006E7CB0 /* PlayerLoadingView.h in Headers */,
 				6B7EA79A2BF5B4A6002D5CC2 /* NASFilePicModel.h in Headers */,
 				6B2C1E912C070ADE00FDCF82 /* ZFPlayerLogManager.h in Headers */,
@@ -3764,10 +3774,10 @@
 				6BD506FA2B9576A4006E7CB0 /* AJPhotoListView.h in Headers */,
 				6B9354A82BF3848D00AA8D31 /* shareRecordViewController.h in Headers */,
 				6BD506FB2B9576A4006E7CB0 /* GuideView.h in Headers */,
-				6BD506FC2B9576A4006E7CB0 /* PlayerViewController+upLoadFile.h in Headers */,
 				6B2C1E752C070ADE00FDCF82 /* ZFLandscapeViewController.h in Headers */,
 				6B5D86752C22C63F008D25EA /* NASCommonUsedView.h in Headers */,
 				6BD506FD2B9576A4006E7CB0 /* uploadFileRecordBgScorllView.h in Headers */,
+				6BC741542C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.h in Headers */,
 				6B1F7FD82C00772500954720 /* boxDownloadFileManager.h in Headers */,
 				6BD506FE2B9576A4006E7CB0 /* ComontAlretViewController.h in Headers */,
 				6BD506FF2B9576A4006E7CB0 /* cachesFileManager.h in Headers */,
@@ -4203,6 +4213,7 @@
 				6B4C0F952C0320710070EF2E /* NSObject+Extensions.m in Sources */,
 				6BD5071C2B9576A4006E7CB0 /* backupsSetViewController.m in Sources */,
 				6BA08F0B2C0187DD00A2242D /* boxDownloadFileRecordCell.m in Sources */,
+				6BC741552C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.m in Sources */,
 				6B2C1E2F2C070ADE00FDCF82 /* ZFLoadingView.m in Sources */,
 				6BD5071D2B9576A4006E7CB0 /* diskListBgView.m in Sources */,
 				6BD5071E2B9576A4006E7CB0 /* iTools.m in Sources */,
@@ -4238,7 +4249,6 @@
 				6BD507302B9576A4006E7CB0 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
 				6BD507312B9576A4006E7CB0 /* BaseViewController.m in Sources */,
 				6B63179F2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.m in Sources */,
-				6BD507322B9576A4006E7CB0 /* PlayerViewController+upLoadFile.m in Sources */,
 				6BD507332B9576A4006E7CB0 /* Calculator.m in Sources */,
 				6B93549D2BF369D000AA8D31 /* previewToUploadFileView.m in Sources */,
 				6BD507342B9576A4006E7CB0 /* HWWebViewController.m in Sources */,
@@ -4260,6 +4270,7 @@
 				6B7EA7A12BF5E0ED002D5CC2 /* NASMsgModel.m in Sources */,
 				6BD507412B9576A4006E7CB0 /* AudioSessionObject.m in Sources */,
 				6B6ABEDD2BFF3AA400480BAC /* receiveView.m in Sources */,
+				6BC7414F2C240A670049BA8D /* webSocketManager+downloadFile.m in Sources */,
 				6BD507422B9576A4006E7CB0 /* ChangeLogoViewController.m in Sources */,
 				6BD507432B9576A4006E7CB0 /* uploadFileRecordheadView.m in Sources */,
 				6BD507442B9576A4006E7CB0 /* HWAgreementViewController.m in Sources */,
@@ -4296,7 +4307,6 @@
 				6BD507582B9576A4006E7CB0 /* UIView+HWCategory.m in Sources */,
 				6B2C1E8B2C070ADE00FDCF82 /* ZFPlayerController.m in Sources */,
 				6BD507592B9576A4006E7CB0 /* Const.m in Sources */,
-				6BD5075A2B9576A4006E7CB0 /* PlayerViewController+backupsFile.m in Sources */,
 				6B2C1E332C070ADE00FDCF82 /* ZFNetworkSpeedMonitor.m in Sources */,
 				6BD5075B2B9576A4006E7CB0 /* couldphoneSysInfoModel.m in Sources */,
 				6B2C1E512C070ADE00FDCF82 /* ZFUtilities.m in Sources */,
@@ -4311,6 +4321,7 @@
 				6BD507612B9576A4006E7CB0 /* FMDatabasePool.m in Sources */,
 				6BD507622B9576A4006E7CB0 /* iToast.m in Sources */,
 				6B2C1E272C070ADE00FDCF82 /* UIView+ZFFrame.m in Sources */,
+				6BC741492C24097E0049BA8D /* webSocketManager+baseDownload.m in Sources */,
 				6BD507632B9576A4006E7CB0 /* HWPageListCell.m in Sources */,
 				6BD507642B9576A4006E7CB0 /* downloadFileRecordTableView.m in Sources */,
 				6BD507652B9576A4006E7CB0 /* HWHomeListCell.m in Sources */,
@@ -4414,11 +4425,11 @@
 				6BD507A92B9576A4006E7CB0 /* AboutViewController.m in Sources */,
 				6BD507AA2B9576A4006E7CB0 /* JSONModelArray.m in Sources */,
 				6B4C0F692C0314BA0070EF2E /* DFPlayerLyricsTableview.m in Sources */,
+				6BC7415B2C2413B20049BA8D /* webSocketManager+upLoadFile.m in Sources */,
 				6BD507AB2B9576A4006E7CB0 /* AFURLSessionManager.m in Sources */,
 				6BD507AC2B9576A4006E7CB0 /* GuideLastView.m in Sources */,
 				6BD507AD2B9576A4006E7CB0 /* TvStatusModel.m in Sources */,
 				6BD507AE2B9576A4006E7CB0 /* fileTransferPathCheckTableViewCell.m in Sources */,
-				6BD507AF2B9576A4006E7CB0 /* PlayerViewController+downloadFile.m in Sources */,
 				6BD507B02B9576A4006E7CB0 /* ModifyPWDSecondViewController.m in Sources */,
 				6BD507B12B9576A4006E7CB0 /* photoPreViewBottomView.m in Sources */,
 				6BD507B22B9576A4006E7CB0 /* TipsQRCodeViewController.m in Sources */,
@@ -4462,7 +4473,7 @@
 				6BD507CA2B9576A4006E7CB0 /* HWHistoryModel.m in Sources */,
 				6B4C0F812C0314BA0070EF2E /* DFPlayerUIManager.m in Sources */,
 				6B2C1E9F2C070ADE00FDCF82 /* ZFPlayerView.m in Sources */,
-				6BD507CB2B9576A4006E7CB0 /* PlayerViewController+downloadThumbnailImage.m in Sources */,
+				6BC741612C24150C0049BA8D /* webSocketManager+backupsFile.m in Sources */,
 				6BD507CC2B9576A4006E7CB0 /* PlayerView.m in Sources */,
 				6BC7413D2C23C8870049BA8D /* cloudPhoneViewController.m in Sources */,
 				6BD507CD2B9576A4006E7CB0 /* HWToolBar.m in Sources */,
@@ -4512,6 +4523,7 @@
 				6B4C0F942C0320710070EF2E /* NSObject+Extensions.m in Sources */,
 				6B1FBD232B43DAD200926382 /* backupsSetViewController.m in Sources */,
 				6BA08F092C0187DD00A2242D /* boxDownloadFileRecordCell.m in Sources */,
+				6BC741532C2410CD0049BA8D /* webSocketManager+downloadThumbnailImage.m in Sources */,
 				6B2C1E2E2C070ADE00FDCF82 /* ZFLoadingView.m in Sources */,
 				6B45C50D2B5FA80E007E6911 /* diskListBgView.m in Sources */,
 				A003F6D127D8425C00715CBF /* iTools.m in Sources */,
@@ -4547,7 +4559,6 @@
 				183AE6512A8A2CF000B11CB0 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
 				A003F6A627D841C800715CBF /* BaseViewController.m in Sources */,
 				6B63179C2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.m in Sources */,
-				6B1FBD332B455DBD00926382 /* PlayerViewController+upLoadFile.m in Sources */,
 				18E557212A3C5D75005CC84B /* Calculator.m in Sources */,
 				6B93549A2BF369D000AA8D31 /* previewToUploadFileView.m in Sources */,
 				A003F6ED27D84D9C00715CBF /* HWWebViewController.m in Sources */,
@@ -4569,6 +4580,7 @@
 				6B7EA79F2BF5E0ED002D5CC2 /* NASMsgModel.m in Sources */,
 				6BBB35DE2AE76AD800E4A59B /* AudioSessionObject.m in Sources */,
 				6B6ABEDB2BFF3AA400480BAC /* receiveView.m in Sources */,
+				6BC7414D2C240A670049BA8D /* webSocketManager+downloadFile.m in Sources */,
 				181E84FC2A8F57A500292B96 /* ChangeLogoViewController.m in Sources */,
 				6B8FF6BA2B04E19600800981 /* uploadFileRecordheadView.m in Sources */,
 				A031DD7F27EC78C800909527 /* HWAgreementViewController.m in Sources */,
@@ -4605,7 +4617,6 @@
 				A003F6B527D841EE00715CBF /* UIView+HWCategory.m in Sources */,
 				6B2C1E8A2C070ADE00FDCF82 /* ZFPlayerController.m in Sources */,
 				A003F6E227D8428200715CBF /* Const.m in Sources */,
-				6B1FBD372B455DD600926382 /* PlayerViewController+backupsFile.m in Sources */,
 				6B2C1E322C070ADE00FDCF82 /* ZFNetworkSpeedMonitor.m in Sources */,
 				6B21708D2B14BDAA00656670 /* couldphoneSysInfoModel.m in Sources */,
 				6B2C1E502C070ADE00FDCF82 /* ZFUtilities.m in Sources */,
@@ -4620,6 +4631,7 @@
 				A08A950327E9A4E400C544BB /* FMDatabasePool.m in Sources */,
 				A003F6D327D8425C00715CBF /* iToast.m in Sources */,
 				6B2C1E262C070ADE00FDCF82 /* UIView+ZFFrame.m in Sources */,
+				6BC741472C24097E0049BA8D /* webSocketManager+baseDownload.m in Sources */,
 				A08A94E027E9837600C544BB /* HWPageListCell.m in Sources */,
 				6BED888B2B4E819000F76DDC /* downloadFileRecordTableView.m in Sources */,
 				A084D69827E8657800054880 /* HWHomeListCell.m in Sources */,
@@ -4723,11 +4735,11 @@
 				184C8AD62A949D5900F26650 /* AboutViewController.m in Sources */,
 				183AE6062A89CE3C00B11CB0 /* JSONModelArray.m in Sources */,
 				6B4C0F682C0314BA0070EF2E /* DFPlayerLyricsTableview.m in Sources */,
+				6BC741592C2413B20049BA8D /* webSocketManager+upLoadFile.m in Sources */,
 				183AE6562A8A2CF000B11CB0 /* AFURLSessionManager.m in Sources */,
 				1868201A2AB94877005702A6 /* GuideLastView.m in Sources */,
 				6BA533392B16E65500D1CB5C /* TvStatusModel.m in Sources */,
 				6B5B60732B3D8098009A2AE2 /* fileTransferPathCheckTableViewCell.m in Sources */,
-				6B5D40442B4CF04C000965CF /* PlayerViewController+downloadFile.m in Sources */,
 				18F9CB002ABD3643003FF71A /* ModifyPWDSecondViewController.m in Sources */,
 				6B0582702AFF692700D37290 /* photoPreViewBottomView.m in Sources */,
 				1868201E2AB97BE1005702A6 /* TipsQRCodeViewController.m in Sources */,
@@ -4771,7 +4783,7 @@
 				A0295B1627EDA0EC009C5D8B /* HWHistoryModel.m in Sources */,
 				6B4C0F802C0314BA0070EF2E /* DFPlayerUIManager.m in Sources */,
 				6B2C1E9E2C070ADE00FDCF82 /* ZFPlayerView.m in Sources */,
-				6B5D403C2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.m in Sources */,
+				6BC7415F2C24150C0049BA8D /* webSocketManager+backupsFile.m in Sources */,
 				183AE6B42A8CA00300B11CB0 /* PlayerView.m in Sources */,
 				6BC7413B2C23C8870049BA8D /* cloudPhoneViewController.m in Sources */,
 				A003F6F327D8593600715CBF /* HWToolBar.m in Sources */,

+ 1 - 6
创维盒子/双子星云手机/AppDelegate/Config/Notification.h

@@ -95,17 +95,12 @@
 
 
 /* 创建文件夹通知*/
-#define createFolderBeginNotification                 @"createFolderBeginNot"
-/* 创建文件夹通知*/
 #define createFolderDoneNotification                 @"createFolderDoneNot"
 
-/* 获取文件夹通知*/
-#define getFolderListBeginNotification                 @"getFolderListBeginNot"
 /* 获取文件夹完成通知*/
 #define getFolderListDoneNotification                 @"getFolderListDoneNot"
 
-/* 搜索云机对应文件*/
-#define searchFileListBeginNotification                 @"searchFileListBeginNot"
+
 /* 搜索云机对应文件*/
 #define searchFileListDoneNotification                 @"searchFileListDoneNoti"
 

+ 0 - 1
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -285,7 +285,6 @@
         [_curPlayerVC recyclResource];
         
         _curPlayerVC.liveStreamManager = nil;
-        _curPlayerVC.commandChannelManager = nil;
         [_curPlayerVC.navigationController popViewControllerAnimated:NO];
         _curPlayerVC = nil;
     }

+ 1 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/downLoadFile/downLoadPreviewViewController.m

@@ -572,8 +572,7 @@
     }
     [dict setObject:_defaultDiskPath forKey:@"path"];
     
-    [[NSNotificationCenter defaultCenter] postNotificationName:searchFileListBeginNotification object:dict];/*发送通知*/
-    
+    [[webSocketManager shareInstance] searchFileListBeginFun:dict];
     //[self showNewIndicatorWithCanBack:YES canTouch:NO];
     [self showNewIndicatorHaveStrWithCanBack:YES canTouch:NO showText:NSLocalizedString(@"common_loading_tip",nil)];
     

+ 2 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/fileTransfeSet/fileTransferPathCheckViewController.m

@@ -46,7 +46,7 @@
 
 - (void)getFolderListFun
 {
-    [[NSNotificationCenter defaultCenter] postNotificationName:getFolderListBeginNotification object:nil];
+    [[webSocketManager shareInstance] getBackupFolderListFun];
 }
 
 - (void)drawAnyView{
@@ -309,7 +309,7 @@
     }
     
     
-    [[NSNotificationCenter defaultCenter] postNotificationName:createFolderBeginNotification object:curbackupsDefaultPath];/*发送通知*/
+    [[webSocketManager shareInstance] createBackupsFolderBy:curbackupsDefaultPath];
 }
 
 - (void)createFolderDoneNotFun:(NSNotification *)notification

+ 1 - 1
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+AppDelegate.m

@@ -152,7 +152,7 @@
         //HLog(@"hxd111 cutting  %@",str);
         /*发送数据*/
         NSString *dataStr = [RCCommandHelp commandCuttingWithContent:str];
-        [self.commandChannelManager rc_sendData:dataStr];
+        [[webSocketManager shareInstance] send_data:dataStr];
         //pasteboard.string = @"";
     }
     

+ 0 - 25
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+backupsFile.h

@@ -1,25 +0,0 @@
-//
-//  PlayerViewController+backupsFile.h
-//  隐私保护
-//
-//  Created by xd h on 2024/1/3.
-//
-
-#import "PlayerViewController.h"
-#import "uploadFileDataModel.h"
-#import "RCCommandHelp.h"
-//#import "uploadFileManager.h"
-#import "cachesFileManager.h"
-#import <MJExtension.h>
-#import "connectDeviceManager.h"
-#import "PlayerViewController+upLoadFile.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface PlayerViewController (backupsFile)
-- (void)beginGotoBackupsFileFun:(NSNotification *)notification;
-- (void)applyBackupsFileServiceResponseFun:(NSDictionary *)dataDict;
-- (void)backupsFileFunServiceResponseFun:(NSDictionary *)dataDict;
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 19
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+downloadThumbnailImage.h

@@ -1,19 +0,0 @@
-//
-//  PlayerViewController+downloadThumbnailImage.h
-//  隐私保护
-//
-//  Created by xd h on 2024/1/8.
-//
-
-#import "PlayerViewController.h"
-#import "RCCommandHelp.h"
-#import "downloadThumbnailManager.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface PlayerViewController (downloadThumbnailImage)
-- (void)begindownloadThumbnailImageFun:(NSNotification *)notification;
-- (void)downloadThumbnailFileFunServiceResponseFun:(NSData *)fileData with:(BOOL)isDownloadDone;
-@end
-
-NS_ASSUME_NONNULL_END

+ 2 - 20
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.h

@@ -23,30 +23,12 @@ NS_ASSUME_NONNULL_BEGIN
 //强制重启
 - (void)updateForceStartFun;
 
-- (void)getCouldPhoneBaseInfoResponseFun:(NSDictionary *)dataDict;
-- (void)getCouldPhoneSysInfoResponseFun:(NSDictionary *)dataDict;
-- (void)getCouldPhoneTvStatusResponseFun:(NSDictionary *)dataDict;
-
-- (void)createFolderBeginNotFun:(NSNotification *)notification;
-- (void)createFolderResponseFun:(NSDictionary *)dataDict;
-
-- (void)getFolderListBeginNotFun:(NSNotification *)notification;
-- (void)getFolderListResponseFun:(NSDictionary *)dataDict;
-
-- (void)searchFileListBeginFun:(NSNotification *)notification;
-- (void)searchFileListResponseFun:(NSDictionary *)dataDict;
-
-- (void)handleDownloadResponseFunBy:(id)message;
 
 - (void)checkAllTaskFun;
-//检测是否正在进行的文件传输任务
-- (void)addCommandSendTaskFunWithType:(NSString*)type WithCommandStr:(NSString*)commandStr;
-- (void)deleteCommandSendTaskFunWith:(NSString*)type;
-- (void)getExtraFilesResponseFun:(NSDictionary *)dataDict;
+
 - (void)saveLastImageFun;
 - (void)readLastImageFun;
-- (void)getExtraMediaEventResponseFun:(NSDictionary *)dataDict;
-- (void)showInsertPopViewFun:(NSString*)name;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 1 - 358
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm

@@ -15,8 +15,6 @@
 #import <MJExtension.h>
 #import "HaveNewVersionView.h"
 #import "connectDeviceManager.h"
-#import "PlayerViewController+downloadFile.h"
-#import "PlayerViewController+downloadThumbnailImage.h"
 #import "downloadManager.h"
 #import "uploadFileManager.h"
 #import "cloudPhoneExtraFileListModel.h"
@@ -166,112 +164,6 @@
     };
 }
 
-
-- (void)getCouldPhoneBaseInfoResponseFun:(NSDictionary *)dataDict
-{
-    couldPhoneBaseInfoModel *model = [[couldPhoneBaseInfoModel alloc] initWithDictionary:dataDict error:nil];
-    [[NSNotificationCenter defaultCenter] postNotificationName:getCouldPhoneBaseInfoNotification object:model];
-}
-
-- (void)getCouldPhoneSysInfoResponseFun:(NSDictionary *)dataDict{
-    couldphoneSysInfoModel *model = [[couldphoneSysInfoModel alloc] initWithDictionary:dataDict error:nil];
-    [[NSNotificationCenter defaultCenter] postNotificationName:getCouldPhoneSysInfoNotification object:model];
-    
-//    NSString * predatestr = [HWDataManager getObjectWithKey:Const_did_show_image_version_date];
-//
-//    NSString *datestr = [iTools getNowDateString];
-//
-//    if(predatestr && [predatestr isEqualToString:datestr]){
-//        return;
-//    }
-    
-    NSString *hostImgVer = model.data.data.hostImgVer;
-    NSString *MyNewVersion = model.data.data.MyNewVersion;
-
-    //test code
-//    hostImgVer = @"1.2.3";
-//    MyNewVersion = @"1.2.0";
-    
-    //判断当前版本号 待更新版本
-    if (!hostImgVer || hostImgVer.length < 3
-        ||!MyNewVersion || MyNewVersion.length < 3) {
-        //[self showImageViewRenewTipViewFun];
-        return;
-    }
-    
-    NSArray *versionArr = [hostImgVer componentsSeparatedByString:@"."];
-    NSArray *MyNewVersionArr = [MyNewVersion componentsSeparatedByString:@"."];
-    
-    NSInteger versionArrCount = versionArr.count;
-    NSInteger MyNewVersionArrCount = MyNewVersionArr.count;
-    NSInteger maxCount =  versionArrCount < MyNewVersionArrCount ? versionArrCount:MyNewVersionArrCount;
-    
-    BOOL isNeedShowType = NO;
-    //判断是否要更新镜像框
-    if(maxCount > 0){
-        for (int i=0; i<maxCount; i++) {
-            NSString * numberStr1 = versionArr[i];
-            NSString * numberStr2 = MyNewVersionArr[i];
-            
-            if(numberStr2.intValue > numberStr1.intValue){
-                isNeedShowType =YES;
-                break;
-            }
-        }
-    }
-    
-    
-    if(isNeedShowType){
-        [self showImageViewRenewTipViewFun];
-    }
-    
-    //是否禁用文件传输 (1.3以及以上的镜像可以使用文件传输)
-    if(versionArr.count >= 3)
-    {
-        NSString * oneStr = versionArr[0];
-        NSString * twoStr = versionArr[1];
-        NSString * threeStr = versionArr[2];
-
-        if(oneStr.integerValue <=1 && twoStr.integerValue <=3 && threeStr.integerValue <=0){//禁用
-            ksharedAppDelegate.DisabledFileTransferType = YES;
-            
-            if(MyNewVersionArr.count >= 3)
-            {
-                NSString * newOneStr = MyNewVersionArr[0];
-                NSString * newTwoStr = MyNewVersionArr[1];
-                NSString * newThreeStr = MyNewVersionArr[2];
-                
-                if(newOneStr.integerValue >=1 && newTwoStr.integerValue >=3 && newThreeStr.integerValue >= 1){
-                    ksharedAppDelegate.isImageNewFor130 = YES;
-                }
-                else{
-                    ksharedAppDelegate.isImageNewFor130 = NO;
-                }
-            }
-        }
-        else{
-            ksharedAppDelegate.DisabledFileTransferType = NO;
-        }
-    }
-    
-}
-
-- (void)getCouldPhoneTvStatusResponseFun:(NSDictionary *)dataDict
-{
-    TvStatusModel *model = [[TvStatusModel alloc] initWithDictionary:dataDict error:nil];
-    [[NSNotificationCenter defaultCenter] postNotificationName:getCouldPhoneTvStatusNotification object:model];
-    
-    if(![model.msg containsString:@"PushStreamBActivity"])
-    {
-        return;
-    }
-    
-    UIViewController*topVc = self.navigationController.viewControllers.lastObject;
-    if([topVc isKindOfClass:[PlayerViewController class]]){
-        [[iToast makeText:NSLocalizedString(@"tv_p2p_ing",nil)] show];
-    }
-}
-
 - (void)showImageViewRenewTipViewFun
 {
     imageVersionRenewTipView * RenewTipView = [[imageVersionRenewTipView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
@@ -279,220 +171,6 @@
     [self.view bringSubviewToFront:RenewTipView];
 }
 
-- (void)createFolderBeginNotFun:(NSNotification *)notification
-{
-    NSString *folderName = [notification object];
-    
-    if(folderName && folderName.length >0){
-        NSString * commandStr = [RCCommandHelp applyForCreateFolderwithFolderName:folderName];
-        [self.commandChannelManager rc_sendData:commandStr];
-    }
-}
-
-- (void)createFolderResponseFun:(NSDictionary *)dataDict
-{
-    couldPhoneCommonModel *model = [[couldPhoneCommonModel alloc] initWithDictionary:dataDict error:nil];
-    
-    if(model){
-        NSNumber *curNum = [NSNumber numberWithInteger:model.status];
-        [[NSNotificationCenter defaultCenter] postNotificationName:createFolderDoneNotification object:curNum];/*发送通知*/
-    }
-}
-
-- (void)getFolderListBeginNotFun:(NSNotification *)notification
-{
-    NSString * commandStr = [RCCommandHelp getCreateFolderList];
-    [self.commandChannelManager rc_sendData:commandStr];
-}
-
-- (void)getFolderListResponseFun:(NSDictionary *)dataDict
-{
-    [[NSNotificationCenter defaultCenter] postNotificationName:getFolderListDoneNotification object:dataDict];/*发送通知*/
-}
-
-
-- (void)searchFileListBeginFun:(NSNotification *)notification
-{
-    NSMutableDictionary *objectDict = [notification object];
-    NSNumber *curNum = @1;
-    
-    if ([[objectDict allKeys] containsObject:@"type"]) {
-        curNum = [objectDict objectForKey:@"type"];
-    }
-    
-    NSString *pathStr = @"";
-    
-    if ([[objectDict allKeys] containsObject:@"path"]) {
-        pathStr = [objectDict objectForKey:@"path"];
-    }
-    
-    NSString *fileType = @"video";
-    
-    if(curNum.boolValue)
-    {
-        fileType = @"jpg";
-    }
-    
-    NSString * commandStr = [RCCommandHelp searchCouldPhoneFilewithType:fileType withPath:pathStr];
-    [self.commandChannelManager rc_sendData:commandStr];
-}
-- (void)searchFileListResponseFun:(NSDictionary *)dataDict
-{
-    [[NSNotificationCenter defaultCenter] postNotificationName:searchFileListDoneNotification object:dataDict];/*发送通知*/
-}
-
-
-// NSData转int
-- (int)data2Int:(NSData *)data{
-    Byte *byte = (Byte *)[data bytes];
-    // 有大小端模式问题?
-     return (byte[0] << 24) + (byte[1] << 16) + (byte[2] << 8) + (byte[3]);
-}
-
-
-- (void)handleDownloadResponseFunBy:(id)message
-{
-    NSData *curData = (NSData *)message;
-    
-//    if(curData.length < 20){
-//        return;
-//    }
-    
-    //head
-    NSData *headData = [curData subdataWithRange:NSMakeRange(0, 1)];
-    char head = 0;//104;
-    [headData getBytes:&head length:sizeof(head)];
-    //HLog(@"head: %d",head);
-    
-    //msgType  0x11(17)
-    NSData *msgTypeData = [curData subdataWithRange:NSMakeRange(1, 1)];
-    char msgType = 0;
-    [msgTypeData getBytes:&msgType length:sizeof(msgType)];
-    HLog(@"msgType: %d",msgType);
-    
-    //taskId  6位字符串
-    NSData *taskIdData = [curData subdataWithRange:NSMakeRange(2, 6)];
-    NSString* taskIdStr = [[NSString alloc] initWithData:taskIdData encoding:NSUTF8StringEncoding];;
-    HLog(@"taskId: %@",taskIdStr);
-    
-    if(curData.length <= 15){
-        HLog(@"消息长度不对不处理");
-        return;
-    }
-    
-    //datalen
-    NSData *datalenData = [curData subdataWithRange:NSMakeRange(8, 4)];
-    int datalen = [self data2Int:datalenData];
-    //HLog(@"datalen: %d",datalen);
-
-    //curNum
-    NSData *curNumData = [curData subdataWithRange:NSMakeRange(12, 4)];
-    int curNum = [self data2Int:curNumData];;
-    //HLog(@"curNum: %d",curNum);
-    
-    //totalNum
-    NSData *totalNumData = [curData subdataWithRange:NSMakeRange(16, 4)];
-    int totalNum = [self data2Int:totalNumData];
-    //HLog(@"totalNum: %d",totalNum);
-    
-    BOOL isDownloadDone = curNum == totalNum ? YES : NO;
-    
-    HLog(@"taskUid:%@ curNum:%d totalNum: %d datalen:%d isDownloadDone:%d",taskIdStr,curNum,totalNum,datalen -8,isDownloadDone);
-    
-    if(curData.length <= 23){
-        //data 的位置 装 成功或者失败
-        NSData *failTypeData = [curData subdataWithRange:NSMakeRange(20, 1)];
-        //0xcc (204)失败 0xcd (205)文件不存在 0xdd (221)完成  0xbb 187 完成
-        __block Byte failType;
-        [failTypeData getBytes:&failType length:sizeof(failType)];
-        
-        if(taskIdStr && [taskIdStr isEqualToString:self.downloadFileTaskUid]){
-            
-            if(failType == 0xcc || failType == 0xcf){
-                [[downloadManager shareInstance] DownloadFileFailOneFileFun];
-            }
-            else if(failType == 0xcd ){
-                [[downloadManager shareInstance] suspendDownloadFileFun:YES withModel:nil];
-                NSString *tipStr = NSLocalizedString(@"disk_not_find_tip",nil);
-                mainBlock(^{
-                    [[iToast makeText:tipStr] show];
-                });
-            }
-            else if(failType == 0xdd || failType == 0xbb){
-                [self downloadFileFunServiceResponseFun:[NSData new] with:YES];
-            }
-            else{
-                HLog(@"下载数据未知错误");
-                [[downloadManager shareInstance] DownloadFileFailOneFileFun];
-            }
-        }
-        
-        return;
-    }
-    
-    if(curData.length <= (20 + datalen - 8)){
-        HLog(@"下载数据解析出错了");
-        return;
-    }
-    
-    NSData *fileData = [curData subdataWithRange:NSMakeRange(20, datalen-8)];
-
-    if([taskIdStr isEqualToString:self.downloadFileTaskUid]){
-        [self downloadFileFunServiceResponseFun:fileData with:NO];
-    }
-    else if ([taskIdStr isEqualToString:self.downloadThumbnailTaskUid]){
-        [self downloadThumbnailFileFunServiceResponseFun:fileData with:YES];
-    }
-}
-
--(void)addCommandSendTaskFunWithType:(NSString*)type WithCommandStr:(NSString*)commandStr
-{
-    if(!commandSendCheckArr){
-        commandSendCheckArr = [NSMutableArray new];
-    }
-    
-    BOOL didAddType = NO;
-        
-    for (commandSendCheckModel *model in commandSendCheckArr) {
-        if([model.type isEqualToString:type]){
-            didAddType = YES;
-            model.reSendNum = 0;
-            model.sendTimerStamp = [iTools getNowTimeStamp];
-            break;
-        }
-    }
-        
-    if(!didAddType){
-        commandSendCheckModel *model = [commandSendCheckModel new];
-        model.commandStr = commandStr;
-        model.type = type;
-        model.reSendNum = 0;
-        model.sendTimerStamp = [iTools getNowTimeStamp];
-        [commandSendCheckArr addObject:model];
-    }
-    
-}
-
-
--(void)deleteCommandSendTaskFunWith:(NSString*)type
-{
-    if(commandSendCheckArr && commandSendCheckArr.count >0){
-        
-        NSArray *taskArr = [NSArray arrayWithArray:commandSendCheckArr];
-        
-        for (commandSendCheckModel *model in taskArr) {
-            if([type isEqualToString:model.type]){
-                [commandSendCheckArr removeObject:model];
-            }
-        }
-    }
-}
-
-- (void)getExtraFilesResponseFun:(NSDictionary *)dataDict
-{
-    cloudPhoneExtraFileListModel *model = [[cloudPhoneExtraFileListModel alloc] initWithDictionary:dataDict error:nil];
-    ksharedAppDelegate.cloudPhoneExtraFileListMod = model;
-}
 
 - (void)saveLastImageFun
 {
@@ -526,43 +204,8 @@
     }
 }
 
-- (void)getExtraMediaEventResponseFun:(NSDictionary *)dataDict
-{
-    extraMediaEventModel *model = [[extraMediaEventModel alloc] initWithDictionary:dataDict error:nil];
-    
-    NSString *tip = nil;
-    if(model.data.event == 0){
-        tip = NSLocalizedString(@"disk_insertion_tip",nil);
-        [self showInsertPopViewFun:model.data.name];
-    }
-    else if(model.data.event == 1){
-        tip = NSLocalizedString(@"disk_extract_tip",nil);
-    }
-    else if(model.data.event == 2){
-        tip = NSLocalizedString(@"disk_save_extract_tip",nil);
-    }
-    
-    NSString *totalTips = [[NSString alloc] initWithFormat:@"%@%@",model.data.name,tip];
-    
-    mainBlock(^{
-        [[iToast makeText:totalTips] show];
-    });
-}
 
-#pragma mark 显示插入UI弹框
-- (void)showInsertPopViewFun:(NSString*)name
-{
-    if(self->curUSBInsertPopV){
-        [self->curUSBInsertPopV removeFromSuperview];
-        self->curUSBInsertPopV = nil;
-    }
-    
-    self->curUSBInsertPopV = [[USBInsertPopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H) withName:name];
-    
-    UIViewController*lastVC =  self.navigationController.viewControllers.lastObject;
-    //[[iTools getKeyWindow] addSubview:self->curUSBInsertPopV];
-    [lastVC.view addSubview:self->curUSBInsertPopV];
-}
+
 
 - (void)getLastNoticeFun
 {

+ 0 - 26
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+upLoadFile.h

@@ -1,26 +0,0 @@
-//
-//  PlayerViewController+upLoadFile.h
-//  隐私保护
-//
-//  Created by xd h on 2024/1/3.
-//
-
-#import "PlayerViewController.h"
-#import "uploadFileDataModel.h"
-#import "RCCommandHelp.h"
-#import "uploadFileManager.h"
-#import "cachesFileManager.h"
-#import <MJExtension.h>
-#import "connectDeviceManager.h"
-NS_ASSUME_NONNULL_BEGIN
-
-@interface PlayerViewController (upLoadFile)
-- (void)beginGotoUploadFileFun:(NSNotification *)notification;
-- (void)suspendUploadFileFun:(NSNotification *)notification;
-
-- (void)applyUploadFileServiceResponseFun:(NSDictionary *)dataDict;
-- (void)upLoadFileFunServiceResponseFun:(NSDictionary *)dataDict;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 1 - 6
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.h

@@ -64,7 +64,7 @@
     
     UIView *wattingView;
     USBInsertPopView *curUSBInsertPopV;
-    NSMutableArray *commandSendCheckArr;//需要检测任务是否发出的的指令
+    
     /*弹窗提示重启*/
     ComontAlretViewController *logoutAlertVC;
     
@@ -89,9 +89,6 @@
 @property (nonatomic, copy) NSString *internetHttp;
 
 @property (nonatomic, strong) RCLiveSteamManager *liveStreamManager;
-@property (nonatomic, strong) RCCommandChannelManager *commandChannelManager;//指令通道
-@property (nonatomic, strong) RCCommandChannelManager *businessCommandChannelManager;//业务通道
-
 
 /**是否延迟发送打开app指令*/
 @property (nonatomic, assign) BOOL               delayPostOpenAppOrder;
@@ -209,8 +206,6 @@ typedef void(^completiongeBlock) (int stats , NSString *backData);
                 sureAction:(UIAlertAction*_Nullable)sureAction
               cancelAction:(UIAlertAction*_Nullable)cancelAction;
 
-- (void)openbusinessCommandChannelManagerrc_openURL;
-- (void)opencommandChannelManagerrc_openURL;
 
 #pragma mark - 设置是否可以播放声音和动画
 -(void)setShowImgAndVoiceTypeFun:(bool)isCan;

+ 15 - 464
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -11,10 +11,6 @@
 #import "PlayerViewController+AdjustBtnFrame.h"
 #import "PlayerViewController+AppDelegate.h"
 #import "PlayerViewController+otherDelegate.h"
-#import "PlayerViewController+upLoadFile.h"
-#import "PlayerViewController+backupsFile.h"
-#import "PlayerViewController+downloadFile.h"
-#import "PlayerViewController+downloadThumbnailImage.h"
 
 #import <AVFoundation/AVFoundation.h>
 
@@ -127,15 +123,10 @@ UIDocumentPickerDelegate>
     
     int preIFrameNum;
     
-    
 }
 @property (nonatomic, strong, nullable) RCVideoRecoderManager *recoderManager;
 @property (nonatomic, strong, nullable) RCAudioRecoderMamager *audioRecoderMamager;
 
-//@property (nonatomic, strong) RCLiveSteamManager *liveStreamManager;
-//@property (nonatomic, strong) RCCommandChannelManager *commandChannelManager;//指令通道
-//@property (nonatomic, strong) RCCommandChannelManager *businessCommandChannelManager;//业务通道
-
 //需不需要显示音量条
 @property (nonatomic, assign) BOOL isNeedShowVoiceBar;
 
@@ -191,8 +182,6 @@ UIDocumentPickerDelegate>
     }
     canControl = YES;
     _canShowImgAndVoiceType = NO;
-    //[self opencommandChannelManagerrc_openURL];
-    //[self openbusinessCommandChannelManagerrc_openURL];
 
     portConnect = [self->internetVideoPort intValue];
     ipConnect   = self->ip;
@@ -290,9 +279,7 @@ UIDocumentPickerDelegate>
     [self checkVersionFun];
     
     [self connectVideoServer];
-    [self opencommandChannelManagerrc_openURL];
     
-
 }
 
 - (void)initData
@@ -312,7 +299,7 @@ UIDocumentPickerDelegate>
     
     self.webSocketConcentTime = 0;
     
-    commandSendCheckArr = [NSMutableArray new];
+
 }
 
 - (void)viewWillAppear:(BOOL)animated {
@@ -372,14 +359,9 @@ UIDocumentPickerDelegate>
         
         self.didRecyclResource = YES;
         
-        [commandSendCheckArr removeAllObjects];
-        commandSendCheckArr = nil;
         // 销毁定时器
         [self cancelTimer];
         
-        //清空WebSocket连接
-        [self.commandChannelManager rc_close];
-        [self.businessCommandChannelManager rc_close];
         
         //globalBlock(^{
             [self.liveStreamManager rc_release];
@@ -441,8 +423,6 @@ UIDocumentPickerDelegate>
             self.liveStreamManager = [[RCLiveSteamManager alloc] init];
             self.liveStreamManager.delegate = self;
             
-            //[self opencommandChannelManagerrc_openURL];
-            //[self openbusinessCommandChannelManagerrc_openURL];
 
             portConnect = [internetVideoPort intValue];
             ipConnect   = ip;
@@ -474,400 +454,12 @@ UIDocumentPickerDelegate>
     }
 }
 
-- (void)opencommandChannelManagerrc_openURL
-{
-    if((!ip || ip.length ==0)
-       ||(!internetVideoPort || internetVideoPort.length ==0)){
-        return;
-    }
-    
-    if(self.commandChannelManager){
-        
-        if([self.commandChannelManager rc_socketStatus] == RCSocketCloudPhoneStatusConnected
-           ||[self.commandChannelManager rc_socketStatus] == RCSocketCloudPhoneStatusReceived){
-            //链接中不处理
-            HLog(@"WebSocket 链接时已经存在并且链接中");
-        }
-        else{
-            HLog(@"WebSocket 链接时已经存在并且链接失效");
-            
-            [self.commandChannelManager rc_close];
-            
-            self.commandChannelManager = nil;
-            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-                [self opencommandChannelManagerrc_openURL];
-            });
-        }
-        
-        return;
-    }
-    
-    KWeakSelf
-    //初始化指令通道
-    self.commandChannelManager = [[RCCommandChannelManager alloc] init];
-   
-    NSString *wsPort = @"";
-    if([connectDeviceManager shareInstance].isPingOk
-       && [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi){
-        ip = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.ip;
-        wsPort = @"9300";
-    }
-    else{
-        ip = ruiyunlinkIp;
-        wsPort = [[connectDeviceManager shareInstance] tcpPortStr];
-    }
-    
-    NSString *instructionsChannelUrl = [NSString stringWithFormat:@"ws://%@:%@/businessChannel",ip,wsPort];
-    
-    
-    if (instructionsChannelUrl && instructionsChannelUrl.length > 0) { //当都有值才可连接
-        HLog(@"WebSocket11111指令通道连接开始11111 url = %@ ",instructionsChannelUrl);
-        [self.commandChannelManager rc_openURL:instructionsChannelUrl connected:^{
-            HLog(@"WebSocket11111指令通道连接成功11111 url = %@ ",instructionsChannelUrl);
-            if (weakSelf.commandChannelManager.rc_socketStatus == RCSocketCloudPhoneStatusConnected){
-                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-                    
-                   // [weakSelf handlAllMsgAfterDidLinkFun];
-                    
-                    //设置分辨率
-//                    NSString *commondStr  = @"{\"data\":{\"height\":1920,\"width\":1080,\"dpi\":480},\"type\":\"setPhoneSize\"}";
-//                    [weakSelf send_data:commondStr];
-                    
-                    
-//                    /*获取自己的用户名(电话号码)*/
-//                    NSString *selfUseName = nil;
-//                    NSDictionary *dict111 = [[UseAccountManage shareInstance] getLoginInfo];
-//                    if ([[dict111 allKeys] containsObject:@"userName"]) {
-//                        selfUseName = [dict111 valueForKey:@"userName"];
-//                        /*查询是否有设备在远程控制*/
-//                        [self.commandChannelManager rc_sendData:[RCCommandHelp askControllcommandWithUseName:selfUseName]];
-//                    }
-                    
-//                    if (USELOCALKEYBOARD){
-//                        /*开启输入法透传*/
-//                        NSString *dataStr = [RCCommandHelp commandOpenLoaclKeyboad];
-//                        [self.commandChannelManager rc_sendData:dataStr];
-//                    }else{
-//                        /*关闭输入法透传*/
-//                        NSString *dataStr = [RCCommandHelp commandCloseLoaclKeyboad];
-//                        [self.commandChannelManager rc_sendData:dataStr];
-//                    }
-                });
-            }
-        } receive:^(id message, FLSocketCloudPhoneReceiveType type) {
-            
-            if([message isKindOfClass:[NSData class]] && [message length] == 0){
-                if(type == RCSocketCloudPhoneReceiveTypeForPong)
-                {
-                    [weakSelf keepWebSocketOKFun];
-                }
-                return;
-            }
-            
-            HLog(@"webSocket指令通道接收消息:------------------\n%@",message);
-            
-            if([message isKindOfClass:[NSMutableString class]] || [message isKindOfClass:[NSString class]])
-            {
-                message = [(NSString *)message dataUsingEncoding:(NSUTF8StringEncoding)];
-            }
-            
-            NSError *error = nil;
-            NSDictionary *dataDict = [NSJSONSerialization JSONObjectWithData:message options:NSJSONReadingMutableContainers error:&error];
-            
-            if(!dataDict){
-                [weakSelf handleDownloadResponseFunBy:message];
-                return;
-            }
-            
-            if(![dataDict isKindOfClass:[NSDictionary class]]){
-                //[__NSCFString allKeys] unrecognized selector sent to ins
-                return;
-            }
-            
-            NSString *messageType = dataDict[@"type"];
-            
-            if ([messageType isEqualToString:@"cutting"]) {
-                //[[iToast makeText:@"复制成功"] show];
-            }
-            else if ([messageType isEqualToString:@"forwardMsgRep"]){/*转发的回复*/
-                
-                cloudPhoneCommonModel *model = [[cloudPhoneCommonModel alloc] initWithDictionary:dataDict error:nil];
-                if(!model){
-                    return;
-                }
-                
-                if([model.data.msg isEqualToString:@"only one socket"]){
-                    [weakSelf deleteCommandSendTaskFunWith:@"offline_notification"];
-                }
-            }
-            else if ([messageType isEqualToString:@"forwardMsg"]){/*转发*/
-                /*获取指令类型*/
-                NSString *code = nil;
-                if ([[dataDict allKeys] containsObject:@"data"]) {
-                    NSDictionary *data = dataDict[@"data"];
-                    
-                     if([data isKindOfClass:[NSString class]]){
-                        NSString * dataStr = (NSString*)data;
-                        if([dataStr isEqualToString:@"offline_notification"]){
-                            HLog(@"被别人挤下线了");
-                            [weakSelf LogoutByOtherFun];
-                        }
-                         
-                         return;
-                    }
-                    else if ([data isKindOfClass:[NSDictionary class]] && [[data allKeys] containsObject:@"code"]) {
-                        code = [data objectForKey:@"code"];
-                        
-                        if (![code isKindOfClass:[NSString class]]) {
-                            code = [NSString stringWithFormat:@"%ld",[code integerValue]];
-                        }
-                    }
-                }
-                
-                /*获取用户名*/
-                NSString *useName = nil;
-                if ([[dataDict allKeys] containsObject:@"data"]) {
-                    NSDictionary *data = dataDict[@"data"];
-                    if ([[data allKeys] containsObject:@"userName"]) {
-                        useName = [data objectForKey:@"userName"];
-                    }
-                }
-                
-                
-                /*无控制权提示*/
-                //- (void)tipsNoDeviceContrWithPhoneIndex:(NSInteger)phoneIndex
-                /*提醒拿回控制权*/
-                //- (void)tipsGetBackDeviceContrWithPhoneIndex:(NSInteger)phoneIndex
-                /*提醒控制权被拿回*/
-                //- (void)tipsMainUserGetDeviceAuthBack
-                
-//                if ([code isEqualToString:@"3000"]) {/*有人询问控制权情况*/
-//                    if (self->deviceModel.authPhone==0 && self->deviceModel.phoneAuthStatus == 0){
-//                        return;/*自己的云手机且未授权直接返回*/
-//                    }
-//                    
-//                    if (![useName isEqualToString:selfUseName]){
-//                        /*根据实际情况进行相关回复*/
-//                        [self.commandChannelManager rc_sendData:[RCCommandHelp faceBackControllcommandWithUseName:selfUseName haveControl:self->canControl]];
-//                    }
-//                }else if ([code isEqualToString:@"4000"]){/*有在控制*/
-//                    if (self->deviceModel.authPhone==0 && self->deviceModel.phoneAuthStatus == 0){
-//                        return;/*自己的云手机且未授权直接返回*/
-//                    }
-//                    
-//                    if (self->deviceModel.authPhone==0) {/*是自己的设备时候要询问是否夺回控制权*/
-//                        if (![useName isEqualToString:selfUseName]) {
-//                            /*弹窗询问是否夺回控制权*/
-//                            [self tipsGetBackDeviceContrWithPhoneIndex:self->deviceModel];
-//                        }
-//                    }else if (![useName isEqualToString:selfUseName]) {
-//                        if (self->canControl == YES) {
-//                            [self tipsNoDeviceContrWithPhoneIndex:self->deviceModel];
-//                        }
-//                        self->canControl = NO;
-//                        if (!self->canControl&&self->controlView){
-//                            [self->controlView diasbleControltPhoneView];
-//                        }else if (self->controlView){
-//                            [self->controlView enableControltPhoneView];
-//                        }
-//                    }
-//                }else if ([code isEqualToString:@"4100"]){/*未控制*/
-//                    /*不用处理默认可以控制*/
-//                }else if ([code isEqualToString:@"5000"]){/*夺回控制权*/
-//                    if (self->deviceModel.authPhone==0 && self->deviceModel.phoneAuthStatus == 0){
-//                        return;/*自己的云手机且未授权直接返回*/
-//                    }
-//                    
-//                    if ([useName isEqualToString:selfUseName]){
-//                        return;
-//                    }
-//                    
-//                    if (self->deviceModel.authPhone!=0) {/*不是自己的设备时候要进行关闭控制权*/
-//                        if (self->canControl == YES) {
-//                            /*弹窗提示控制权已经被夺回*/
-//                            [self tipsMainUserGetDeviceAuthBack];
-//                        }
-//                        self->canControl = NO;
-//                        if (!self->canControl&&self->controlView){
-//                            [self->controlView diasbleControltPhoneView];
-//                        }else if (self->controlView){
-//                            [self->controlView enableControltPhoneView];
-//                        }
-//                    }
-//                }else
-                    if ([code isEqualToString:@"phoneSizeChange"]){/*分辨率改变*/
-                    if ([[dataDict allKeys] containsObject:@"data"]) {
-                        NSDictionary *data = dataDict[@"data"];
-                        if ([[data allKeys] containsObject:@"width"]) {
-                            ksharedAppDelegate.couldPhone_W_PHONE = [[data objectForKey:@"width"] integerValue];
-                        }
-                        if ([[data allKeys] containsObject:@"height"]) {
-                            ksharedAppDelegate.couldPhone_H_PHONE = [[data objectForKey:@"height"] integerValue];
-                        }
-                        
-                        if (ksharedAppDelegate.couldPhone_W_PHONE > ksharedAppDelegate.couldPhone_H_PHONE) {
-                            CGFloat temp = ksharedAppDelegate.couldPhone_W_PHONE;
-                            ksharedAppDelegate.couldPhone_W_PHONE = ksharedAppDelegate.couldPhone_H_PHONE;
-                            ksharedAppDelegate.couldPhone_H_PHONE = temp;
-                        }
-                    }
-                }
-            }
-            else if ([messageType isEqualToString:@"getPhoneSize"] || [messageType isEqualToString:@"setPhoneSize"]){
-                NSString *sn = nil;
-                if ([[dataDict allKeys] containsObject:@"data"]) {
-                    NSDictionary *data = dataDict[@"data"];
-                    
-                    if ([[data allKeys] containsObject:@"status"]) {
-                        NSInteger  status = [[data objectForKey:@"status"] integerValue];
-                        
-                        if (status == 0) {/*不是当前设备直接返回*/
-                            if ([[data allKeys] containsObject:@"width"]) {
-                                ksharedAppDelegate.couldPhone_W_PHONE = [[data objectForKey:@"width"] integerValue];
-                            }
-                            if ([[data allKeys] containsObject:@"height"]) {
-                                ksharedAppDelegate.couldPhone_H_PHONE = [[data objectForKey:@"height"] integerValue];
-                            }
-                            
-                            if (ksharedAppDelegate.couldPhone_W_PHONE > ksharedAppDelegate.couldPhone_H_PHONE) {
-                                CGFloat temp = ksharedAppDelegate.couldPhone_W_PHONE;
-                                ksharedAppDelegate.couldPhone_W_PHONE = ksharedAppDelegate.couldPhone_H_PHONE;
-                                ksharedAppDelegate.couldPhone_H_PHONE = temp;
-                            }
-                        }
-                    }
-                }
-                
-
-                
-//                {
-//                  "type":"getPhoneSize",    --接口类型
-//                  "data":{
-//                      "sn":"RK_XXX",       --安卓卡SN
-//                      "status":"0",        --状态:0:成功 1:失败
-//                      "msg":"success",     --请求状态:success 成功 failed 失败
-//                      "width":xxx,
-//                      "height":xxx,
-//                      "dpi":yyy  --屏幕密度
-//                  }
-//                }
-            }
-            else if ([messageType isEqualToString:@"sync_wifi"]){
-                [weakSelf sync_wifiBackHandleFun];
-            }
-            else if ([messageType isEqualToString:@"reProduceText"]){
-                if ([[dataDict allKeys] containsObject:@"data"]) {
-                    NSDictionary *data = dataDict[@"data"];
-
-                    if ([[data allKeys] containsObject:@"text"]) {
-                        NSString  *pasteboardStr = [data objectForKey:@"text"];
-                        UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
-                        pasteboard.string = pasteboardStr;
-                    }
-                }
-            }
-            else if ([messageType isEqualToString:@"downAdnInstallRep"]){
-                if ([[dataDict allKeys] containsObject:@"data"]) {
-                    NSDictionary *data = dataDict[@"data"];
-
-                    if ([[data allKeys] containsObject:@"status"]) {
-                        NSString  *status = [data objectForKey:@"status"];
-                        if ([status isEqualToString:@"1"]) {
-                            mainBlock(^{
-                               // [[iToast makeText:@"App下载完成"] show];
-                            });
-                        }else if ([status isEqualToString:@"0"]){
-                            mainBlock(^{
-                                //[[iToast makeText:@"App下载中"] show];
-                            });
-                        }
-                    }
-                }
-            }
-            else if ([messageType isEqualToString:@"shakeit"]){
-                HLog(@"\n-----摇一摇成功------");
-            }else if ([messageType isEqualToString:@"keyboardFeedbackBean"]){/*调起键盘*/
-                [weakSelf keyboardFeedbackBeanFun];
-            }else if ([messageType isEqualToString:@"FileRandomReady"]
-                      ||[messageType isEqualToString:@"FilePartReady"]
-                      ){/*申请文件上传得到答复*/
-                [weakSelf applyUploadFileServiceResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"uploadFileRandomRet"]
-                     ||[messageType isEqualToString:@"uploadFilePartRet"]
-                     ){/*文件上传得到答复*/
-                [weakSelf upLoadFileFunServiceResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"backUpFileRandomReady"]
-                     ||[messageType isEqualToString:@"backUpPartReady"]
-                     ){/*文件备份得到答复*/
-                [weakSelf applyBackupsFileServiceResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"backUpFileRandomRet"]
-                     ||[messageType isEqualToString:@"backUpFilePartRet"]){/*文件备份得到答复*/
-                [weakSelf backupsFileFunServiceResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"getBaseInfo"]){/*获取云机的基本信息*/
-                [weakSelf getCouldPhoneBaseInfoResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"getSysInfo"]){/*获取云机的系统信息*/
-                [weakSelf getCouldPhoneSysInfoResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"TvStatus"]){/*获取TV投屏信息*/
-                [weakSelf getCouldPhoneTvStatusResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"reboot"]){/*重启*/
-                [weakSelf stopForceStartTimerFun];
-            }
-            else if ([messageType isEqualToString:@"mkdir"]){/*创建文件夹*/
-                [weakSelf createFolderResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"getBackupPath"]){/*创建文件夹*/
-                [weakSelf getFolderListResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"search"]){/*创建文件夹*/
-                [weakSelf searchFileListResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"getExtraFiles"]){/*创建文件夹*/
-                [weakSelf getExtraFilesResponseFun:dataDict];
-            }
-            else if ([messageType isEqualToString:@"extraMediaEvent"]){/*磁盘插拔*/
-                [weakSelf getExtraMediaEventResponseFun:dataDict];
-                //[weakSelf getExtraFilesListFun];
-            }
-            else if ([messageType isEqualToString:@"reset"]){/**/
-                [weakSelf deleteCommandSendTaskFunWith:@"reset"];
-            }
-            
-        } failure:^(NSError *error) {
-            ksharedAppDelegate.isWebSockLinkOKAginType = NO;
-            [self showNetErrorAlertFun:2];
-            [self WebSocketNeedRelinkFun];
-        }];
-    }
-}
 
 - (void)keepWebSocketOKFun
 {
     self.webSocketTime = 0;
 }
 
-- (void)WebSocketNeedRelinkFun
-{
-    self.webSocketTime = 0;
-    
-    //[self showNetErrorAlertFun:2];
-    if(self.commandChannelManager){
-        [self opencommandChannelManagerrc_openURL];
-    }
-}
-
-#pragma mark wifi handle
-- (void)sync_wifiBackHandleFun
-{
-    [self.commandChannelManager rc_sendData:[RCCommandHelp noSyncWifiBack]];
-    [[iToast makeText:NSLocalizedString(@"player_Tip_ios_no_wifi_Sync",nil)] show];
-}
 
 - (void)keyboardFeedbackBeanFun
 {
@@ -888,7 +480,7 @@ UIDocumentPickerDelegate>
         NSRange newInOld = [hidenTextFieldOldStr rangeOfString:textField.text];
         if (newInOld.location == 0 && newInOld.length == textField.text.length){/*删除*/
             NSString *dataStr = [RCCommandHelp commandKeyboadInputStr:nil];
-            [self.businessCommandChannelManager rc_sendData:dataStr];
+            //[self.businessCommandChannelManager rc_sendData:dataStr];
             /*删除以后在输入框前面新增一个字符*/
             NSString *tempStr = textField.text;
             if (tempStr.length > 0){
@@ -907,7 +499,7 @@ UIDocumentPickerDelegate>
                 NSString *addStr = [textField.text substringWithRange:(NSMakeRange(hidenTextFieldOldStr.length, textField.text.length - hidenTextFieldOldStr.length))];
                 NSLog(@"键盘透传--@@@@新增内容:%@",addStr);
                 NSString *dataStr = [RCCommandHelp commandKeyboadInputStr:addStr];
-                [self.businessCommandChannelManager rc_sendData:dataStr];
+                //[self.businessCommandChannelManager rc_sendData:dataStr];
             }else{/*部分覆盖*/
                 /*覆盖分为两部分 1、覆盖的内容更长 2、覆盖的内容更短*/
                 /*删除不同的部分  加上变化的部分*/
@@ -922,14 +514,14 @@ UIDocumentPickerDelegate>
                 NSInteger needDeleteLength = hidenTextFieldOldStr.length - sameLength;
                 for (NSInteger nFori = 0; nFori < needDeleteLength; nFori++) {
                     NSString *dataStr = [RCCommandHelp commandKeyboadInputStr:nil];
-                    [self.businessCommandChannelManager rc_sendData:dataStr];
+                    //[self.businessCommandChannelManager rc_sendData:dataStr];
                 }
                 
                 /*需要增加的内容*/
                 NSInteger needLength = textField.text.length - sameLength;
                 NSString *addStr = [textField.text substringWithRange:(NSMakeRange(sameLength, needLength))];
                 NSString *dataStr = [RCCommandHelp commandKeyboadInputStr:addStr];
-                [self.businessCommandChannelManager rc_sendData:dataStr];
+                //[self.businessCommandChannelManager rc_sendData:dataStr];
             }
         }
         hidenTextFieldOldStr = textField.text;
@@ -1251,7 +843,7 @@ UIDocumentPickerDelegate>
                     [[iToast makeText:NSLocalizedString(@"player_link_reboot_suc_Tips",nil)] show];
                 });
                 _isRebootIngType = NO;
-                [self opencommandChannelManagerrc_openURL];
+                //[self opencommandChannelManagerrc_openURL];
             }
             
             //重启后重连 出来的
@@ -1260,7 +852,7 @@ UIDocumentPickerDelegate>
                     [[iToast makeText:NSLocalizedString(@"my_set_no_Restore_Factory_ok_tips",nil)] show];
                 });
                 _isResetingType = NO;
-                [self opencommandChannelManagerrc_openURL];
+                //[self opencommandChannelManagerrc_openURL];
             }
             
             
@@ -1619,7 +1211,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     if (canControl)
     {
         //KyoLog(@"\n-commandChannelManager---%ld--%@",self.commandChannelManager.rc_socketStatus,dataStr);
-        [self.commandChannelManager rc_sendData:dataStr];
+        [[webSocketManager shareInstance] send_data:dataStr];
     }
 }
 
@@ -1747,7 +1339,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     _isResetingType = YES;
     
     //添加到任务监听
-    [self addCommandSendTaskFunWithType:@"reset" WithCommandStr:commondStr];
+    //[self addCommandSendTaskFunWithType:@"reset" WithCommandStr:commondStr];
     
 }
 
@@ -1770,17 +1362,11 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     KWeakSelf
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         [weakSelf reconnectDevice];
-        [weakSelf WebSocketNeedRelinkFun];
+        [[webSocketManager shareInstance] WebSocketNeedRelinkFun];
     });
 }
 
-- (void)stopForceStartTimerFun
-{
-    if(forceStartTimer){
-        [forceStartTimer invalidate];
-        forceStartTimer = nil;
-    }
-}
+
 
 
 
@@ -1788,10 +1374,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
 #pragma mark 单点登录被挤下线弹框
 - (void)LogoutByOtherFun
 {
-    //
-    [self.commandChannelManager rc_close];
-    self.commandChannelManager = nil;
-    
+
     [self disconnectVideoServer];
     
     _canShowImgAndVoiceType = NO;
@@ -1830,7 +1413,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
                                                                                  okTitle:loginAgainStr isOkBtnHighlight:isOkBtnHighlight
                                                                              didClickOk:^{
         [weakSelf tryAgain];
-        [weakSelf WebSocketNeedRelinkFun];
+        [[webSocketManager shareInstance] WebSocketNeedRelinkFun];
         
     } didClickCancel:^{
         
@@ -1886,7 +1469,6 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
         
         if(_isLoginAgainType ){
             [self tryAgain];
-            [self opencommandChannelManagerrc_openURL];
             
             //[self fristConnectNeedGiveAMsgFun];
         }
@@ -2317,7 +1899,7 @@ BOOL inReconnect = NO;
     
     mainBlock(^{
         if(self->linkFailAlretVC && self->linkFailAlretVC.view.tag == 2){
-            [self WebSocketNeedRelinkFun];//hxd add 20240229
+            [[webSocketManager shareInstance] WebSocketNeedRelinkFun];
         }
     });
     
@@ -2471,11 +2053,6 @@ BOOL inReconnect = NO;
     
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(beginGotoBackupsFileFun:) name:backupsFileBeginNotification object:nil];
     
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(createFolderBeginNotFun:) name:createFolderBeginNotification object:nil];
-    
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getFolderListBeginNotFun:) name:getFolderListBeginNotification object:nil];
-    
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(searchFileListBeginFun:) name:searchFileListBeginNotification object:nil];
 
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(begindownloadThumbnailImageFun:) name:downloadThumbnailBeginNotification object:nil];
     
@@ -2973,32 +2550,6 @@ static int  couneeee = 0;
     
     
     [self checkConcentTime];// 3、30s之后 没有收到拉流数据 自动断开链接
-    
-    //处理websockt是否断开
-    self.webSocketTime++;
-    
-    //处理其他任务
-    self.webSocketTaskTime++;
-    
-    if(self.webSocketTime > 8)
-    {
-        [self WebSocketNeedRelinkFun];
-    }
-    
-    if(self.webSocketTaskTime > 10)
-    {
-        self.webSocketTaskTime = 0;
-        [self checkAllTaskFun];
-        
-        _offlineNotTime ++;
-//        if(_offlineNotTime > 6 && self.commandChannelManager){
-//            NSString *commondStr  = @"{\"type\":\"forwardMsg\",\"data\":\"offline_notification\"}";
-//            [self send_data:commondStr];
-//            _offlineNotTime = 0;
-//        }
-    }
-    
-    //HLog(@"webSocketTime %ld",self.webSocketTaskTime);
 }
 
 // 3、30s之后 没有收到拉流数据 自动断开链接
@@ -3283,7 +2834,7 @@ static int  couneeee = 0;
 - (void)textFieldDidEndEditing:(UITextField *)textField{
     HLog(@"\n-----输入法透传 1111111 关闭键盘-------");
     NSString *dataStr = [RCCommandHelp commandClosePhoneKeyboad];
-    [self.businessCommandChannelManager rc_sendData:dataStr];
+    //[self.businessCommandChannelManager rc_sendData:dataStr];
 }
 
 -(BOOL)prefersHomeIndicatorAutoHidden {

+ 18 - 0
创维盒子/双子星云手机/cloudPhone/webSocketManager+backupsFile.h

@@ -0,0 +1,18 @@
+//
+//  webSocketManager+backupsFile.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/20.
+//
+
+#import "webSocketManager.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface webSocketManager (backupsFile)
+- (void)beginGotoBackupsFileFun:(NSNotification *)notification;
+- (void)applyBackupsFileServiceResponseFun:(NSDictionary *)dataDict;
+- (void)backupsFileFunServiceResponseFun:(NSDictionary *)dataDict;
+@end
+
+NS_ASSUME_NONNULL_END

+ 7 - 6
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+backupsFile.m

@@ -1,13 +1,13 @@
 //
-//  PlayerViewController+backupsFile.m
-//  隐私保护
+//  webSocketManager+backupsFile.m
+//  双子星云手机
 //
-//  Created by xd h on 2024/1/3.
+//  Created by xd h on 2024/6/20.
 //
 
-#import "PlayerViewController+backupsFile.h"
+#import "webSocketManager+backupsFile.h"
 
-@implementation PlayerViewController (backupsFile)
+@implementation webSocketManager (backupsFile)
 /*****************备份相关**********************************/
 - (void)beginGotoBackupsFileFun:(NSNotification *)notification
 {
@@ -335,7 +335,7 @@
                             }
                             else{
                                 NSInteger curIndex = [fileLengthNum longValue] % EachPieceSzie;
-                                //把当前的上传位置指定已经上传的前一片,后续++ 
+                                //把当前的上传位置指定已经上传的前一片,后续++
                                 self.backupsIndexOfUploadFlie = curIndex -1;
                             }
                         }
@@ -642,3 +642,4 @@
 
 
 @end
+

+ 16 - 0
创维盒子/双子星云手机/cloudPhone/webSocketManager+baseDownload.h

@@ -0,0 +1,16 @@
+//
+//  webSocketManager+baseDownload.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/20.
+//
+
+#import "webSocketManager.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface webSocketManager (baseDownload)
+- (void)handleDownloadResponseFunBy:(id)message;
+@end
+
+NS_ASSUME_NONNULL_END

+ 116 - 0
创维盒子/双子星云手机/cloudPhone/webSocketManager+baseDownload.m

@@ -0,0 +1,116 @@
+//
+//  webSocketManager+baseDownload.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/20.
+//
+
+#import "webSocketManager+baseDownload.h"
+
+@implementation webSocketManager (baseDownload)
+
+// NSData转int
+- (int)data2Int:(NSData *)data{
+    Byte *byte = (Byte *)[data bytes];
+    // 有大小端模式问题?
+     return (byte[0] << 24) + (byte[1] << 16) + (byte[2] << 8) + (byte[3]);
+}
+
+
+- (void)handleDownloadResponseFunBy:(id)message
+{
+    NSData *curData = (NSData *)message;
+    
+//    if(curData.length < 20){
+//        return;
+//    }
+    
+    //head
+    NSData *headData = [curData subdataWithRange:NSMakeRange(0, 1)];
+    char head = 0;//104;
+    [headData getBytes:&head length:sizeof(head)];
+    //HLog(@"head: %d",head);
+    
+    //msgType  0x11(17)
+    NSData *msgTypeData = [curData subdataWithRange:NSMakeRange(1, 1)];
+    char msgType = 0;
+    [msgTypeData getBytes:&msgType length:sizeof(msgType)];
+    HLog(@"msgType: %d",msgType);
+    
+    //taskId  6位字符串
+    NSData *taskIdData = [curData subdataWithRange:NSMakeRange(2, 6)];
+    NSString* taskIdStr = [[NSString alloc] initWithData:taskIdData encoding:NSUTF8StringEncoding];;
+    HLog(@"taskId: %@",taskIdStr);
+    
+    if(curData.length <= 15){
+        HLog(@"消息长度不对不处理");
+        return;
+    }
+    
+    //datalen
+    NSData *datalenData = [curData subdataWithRange:NSMakeRange(8, 4)];
+    int datalen = [self data2Int:datalenData];
+    //HLog(@"datalen: %d",datalen);
+
+    //curNum
+    NSData *curNumData = [curData subdataWithRange:NSMakeRange(12, 4)];
+    int curNum = [self data2Int:curNumData];;
+    //HLog(@"curNum: %d",curNum);
+    
+    //totalNum
+    NSData *totalNumData = [curData subdataWithRange:NSMakeRange(16, 4)];
+    int totalNum = [self data2Int:totalNumData];
+    //HLog(@"totalNum: %d",totalNum);
+    
+    BOOL isDownloadDone = curNum == totalNum ? YES : NO;
+    
+    HLog(@"taskUid:%@ curNum:%d totalNum: %d datalen:%d isDownloadDone:%d",taskIdStr,curNum,totalNum,datalen -8,isDownloadDone);
+    
+    if(curData.length <= 23){
+        //data 的位置 装 成功或者失败
+        NSData *failTypeData = [curData subdataWithRange:NSMakeRange(20, 1)];
+        //0xcc (204)失败 0xcd (205)文件不存在 0xdd (221)完成  0xbb 187 完成
+        __block Byte failType;
+        [failTypeData getBytes:&failType length:sizeof(failType)];
+        
+        if(taskIdStr && [taskIdStr isEqualToString:self.downloadFileTaskUid]){
+            
+            if(failType == 0xcc || failType == 0xcf){
+                [[downloadManager shareInstance] DownloadFileFailOneFileFun];
+            }
+            else if(failType == 0xcd ){
+                [[downloadManager shareInstance] suspendDownloadFileFun:YES withModel:nil];
+                NSString *tipStr = NSLocalizedString(@"disk_not_find_tip",nil);
+                mainBlock(^{
+                    [[iToast makeText:tipStr] show];
+                });
+            }
+            else if(failType == 0xdd || failType == 0xbb){
+                [self downloadFileFunServiceResponseFun:[NSData new] with:YES];
+            }
+            else{
+                HLog(@"下载数据未知错误");
+                [[downloadManager shareInstance] DownloadFileFailOneFileFun];
+            }
+        }
+        
+        return;
+    }
+    
+    if(curData.length <= (20 + datalen - 8)){
+        HLog(@"下载数据解析出错了");
+        return;
+    }
+    
+    NSData *fileData = [curData subdataWithRange:NSMakeRange(20, datalen-8)];
+
+    if([taskIdStr isEqualToString:self.downloadFileTaskUid]){
+        [self downloadFileFunServiceResponseFun:fileData with:NO];
+    }
+    else if ([taskIdStr isEqualToString:self.downloadThumbnailTaskUid]){
+        [self downloadThumbnailFileFunServiceResponseFun:fileData with:YES];
+    }
+}
+
+
+@end

+ 5 - 6
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+downloadFile.h

@@ -1,16 +1,15 @@
 //
-//  PlayerViewController+downloadFile.h
-//  隐私保护
+//  webSocketManager+downloadFile.h
+//  双子星云手机
 //
-//  Created by xd h on 2024/1/9.
+//  Created by xd h on 2024/6/20.
 //
 
-#import "PlayerViewController.h"
-#import "RCCommandHelp.h"
+#import "webSocketManager.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface PlayerViewController (downloadFile)
+@interface webSocketManager (downloadFile)
 - (void)begindownloadFileFun:(NSNotification *)notification;
 - (void)downloadFileFunServiceResponseFun:(NSData *)fileData with:(BOOL)isDownloadDone;
 - (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls;

+ 25 - 22
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+downloadFile.m

@@ -1,15 +1,16 @@
 //
-//  PlayerViewController+downloadFile.m
-//  隐私保护
+//  webSocketManager+downloadFile.m
+//  双子星云手机
 //
-//  Created by xd h on 2024/1/9.
+//  Created by xd h on 2024/6/20.
 //
 
-#import "PlayerViewController+downloadFile.h"
+#import "webSocketManager+downloadFile.h"
+
 #import "cachesFileManager.h"
 #import "downloadManager.h"
 
-@implementation PlayerViewController (downloadFile)
+@implementation webSocketManager (downloadFile)
 - (void)begindownloadFileFun:(NSNotification *)notification
 {
     self.curDownloadFileModel = [notification object];
@@ -218,23 +219,24 @@
 //下载音频 文件等
 - (void)loadOtherDataFinished
 {
-    [[downloadManager shareInstance] DownloadFileDoneOneFileFun];
-    
-    NSString *fileName = [self.curDownloadFileModel getFileNameFun];
-    NSString*filePath = [cachesFileManager getFilePathWithName:fileName type:DownLoadFileType];
-    
-    if (![[NSFileManager defaultManager] fileExistsAtPath:filePath]){
-        HLog(@"没有找到文件:%@",fileName);
-        return;
-    }
-    
-    NSURL * fileURL = [NSURL fileURLWithPath:filePath];
-    UIDocumentPickerViewController *documentPickerVC = [[UIDocumentPickerViewController alloc] initWithURL:fileURL inMode:UIDocumentPickerModeExportToService];
-    // 设置代理
-    documentPickerVC.delegate = self;
-    // 设置模态弹出方式
-    documentPickerVC.modalPresentationStyle = UIModalPresentationFormSheet;
-    [self.navigationController presentViewController:documentPickerVC animated:YES completion:nil];
+    HLog(@"\n\n\n\n\n\n\n\n没有处理 loadOtherDataFinished \n\n\n\n\n\n\n\n");
+//    [[downloadManager shareInstance] DownloadFileDoneOneFileFun];
+//    
+//    NSString *fileName = [self.curDownloadFileModel getFileNameFun];
+//    NSString*filePath = [cachesFileManager getFilePathWithName:fileName type:DownLoadFileType];
+//    
+//    if (![[NSFileManager defaultManager] fileExistsAtPath:filePath]){
+//        HLog(@"没有找到文件:%@",fileName);
+//        return;
+//    }
+//    
+//    NSURL * fileURL = [NSURL fileURLWithPath:filePath];
+//    UIDocumentPickerViewController *documentPickerVC = [[UIDocumentPickerViewController alloc] initWithURL:fileURL inMode:UIDocumentPickerModeExportToService];
+//    // 设置代理
+//    documentPickerVC.delegate = self;
+//    // 设置模态弹出方式
+//    documentPickerVC.modalPresentationStyle = UIModalPresentationFormSheet;
+//    [self.navigationController presentViewController:documentPickerVC animated:YES completion:nil];
 }
  
 
@@ -268,3 +270,4 @@
 
 
 @end
+

+ 17 - 0
创维盒子/双子星云手机/cloudPhone/webSocketManager+downloadThumbnailImage.h

@@ -0,0 +1,17 @@
+//
+//  webSocketManager+downloadThumbnailImage.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/20.
+//
+
+#import "webSocketManager.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface webSocketManager (downloadThumbnailImage)
+- (void)begindownloadThumbnailImageFun:(NSNotification *)notification;
+- (void)downloadThumbnailFileFunServiceResponseFun:(NSData *)fileData with:(BOOL)isDownloadDone;
+@end
+
+NS_ASSUME_NONNULL_END

+ 5 - 5
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+downloadThumbnailImage.m

@@ -1,13 +1,13 @@
 //
-//  PlayerViewController+downloadThumbnailImage.m
-//  隐私保护
+//  webSocketManager+downloadThumbnailImage.m
+//  双子星云手机
 //
-//  Created by xd h on 2024/1/8.
+//  Created by xd h on 2024/6/20.
 //
 
-#import "PlayerViewController+downloadThumbnailImage.h"
+#import "webSocketManager+downloadThumbnailImage.h"
 
-@implementation PlayerViewController (downloadThumbnailImage)
+@implementation webSocketManager (downloadThumbnailImage)
 - (void)begindownloadThumbnailImageFun:(NSNotification *)notification
 {
     self.curDownloadThumbnailModel = [notification object];

+ 20 - 0
创维盒子/双子星云手机/cloudPhone/webSocketManager+upLoadFile.h

@@ -0,0 +1,20 @@
+//
+//  webSocketManager+upLoadFile.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/20.
+//
+
+#import "webSocketManager.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface webSocketManager (upLoadFile)
+- (void)beginGotoUploadFileFun:(NSNotification *)notification;
+- (void)suspendUploadFileFun:(NSNotification *)notification;
+
+- (void)applyUploadFileServiceResponseFun:(NSDictionary *)dataDict;
+- (void)upLoadFileFunServiceResponseFun:(NSDictionary *)dataDict;
+@end
+
+NS_ASSUME_NONNULL_END

+ 5 - 5
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+upLoadFile.m

@@ -1,13 +1,13 @@
 //
-//  PlayerViewController+upLoadFile.m
-//  隐私保护
+//  webSocketManager+upLoadFile.m
+//  双子星云手机
 //
-//  Created by xd h on 2024/1/3.
+//  Created by xd h on 2024/6/20.
 //
 
-#import "PlayerViewController+upLoadFile.h"
+#import "webSocketManager+upLoadFile.h"
 
-@implementation PlayerViewController (upLoadFile)
+@implementation webSocketManager (upLoadFile)
 #pragma mark 监听文件开始的的通知
 - (void)beginGotoUploadFileFun:(NSNotification *)notification
 {

+ 50 - 0
创维盒子/双子星云手机/cloudPhone/webSocketManager.h

@@ -15,6 +15,13 @@
 #import "AudioSessionObject.h"
 #import "commandSendCheckModel.h"
 #import "RCCommandHelp.h"
+#import "cloudPhoneCommonModel.h"
+#import "couldPhoneBaseInfoModel.h"
+#import "couldphoneSysInfoModel.h"
+#import "TvStatusModel.h"
+#import "couldPhoneCommonModel.h"
+#import "extraMediaEventModel.h"
+
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -22,10 +29,53 @@ NS_ASSUME_NONNULL_BEGIN
 +(webSocketManager *)shareInstance;
 @property (nonatomic, strong) RCCommandChannelManager *commandChannelManager;//指令通道
 
+//上传文件用到
+@property (nonatomic, copy) NSString * _Nullable taskUid;
+@property (nonatomic, copy) NSString * _Nullable fileName;
+@property (nonatomic, strong) NSData * _Nullable AllFileData;
+@property (nonatomic, strong) NSMutableArray * _Nullable cutFileDataArr;
+@property (nonatomic, assign) NSInteger indexOfUploadFlie;
+@property (nonatomic, assign) NSInteger cutFileEachPieceSzie;
+@property (nonatomic, strong) uploadFileDataModel *curUploadFileDataMod;
+@property (nonatomic, assign) BOOL isSuspendUploadType;
+@property (nonatomic, assign) long curUploadPostion;//当前上次片的位置
+
+//下载文件用到
+@property (nonatomic, copy) NSString * _Nullable downloadFileTaskUid;
+@property (nonatomic, strong) couldPhoneFileModel *curDownloadFileModel;
+
+//备份文件用到
+@property (nonatomic, copy) NSString * _Nullable backupsTaskUid;
+@property (nonatomic, copy) NSString * _Nullable backupsFileName;
+@property (nonatomic, strong) NSData * _Nullable backupsAllFileData;
+@property (nonatomic, strong) NSMutableArray * _Nullable backupsCutFileDataArr;
+@property (nonatomic, assign) NSInteger backupsIndexOfUploadFlie;
+//@property (nonatomic, assign) NSInteger cutFileEachPieceSzie;
+@property (nonatomic, strong) photosBackupsTaskModel *curPhotosBackupsTaskMod;
+@property (nonatomic, assign) long curBackupsPostion;//当前上次片的位置
+
+//下载缩略图用到
+@property (nonatomic, copy) NSString * _Nullable downloadThumbnailTaskUid;
+@property (nonatomic, strong) couldPhoneFileModel *curDownloadThumbnailModel;
+
+
 //链接websocket
 - (void)opencommandChannelManagerrc_openURL;
+- (void)WebSocketNeedRelinkFun;
 //websocket 发消息
 - (void)send_data:(NSString *)dataStr;
+
+//创建备份文件夹
+- (void)createBackupsFolderBy:(NSString*)backupsDefaultPath;
+//获取备份文件夹列表
+- (void)getBackupFolderListFun;
+- (void)searchFileListBeginFun:(NSMutableDictionary *)dict;
+
+
+
+- (void)handleDownloadResponseFunBy:(id)message;
+- (void)downloadFileFunServiceResponseFun:(NSData *)fileData with:(BOOL)isDownloadDone;
+- (void)downloadThumbnailFileFunServiceResponseFun:(NSData *)fileData with:(BOOL)isDownloadDone;
 @end
 
 NS_ASSUME_NONNULL_END

+ 463 - 193
创维盒子/双子星云手机/cloudPhone/webSocketManager.m

@@ -7,6 +7,12 @@
 
 #import "webSocketManager.h"
 
+#import "webSocketManager+baseDownload.h"
+#import "webSocketManager+downloadFile.h"
+#import "webSocketManager+downloadThumbnailImage.h"
+#import "webSocketManager+upLoadFile.h"
+#import "webSocketManager+backupsFile.h"
+
 @interface webSocketManager ()
 {
     NSMutableArray *commandSendCheckArr;//需要检测任务是否发出的的指令
@@ -120,198 +126,196 @@ static webSocketManager *webSocketManagerInstance = nil;
             NSError *error = nil;
             NSDictionary *dataDict = [NSJSONSerialization JSONObjectWithData:message options:NSJSONReadingMutableContainers error:&error];
             
-//            if(!dataDict){
-//                [weakSelf handleDownloadResponseFunBy:message];
-//                return;
-//            }
-//            
-//            if(![dataDict isKindOfClass:[NSDictionary class]]){
-//                //[__NSCFString allKeys] unrecognized selector sent to ins
-//                return;
-//            }
-//            
-//            NSString *messageType = dataDict[@"type"];
-//            
-//            if ([messageType isEqualToString:@"cutting"]) {
-//                //[[iToast makeText:@"复制成功"] show];
-//            }
-//            else if ([messageType isEqualToString:@"forwardMsgRep"]){/*转发的回复*/
-//                
-//                cloudPhoneCommonModel *model = [[cloudPhoneCommonModel alloc] initWithDictionary:dataDict error:nil];
-//                if(!model){
-//                    return;
-//                }
-//                
-//                if([model.data.msg isEqualToString:@"only one socket"]){
-//                    [weakSelf deleteCommandSendTaskFunWith:@"offline_notification"];
-//                }
-//            }
-//            else if ([messageType isEqualToString:@"forwardMsg"]){/*转发*/
-//                /*获取指令类型*/
-//                NSString *code = nil;
-//                if ([[dataDict allKeys] containsObject:@"data"]) {
-//                    NSDictionary *data = dataDict[@"data"];
-//                    
-//                     if([data isKindOfClass:[NSString class]]){
-//                        NSString * dataStr = (NSString*)data;
-//                        if([dataStr isEqualToString:@"offline_notification"]){
-//                            HLog(@"被别人挤下线了");
-//                            [weakSelf LogoutByOtherFun];
-//                        }
-//                         
-//                         return;
-//                    }
-//                    else if ([data isKindOfClass:[NSDictionary class]] && [[data allKeys] containsObject:@"code"]) {
-//                        code = [data objectForKey:@"code"];
-//                        
-//                        if (![code isKindOfClass:[NSString class]]) {
-//                            code = [NSString stringWithFormat:@"%ld",[code integerValue]];
-//                        }
-//                    }
-//                }
-//                
-//                /*获取用户名*/
-//                NSString *useName = nil;
-//                if ([[dataDict allKeys] containsObject:@"data"]) {
-//                    NSDictionary *data = dataDict[@"data"];
-//                    if ([[data allKeys] containsObject:@"userName"]) {
-//                        useName = [data objectForKey:@"userName"];
-//                    }
-//                }
-//                
-//                
-//                    if ([code isEqualToString:@"phoneSizeChange"]){/*分辨率改变*/
-//                    if ([[dataDict allKeys] containsObject:@"data"]) {
-//                        NSDictionary *data = dataDict[@"data"];
-//                        if ([[data allKeys] containsObject:@"width"]) {
-//                            ksharedAppDelegate.couldPhone_W_PHONE = [[data objectForKey:@"width"] integerValue];
-//                        }
-//                        if ([[data allKeys] containsObject:@"height"]) {
-//                            ksharedAppDelegate.couldPhone_H_PHONE = [[data objectForKey:@"height"] integerValue];
-//                        }
-//                        
-//                        if (ksharedAppDelegate.couldPhone_W_PHONE > ksharedAppDelegate.couldPhone_H_PHONE) {
-//                            CGFloat temp = ksharedAppDelegate.couldPhone_W_PHONE;
-//                            ksharedAppDelegate.couldPhone_W_PHONE = ksharedAppDelegate.couldPhone_H_PHONE;
-//                            ksharedAppDelegate.couldPhone_H_PHONE = temp;
-//                        }
-//                    }
-//                }
-//            }
-//            else if ([messageType isEqualToString:@"getPhoneSize"] || [messageType isEqualToString:@"setPhoneSize"]){
-//                NSString *sn = nil;
-//                if ([[dataDict allKeys] containsObject:@"data"]) {
-//                    NSDictionary *data = dataDict[@"data"];
-//                    
-//                    if ([[data allKeys] containsObject:@"status"]) {
-//                        NSInteger  status = [[data objectForKey:@"status"] integerValue];
-//                        
-//                        if (status == 0) {/*不是当前设备直接返回*/
-//                            if ([[data allKeys] containsObject:@"width"]) {
-//                                ksharedAppDelegate.couldPhone_W_PHONE = [[data objectForKey:@"width"] integerValue];
-//                            }
-//                            if ([[data allKeys] containsObject:@"height"]) {
-//                                ksharedAppDelegate.couldPhone_H_PHONE = [[data objectForKey:@"height"] integerValue];
-//                            }
-//                            
-//                            if (ksharedAppDelegate.couldPhone_W_PHONE > ksharedAppDelegate.couldPhone_H_PHONE) {
-//                                CGFloat temp = ksharedAppDelegate.couldPhone_W_PHONE;
-//                                ksharedAppDelegate.couldPhone_W_PHONE = ksharedAppDelegate.couldPhone_H_PHONE;
-//                                ksharedAppDelegate.couldPhone_H_PHONE = temp;
-//                            }
-//                        }
-//                    }
-//                }
-//                
-//
-//
-//            }
-//            else if ([messageType isEqualToString:@"sync_wifi"]){
-//                [weakSelf sync_wifiBackHandleFun];
-//            }
-//            else if ([messageType isEqualToString:@"reProduceText"]){
-//                if ([[dataDict allKeys] containsObject:@"data"]) {
-//                    NSDictionary *data = dataDict[@"data"];
-//
-//                    if ([[data allKeys] containsObject:@"text"]) {
-//                        NSString  *pasteboardStr = [data objectForKey:@"text"];
-//                        UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
-//                        pasteboard.string = pasteboardStr;
-//                    }
-//                }
-//            }
-//            else if ([messageType isEqualToString:@"downAdnInstallRep"]){
-//                if ([[dataDict allKeys] containsObject:@"data"]) {
-//                    NSDictionary *data = dataDict[@"data"];
-//
-//                    if ([[data allKeys] containsObject:@"status"]) {
-//                        NSString  *status = [data objectForKey:@"status"];
-//                        if ([status isEqualToString:@"1"]) {
-//                            mainBlock(^{
-//                               // [[iToast makeText:@"App下载完成"] show];
-//                            });
-//                        }else if ([status isEqualToString:@"0"]){
-//                            mainBlock(^{
-//                                //[[iToast makeText:@"App下载中"] show];
-//                            });
-//                        }
-//                    }
-//                }
-//            }
-//            else if ([messageType isEqualToString:@"shakeit"]){
-//                HLog(@"\n-----摇一摇成功------");
-//            }else if ([messageType isEqualToString:@"keyboardFeedbackBean"]){/*调起键盘*/
-//                [weakSelf keyboardFeedbackBeanFun];
-//            }else if ([messageType isEqualToString:@"FileRandomReady"]
-//                      ||[messageType isEqualToString:@"FilePartReady"]
-//                      ){/*申请文件上传得到答复*/
-//                [weakSelf applyUploadFileServiceResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"uploadFileRandomRet"]
-//                     ||[messageType isEqualToString:@"uploadFilePartRet"]
-//                     ){/*文件上传得到答复*/
-//                [weakSelf upLoadFileFunServiceResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"backUpFileRandomReady"]
-//                     ||[messageType isEqualToString:@"backUpPartReady"]
-//                     ){/*文件备份得到答复*/
-//                [weakSelf applyBackupsFileServiceResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"backUpFileRandomRet"]
-//                     ||[messageType isEqualToString:@"backUpFilePartRet"]){/*文件备份得到答复*/
-//                [weakSelf backupsFileFunServiceResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"getBaseInfo"]){/*获取云机的基本信息*/
-//                [weakSelf getCouldPhoneBaseInfoResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"getSysInfo"]){/*获取云机的系统信息*/
-//                [weakSelf getCouldPhoneSysInfoResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"TvStatus"]){/*获取TV投屏信息*/
-//                [weakSelf getCouldPhoneTvStatusResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"reboot"]){/*重启*/
-//                [weakSelf stopForceStartTimerFun];
-//            }
-//            else if ([messageType isEqualToString:@"mkdir"]){/*创建文件夹*/
-//                [weakSelf createFolderResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"getBackupPath"]){/*创建文件夹*/
-//                [weakSelf getFolderListResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"search"]){/*创建文件夹*/
-//                [weakSelf searchFileListResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"getExtraFiles"]){/*创建文件夹*/
-//                [weakSelf getExtraFilesResponseFun:dataDict];
-//            }
-//            else if ([messageType isEqualToString:@"extraMediaEvent"]){/*磁盘插拔*/
-//                [weakSelf getExtraMediaEventResponseFun:dataDict];
-//                [weakSelf getExtraFilesListFun];
-//            }
-//            else if ([messageType isEqualToString:@"reset"]){/**/
-//                [weakSelf deleteCommandSendTaskFunWith:@"reset"];
-//            }
+            if(!dataDict){
+                [weakSelf handleDownloadResponseFunBy:message];
+                return;
+            }
+            
+            if(![dataDict isKindOfClass:[NSDictionary class]]){
+                //[__NSCFString allKeys] unrecognized selector sent to ins
+                return;
+            }
+            
+            NSString *messageType = dataDict[@"type"];
+            
+            if ([messageType isEqualToString:@"cutting"]) {
+                //[[iToast makeText:@"复制成功"] show];
+            }
+            else if ([messageType isEqualToString:@"forwardMsgRep"]){/*转发的回复*/
+                
+                cloudPhoneCommonModel *model = [[cloudPhoneCommonModel alloc] initWithDictionary:dataDict error:nil];
+                if(!model){
+                    return;
+                }
+                
+                if([model.data.msg isEqualToString:@"only one socket"]){
+                    [weakSelf deleteCommandSendTaskFunWith:@"offline_notification"];
+                }
+            }
+            else if ([messageType isEqualToString:@"forwardMsg"]){/*转发*/
+                /*获取指令类型*/
+                NSString *code = nil;
+                if ([[dataDict allKeys] containsObject:@"data"]) {
+                    NSDictionary *data = dataDict[@"data"];
+                    
+                     if([data isKindOfClass:[NSString class]]){
+                        NSString * dataStr = (NSString*)data;
+                        if([dataStr isEqualToString:@"offline_notification"]){
+                            HLog(@"被别人挤下线了");
+                            //[weakSelf LogoutByOtherFun];
+                        }
+                         
+                         return;
+                    }
+                    else if ([data isKindOfClass:[NSDictionary class]] && [[data allKeys] containsObject:@"code"]) {
+                        code = [data objectForKey:@"code"];
+                        
+                        if (![code isKindOfClass:[NSString class]]) {
+                            code = [NSString stringWithFormat:@"%ld",[code integerValue]];
+                        }
+                    }
+                }
+                
+                /*获取用户名*/
+                NSString *useName = nil;
+                if ([[dataDict allKeys] containsObject:@"data"]) {
+                    NSDictionary *data = dataDict[@"data"];
+                    if ([[data allKeys] containsObject:@"userName"]) {
+                        useName = [data objectForKey:@"userName"];
+                    }
+                }
+                
+                
+                    if ([code isEqualToString:@"phoneSizeChange"]){/*分辨率改变*/
+                    if ([[dataDict allKeys] containsObject:@"data"]) {
+                        NSDictionary *data = dataDict[@"data"];
+                        if ([[data allKeys] containsObject:@"width"]) {
+                            ksharedAppDelegate.couldPhone_W_PHONE = [[data objectForKey:@"width"] integerValue];
+                        }
+                        if ([[data allKeys] containsObject:@"height"]) {
+                            ksharedAppDelegate.couldPhone_H_PHONE = [[data objectForKey:@"height"] integerValue];
+                        }
+                        
+                        if (ksharedAppDelegate.couldPhone_W_PHONE > ksharedAppDelegate.couldPhone_H_PHONE) {
+                            CGFloat temp = ksharedAppDelegate.couldPhone_W_PHONE;
+                            ksharedAppDelegate.couldPhone_W_PHONE = ksharedAppDelegate.couldPhone_H_PHONE;
+                            ksharedAppDelegate.couldPhone_H_PHONE = temp;
+                        }
+                    }
+                }
+            }
+            else if ([messageType isEqualToString:@"getPhoneSize"] || [messageType isEqualToString:@"setPhoneSize"]){
+                NSString *sn = nil;
+                if ([[dataDict allKeys] containsObject:@"data"]) {
+                    NSDictionary *data = dataDict[@"data"];
+                    
+                    if ([[data allKeys] containsObject:@"status"]) {
+                        NSInteger  status = [[data objectForKey:@"status"] integerValue];
+                        
+                        if (status == 0) {/*不是当前设备直接返回*/
+                            if ([[data allKeys] containsObject:@"width"]) {
+                                ksharedAppDelegate.couldPhone_W_PHONE = [[data objectForKey:@"width"] integerValue];
+                            }
+                            if ([[data allKeys] containsObject:@"height"]) {
+                                ksharedAppDelegate.couldPhone_H_PHONE = [[data objectForKey:@"height"] integerValue];
+                            }
+                            
+                            if (ksharedAppDelegate.couldPhone_W_PHONE > ksharedAppDelegate.couldPhone_H_PHONE) {
+                                CGFloat temp = ksharedAppDelegate.couldPhone_W_PHONE;
+                                ksharedAppDelegate.couldPhone_W_PHONE = ksharedAppDelegate.couldPhone_H_PHONE;
+                                ksharedAppDelegate.couldPhone_H_PHONE = temp;
+                            }
+                        }
+                    }
+                }
+            }
+            else if ([messageType isEqualToString:@"sync_wifi"]){
+                [weakSelf sync_wifiBackHandleFun];
+            }
+            else if ([messageType isEqualToString:@"reProduceText"]){
+                if ([[dataDict allKeys] containsObject:@"data"]) {
+                    NSDictionary *data = dataDict[@"data"];
+
+                    if ([[data allKeys] containsObject:@"text"]) {
+                        NSString  *pasteboardStr = [data objectForKey:@"text"];
+                        UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
+                        pasteboard.string = pasteboardStr;
+                    }
+                }
+            }
+            else if ([messageType isEqualToString:@"downAdnInstallRep"]){
+                if ([[dataDict allKeys] containsObject:@"data"]) {
+                    NSDictionary *data = dataDict[@"data"];
+
+                    if ([[data allKeys] containsObject:@"status"]) {
+                        NSString  *status = [data objectForKey:@"status"];
+                        if ([status isEqualToString:@"1"]) {
+                            mainBlock(^{
+                               // [[iToast makeText:@"App下载完成"] show];
+                            });
+                        }else if ([status isEqualToString:@"0"]){
+                            mainBlock(^{
+                                //[[iToast makeText:@"App下载中"] show];
+                            });
+                        }
+                    }
+                }
+            }
+            else if ([messageType isEqualToString:@"shakeit"]){
+                HLog(@"\n-----摇一摇成功------");
+            }else if ([messageType isEqualToString:@"keyboardFeedbackBean"]){/*调起键盘*/
+                HLog(@"\n-----待处理 调起键盘------");
+               // [weakSelf keyboardFeedbackBeanFun];
+            }else if ([messageType isEqualToString:@"FileRandomReady"]
+                      ||[messageType isEqualToString:@"FilePartReady"]
+                      ){/*申请文件上传得到答复*/
+                [weakSelf applyUploadFileServiceResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"uploadFileRandomRet"]
+                     ||[messageType isEqualToString:@"uploadFilePartRet"]
+                     ){/*文件上传得到答复*/
+                [weakSelf upLoadFileFunServiceResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"backUpFileRandomReady"]
+                     ||[messageType isEqualToString:@"backUpPartReady"]
+                     ){/*文件备份得到答复*/
+                [weakSelf applyBackupsFileServiceResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"backUpFileRandomRet"]
+                     ||[messageType isEqualToString:@"backUpFilePartRet"]){/*文件备份得到答复*/
+                [weakSelf backupsFileFunServiceResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"getBaseInfo"]){/*获取云机的基本信息*/
+                [weakSelf getCouldPhoneBaseInfoResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"getSysInfo"]){/*获取云机的系统信息*/
+                [weakSelf getCouldPhoneSysInfoResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"TvStatus"]){/*获取TV投屏信息*/
+                [weakSelf getCouldPhoneTvStatusResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"reboot"]){/*重启*/
+                [weakSelf stopForceStartTimerFun];
+            }
+            else if ([messageType isEqualToString:@"mkdir"]){/*创建文件夹*/
+                [weakSelf createFolderResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"getBackupPath"]){/*创建文件夹*/
+                [weakSelf getFolderListResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"search"]){/*创建文件夹*/
+                [weakSelf searchFileListResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"getExtraFiles"]){/*创建文件夹*/
+                [weakSelf getExtraFilesResponseFun:dataDict];
+            }
+            else if ([messageType isEqualToString:@"extraMediaEvent"]){/*磁盘插拔*/
+                [weakSelf getExtraMediaEventResponseFun:dataDict];
+                [weakSelf getExtraFilesListFun];
+            }
+            else if ([messageType isEqualToString:@"reset"]){/**/
+                [weakSelf deleteCommandSendTaskFunWith:@"reset"];
+            }
             
         } failure:^(NSError *error) {
             ksharedAppDelegate.isWebSockLinkOKAginType = NO;
@@ -349,7 +353,7 @@ static webSocketManager *webSocketManagerInstance = nil;
         [self WebSocketNeedRelinkFun];
     }
     
-    if(self.webSocketTaskTime > 5)
+    if(self.webSocketTaskTime > 10)
     {
         self.webSocketTaskTime = 0;
         [self checkAllTaskFun];
@@ -580,4 +584,270 @@ static webSocketManager *webSocketManagerInstance = nil;
     NSString *ExtraCommondStr  = [RCCommandHelp getExtraFilesList];
     [self send_data:ExtraCommondStr];
 }
+
+-(void)addCommandSendTaskFunWithType:(NSString*)type WithCommandStr:(NSString*)commandStr
+{
+    if(!commandSendCheckArr){
+        commandSendCheckArr = [NSMutableArray new];
+    }
+    
+    BOOL didAddType = NO;
+        
+    for (commandSendCheckModel *model in commandSendCheckArr) {
+        if([model.type isEqualToString:type]){
+            didAddType = YES;
+            model.reSendNum = 0;
+            model.sendTimerStamp = [iTools getNowTimeStamp];
+            break;
+        }
+    }
+        
+    if(!didAddType){
+        commandSendCheckModel *model = [commandSendCheckModel new];
+        model.commandStr = commandStr;
+        model.type = type;
+        model.reSendNum = 0;
+        model.sendTimerStamp = [iTools getNowTimeStamp];
+        [commandSendCheckArr addObject:model];
+    }
+    
+}
+
+
+-(void)deleteCommandSendTaskFunWith:(NSString*)type
+{
+    if(commandSendCheckArr && commandSendCheckArr.count >0){
+        
+        NSArray *taskArr = [NSArray arrayWithArray:commandSendCheckArr];
+        
+        for (commandSendCheckModel *model in taskArr) {
+            if([type isEqualToString:model.type]){
+                [commandSendCheckArr removeObject:model];
+            }
+        }
+    }
+}
+
+#pragma mark wifi handle
+- (void)sync_wifiBackHandleFun
+{
+    [self.commandChannelManager rc_sendData:[RCCommandHelp noSyncWifiBack]];
+    [[iToast makeText:NSLocalizedString(@"player_Tip_ios_no_wifi_Sync",nil)] show];
+}
+
+- (void)getCouldPhoneBaseInfoResponseFun:(NSDictionary *)dataDict
+{
+    couldPhoneBaseInfoModel *model = [[couldPhoneBaseInfoModel alloc] initWithDictionary:dataDict error:nil];
+    [[NSNotificationCenter defaultCenter] postNotificationName:getCouldPhoneBaseInfoNotification object:model];
+}
+
+- (void)getCouldPhoneSysInfoResponseFun:(NSDictionary *)dataDict{
+    couldphoneSysInfoModel *model = [[couldphoneSysInfoModel alloc] initWithDictionary:dataDict error:nil];
+    [[NSNotificationCenter defaultCenter] postNotificationName:getCouldPhoneSysInfoNotification object:model];
+        
+    NSString *hostImgVer = model.data.data.hostImgVer;
+    NSString *MyNewVersion = model.data.data.MyNewVersion;
+
+    //test code
+//    hostImgVer = @"1.2.3";
+//    MyNewVersion = @"1.2.0";
+    
+    //判断当前版本号 待更新版本
+    if (!hostImgVer || hostImgVer.length < 3
+        ||!MyNewVersion || MyNewVersion.length < 3) {
+        //[self showImageViewRenewTipViewFun];
+        return;
+    }
+    
+    NSArray *versionArr = [hostImgVer componentsSeparatedByString:@"."];
+    NSArray *MyNewVersionArr = [MyNewVersion componentsSeparatedByString:@"."];
+    
+    NSInteger versionArrCount = versionArr.count;
+    NSInteger MyNewVersionArrCount = MyNewVersionArr.count;
+    NSInteger maxCount =  versionArrCount < MyNewVersionArrCount ? versionArrCount:MyNewVersionArrCount;
+    
+    BOOL isNeedShowType = NO;
+    //判断是否要更新镜像框
+    if(maxCount > 0){
+        for (int i=0; i<maxCount; i++) {
+            NSString * numberStr1 = versionArr[i];
+            NSString * numberStr2 = MyNewVersionArr[i];
+            
+            if(numberStr2.intValue > numberStr1.intValue){
+                isNeedShowType =YES;
+                break;
+            }
+        }
+    }
+    
+    
+    if(isNeedShowType){
+        HLog(@"hxd 镜像弹框 待处理")
+        //[self showImageViewRenewTipViewFun];
+    }
+    
+    //是否禁用文件传输 (1.3以及以上的镜像可以使用文件传输)
+    if(versionArr.count >= 3)
+    {
+        NSString * oneStr = versionArr[0];
+        NSString * twoStr = versionArr[1];
+        NSString * threeStr = versionArr[2];
+
+        if(oneStr.integerValue <=1 && twoStr.integerValue <=3 && threeStr.integerValue <=0){//禁用
+            ksharedAppDelegate.DisabledFileTransferType = YES;
+            
+            if(MyNewVersionArr.count >= 3)
+            {
+                NSString * newOneStr = MyNewVersionArr[0];
+                NSString * newTwoStr = MyNewVersionArr[1];
+                NSString * newThreeStr = MyNewVersionArr[2];
+                
+                if(newOneStr.integerValue >=1 && newTwoStr.integerValue >=3 && newThreeStr.integerValue >= 1){
+                    ksharedAppDelegate.isImageNewFor130 = YES;
+                }
+                else{
+                    ksharedAppDelegate.isImageNewFor130 = NO;
+                }
+            }
+        }
+        else{
+            ksharedAppDelegate.DisabledFileTransferType = NO;
+        }
+    }
+    
+}
+
+- (void)getCouldPhoneTvStatusResponseFun:(NSDictionary *)dataDict
+{
+    TvStatusModel *model = [[TvStatusModel alloc] initWithDictionary:dataDict error:nil];
+    [[NSNotificationCenter defaultCenter] postNotificationName:getCouldPhoneTvStatusNotification object:model];
+    
+    if(![model.msg containsString:@"PushStreamBActivity"])
+    {
+        return;
+    }
+    
+    HLog(@"hxd  待处理")
+//    UIViewController*topVc = self.navigationController.viewControllers.lastObject;
+//    if([topVc isKindOfClass:[PlayerViewController class]]){
+//        [[iToast makeText:NSLocalizedString(@"tv_p2p_ing",nil)] show];
+//    }
+}
+
+- (void)stopForceStartTimerFun
+{
+    HLog(@"hxd  待处理")
+//    if(forceStartTimer){
+//        [forceStartTimer invalidate];
+//        forceStartTimer = nil;
+//    }
+}
+
+- (void)createFolderResponseFun:(NSDictionary *)dataDict
+{
+    couldPhoneCommonModel *model = [[couldPhoneCommonModel alloc] initWithDictionary:dataDict error:nil];
+    
+    if(model){
+        NSNumber *curNum = [NSNumber numberWithInteger:model.status];
+        [[NSNotificationCenter defaultCenter] postNotificationName:createFolderDoneNotification object:curNum];/*发送通知*/
+    }
+}
+
+- (void)getFolderListResponseFun:(NSDictionary *)dataDict
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:getFolderListDoneNotification object:dataDict];/*发送通知*/
+}
+
+- (void)searchFileListResponseFun:(NSDictionary *)dataDict
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:searchFileListDoneNotification object:dataDict];/*发送通知*/
+}
+
+- (void)getExtraFilesResponseFun:(NSDictionary *)dataDict
+{
+    cloudPhoneExtraFileListModel *model = [[cloudPhoneExtraFileListModel alloc] initWithDictionary:dataDict error:nil];
+    ksharedAppDelegate.cloudPhoneExtraFileListMod = model;
+}
+
+- (void)getExtraMediaEventResponseFun:(NSDictionary *)dataDict
+{
+    extraMediaEventModel *model = [[extraMediaEventModel alloc] initWithDictionary:dataDict error:nil];
+    
+    NSString *tip = nil;
+    if(model.data.event == 0){
+        tip = NSLocalizedString(@"disk_insertion_tip",nil);
+        [self showInsertPopViewFun:model.data.name];
+    }
+    else if(model.data.event == 1){
+        tip = NSLocalizedString(@"disk_extract_tip",nil);
+    }
+    else if(model.data.event == 2){
+        tip = NSLocalizedString(@"disk_save_extract_tip",nil);
+    }
+    
+    NSString *totalTips = [[NSString alloc] initWithFormat:@"%@%@",model.data.name,tip];
+    
+    mainBlock(^{
+        [[iToast makeText:totalTips] show];
+    });
+}
+
+#pragma mark 显示插入UI弹框
+- (void)showInsertPopViewFun:(NSString*)name
+{
+    HLog(@"hxd  待处理")
+//    if(self->curUSBInsertPopV){
+//        [self->curUSBInsertPopV removeFromSuperview];
+//        self->curUSBInsertPopV = nil;
+//    }
+//    
+//    self->curUSBInsertPopV = [[USBInsertPopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H) withName:name];
+//    
+//    UIViewController*lastVC =  self.navigationController.viewControllers.lastObject;
+//    //[[iTools getKeyWindow] addSubview:self->curUSBInsertPopV];
+//    [lastVC.view addSubview:self->curUSBInsertPopV];
+}
+
+- (void)createBackupsFolderBy:(NSString*)backupsDefaultPath
+{
+    NSString *folderName = backupsDefaultPath;
+    
+    if(folderName && folderName.length >0){
+        NSString * commandStr = [RCCommandHelp applyForCreateFolderwithFolderName:folderName];
+        [self.commandChannelManager rc_sendData:commandStr];
+    }
+}
+
+- (void)getBackupFolderListFun
+{
+    NSString * commandStr = [RCCommandHelp getCreateFolderList];
+    [self.commandChannelManager rc_sendData:commandStr];
+}
+
+- (void)searchFileListBeginFun:(NSMutableDictionary *)dict
+{
+    NSMutableDictionary *objectDict = dict;
+    NSNumber *curNum = @1;
+    
+    if ([[objectDict allKeys] containsObject:@"type"]) {
+        curNum = [objectDict objectForKey:@"type"];
+    }
+    
+    NSString *pathStr = @"";
+    
+    if ([[objectDict allKeys] containsObject:@"path"]) {
+        pathStr = [objectDict objectForKey:@"path"];
+    }
+    
+    NSString *fileType = @"video";
+    
+    if(curNum.boolValue)
+    {
+        fileType = @"jpg";
+    }
+    
+    NSString * commandStr = [RCCommandHelp searchCouldPhoneFilewithType:fileType withPath:pathStr];
+    [self.commandChannelManager rc_sendData:commandStr];
+}
+
 @end