Explorar el Código

1.去掉不同的第三方库

huangxiaodong hace 1 año
padre
commit
b916fc2db2
Se han modificado 17 ficheros con 1 adiciones y 1875 borrados
  1. 0 106
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 1 1
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.h
  3. 0 80
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/HWDownloadManager.h
  4. 0 17
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/NSString+SGHashString.h
  5. 0 43
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/NSString+SGHashString.m
  6. 0 22
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/NSURLSession+SGDownloadTask.h
  7. 0 42
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/NSURLSession+SGDownloadTask.m
  8. 0 59
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGCacheManager.h
  9. 0 206
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGCacheManager.m
  10. 0 90
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadManager.h
  11. 0 177
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadManager.m
  12. 0 100
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadOperation.h
  13. 0 268
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadOperation.m
  14. 0 55
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadQueue.h
  15. 0 407
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadQueue.m
  16. 0 37
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadSession.h
  17. 0 165
      创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadSession.m

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

@@ -637,36 +637,6 @@
 		6BA08F092C0187DD00A2242D /* boxDownloadFileRecordCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F072C0187DC00A2242D /* boxDownloadFileRecordCell.m */; };
 		6BA08F0A2C0187DD00A2242D /* boxDownloadFileRecordCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F062C0187DC00A2242D /* boxDownloadFileRecordCell.h */; };
 		6BA08F0B2C0187DD00A2242D /* boxDownloadFileRecordCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F072C0187DC00A2242D /* boxDownloadFileRecordCell.m */; };
-		6BA08F1D2C01D01100A2242D /* HWDownloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F0C2C01D01000A2242D /* HWDownloadManager.h */; };
-		6BA08F1E2C01D01100A2242D /* HWDownloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F0C2C01D01000A2242D /* HWDownloadManager.h */; };
-		6BA08F1F2C01D01100A2242D /* NSString+SGHashString.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F0D2C01D01000A2242D /* NSString+SGHashString.h */; };
-		6BA08F202C01D01100A2242D /* NSString+SGHashString.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F0D2C01D01000A2242D /* NSString+SGHashString.h */; };
-		6BA08F212C01D01100A2242D /* NSString+SGHashString.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F0E2C01D01000A2242D /* NSString+SGHashString.m */; };
-		6BA08F222C01D01100A2242D /* NSString+SGHashString.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F0E2C01D01000A2242D /* NSString+SGHashString.m */; };
-		6BA08F232C01D01100A2242D /* NSURLSession+SGDownloadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F0F2C01D01000A2242D /* NSURLSession+SGDownloadTask.h */; };
-		6BA08F242C01D01100A2242D /* NSURLSession+SGDownloadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F0F2C01D01000A2242D /* NSURLSession+SGDownloadTask.h */; };
-		6BA08F252C01D01100A2242D /* NSURLSession+SGDownloadTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F102C01D01000A2242D /* NSURLSession+SGDownloadTask.m */; };
-		6BA08F262C01D01100A2242D /* NSURLSession+SGDownloadTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F102C01D01000A2242D /* NSURLSession+SGDownloadTask.m */; };
-		6BA08F272C01D01100A2242D /* SGCacheManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F112C01D01000A2242D /* SGCacheManager.h */; };
-		6BA08F282C01D01100A2242D /* SGCacheManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F112C01D01000A2242D /* SGCacheManager.h */; };
-		6BA08F292C01D01100A2242D /* SGCacheManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F122C01D01000A2242D /* SGCacheManager.m */; };
-		6BA08F2A2C01D01100A2242D /* SGCacheManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F122C01D01000A2242D /* SGCacheManager.m */; };
-		6BA08F2B2C01D01100A2242D /* SGDownloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F132C01D01000A2242D /* SGDownloadManager.h */; };
-		6BA08F2C2C01D01100A2242D /* SGDownloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F132C01D01000A2242D /* SGDownloadManager.h */; };
-		6BA08F2D2C01D01100A2242D /* SGDownloadManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F142C01D01000A2242D /* SGDownloadManager.m */; };
-		6BA08F2E2C01D01100A2242D /* SGDownloadManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F142C01D01000A2242D /* SGDownloadManager.m */; };
-		6BA08F2F2C01D01100A2242D /* SGDownloadOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F152C01D01000A2242D /* SGDownloadOperation.h */; };
-		6BA08F302C01D01100A2242D /* SGDownloadOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F152C01D01000A2242D /* SGDownloadOperation.h */; };
-		6BA08F312C01D01100A2242D /* SGDownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F162C01D01000A2242D /* SGDownloadOperation.m */; };
-		6BA08F322C01D01100A2242D /* SGDownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F162C01D01000A2242D /* SGDownloadOperation.m */; };
-		6BA08F332C01D01100A2242D /* SGDownloadQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F172C01D01000A2242D /* SGDownloadQueue.h */; };
-		6BA08F342C01D01100A2242D /* SGDownloadQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F172C01D01000A2242D /* SGDownloadQueue.h */; };
-		6BA08F352C01D01100A2242D /* SGDownloadQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F182C01D01000A2242D /* SGDownloadQueue.m */; };
-		6BA08F362C01D01100A2242D /* SGDownloadQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F182C01D01000A2242D /* SGDownloadQueue.m */; };
-		6BA08F372C01D01100A2242D /* SGDownloadSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F192C01D01000A2242D /* SGDownloadSession.h */; };
-		6BA08F382C01D01100A2242D /* SGDownloadSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F192C01D01000A2242D /* SGDownloadSession.h */; };
-		6BA08F392C01D01100A2242D /* SGDownloadSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F1A2C01D01000A2242D /* SGDownloadSession.m */; };
-		6BA08F3A2C01D01100A2242D /* SGDownloadSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F1A2C01D01000A2242D /* SGDownloadSession.m */; };
 		6BA08F472C01D05B00A2242D /* CWFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F3B2C01D05B00A2242D /* CWFileManager.h */; };
 		6BA08F482C01D05B00A2242D /* CWFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA08F3B2C01D05B00A2242D /* CWFileManager.h */; };
 		6BA08F492C01D05B00A2242D /* CWFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F3C2C01D05B00A2242D /* CWFileManager.m */; };
@@ -1703,21 +1673,6 @@
 		6B97143E2BCD00C900CE0096 /* ComontAlretType2ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ComontAlretType2ViewController.m; sourceTree = "<group>"; };
 		6BA08F062C0187DC00A2242D /* boxDownloadFileRecordCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = boxDownloadFileRecordCell.h; sourceTree = "<group>"; };
 		6BA08F072C0187DC00A2242D /* boxDownloadFileRecordCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = boxDownloadFileRecordCell.m; sourceTree = "<group>"; };
-		6BA08F0C2C01D01000A2242D /* HWDownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWDownloadManager.h; sourceTree = "<group>"; };
-		6BA08F0D2C01D01000A2242D /* NSString+SGHashString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SGHashString.h"; sourceTree = "<group>"; };
-		6BA08F0E2C01D01000A2242D /* NSString+SGHashString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SGHashString.m"; sourceTree = "<group>"; };
-		6BA08F0F2C01D01000A2242D /* NSURLSession+SGDownloadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURLSession+SGDownloadTask.h"; sourceTree = "<group>"; };
-		6BA08F102C01D01000A2242D /* NSURLSession+SGDownloadTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURLSession+SGDownloadTask.m"; sourceTree = "<group>"; };
-		6BA08F112C01D01000A2242D /* SGCacheManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SGCacheManager.h; sourceTree = "<group>"; };
-		6BA08F122C01D01000A2242D /* SGCacheManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGCacheManager.m; sourceTree = "<group>"; };
-		6BA08F132C01D01000A2242D /* SGDownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SGDownloadManager.h; sourceTree = "<group>"; };
-		6BA08F142C01D01000A2242D /* SGDownloadManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGDownloadManager.m; sourceTree = "<group>"; };
-		6BA08F152C01D01000A2242D /* SGDownloadOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SGDownloadOperation.h; sourceTree = "<group>"; };
-		6BA08F162C01D01000A2242D /* SGDownloadOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGDownloadOperation.m; sourceTree = "<group>"; };
-		6BA08F172C01D01000A2242D /* SGDownloadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SGDownloadQueue.h; sourceTree = "<group>"; };
-		6BA08F182C01D01000A2242D /* SGDownloadQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGDownloadQueue.m; sourceTree = "<group>"; };
-		6BA08F192C01D01000A2242D /* SGDownloadSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SGDownloadSession.h; sourceTree = "<group>"; };
-		6BA08F1A2C01D01000A2242D /* SGDownloadSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGDownloadSession.m; sourceTree = "<group>"; };
 		6BA08F3B2C01D05B00A2242D /* CWFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CWFileManager.h; sourceTree = "<group>"; };
 		6BA08F3C2C01D05B00A2242D /* CWFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CWFileManager.m; sourceTree = "<group>"; };
 		6BA08F3D2C01D05B00A2242D /* CWFileStreamSeparation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CWFileStreamSeparation.h; sourceTree = "<group>"; };
@@ -2856,36 +2811,6 @@
 			path = model;
 			sourceTree = "<group>";
 		};
-		6BA08F1B2C01D01000A2242D /* SGDwonload */ = {
-			isa = PBXGroup;
-			children = (
-				6BA08F0C2C01D01000A2242D /* HWDownloadManager.h */,
-				6BA08F0D2C01D01000A2242D /* NSString+SGHashString.h */,
-				6BA08F0E2C01D01000A2242D /* NSString+SGHashString.m */,
-				6BA08F0F2C01D01000A2242D /* NSURLSession+SGDownloadTask.h */,
-				6BA08F102C01D01000A2242D /* NSURLSession+SGDownloadTask.m */,
-				6BA08F112C01D01000A2242D /* SGCacheManager.h */,
-				6BA08F122C01D01000A2242D /* SGCacheManager.m */,
-				6BA08F132C01D01000A2242D /* SGDownloadManager.h */,
-				6BA08F142C01D01000A2242D /* SGDownloadManager.m */,
-				6BA08F152C01D01000A2242D /* SGDownloadOperation.h */,
-				6BA08F162C01D01000A2242D /* SGDownloadOperation.m */,
-				6BA08F172C01D01000A2242D /* SGDownloadQueue.h */,
-				6BA08F182C01D01000A2242D /* SGDownloadQueue.m */,
-				6BA08F192C01D01000A2242D /* SGDownloadSession.h */,
-				6BA08F1A2C01D01000A2242D /* SGDownloadSession.m */,
-			);
-			path = SGDwonload;
-			sourceTree = "<group>";
-		};
-		6BA08F1C2C01D01000A2242D /* DownLoadManager */ = {
-			isa = PBXGroup;
-			children = (
-				6BA08F1B2C01D01000A2242D /* SGDwonload */,
-			);
-			path = DownLoadManager;
-			sourceTree = "<group>";
-		};
 		6BA08F452C01D05B00A2242D /* CWUploadManage */ = {
 			isa = PBXGroup;
 			children = (
@@ -3027,7 +2952,6 @@
 				6B2C1E1B2C070ADE00FDCF82 /* ZFPlayer */,
 				6B4C0F5D2C0314BA0070EF2E /* DFPlayer */,
 				6BA08F462C01D05B00A2242D /* UploadManager */,
-				6BA08F1C2C01D01000A2242D /* DownLoadManager */,
 				6B304E9C2BEF6879004F5580 /* TencentOpenAPI.framework */,
 				6BBB35DF2AE935C000E4A59B /* DDYLanguageTool */,
 				6BBB35D42AE7645200E4A59B /* BackgroundKeepAlive */,
@@ -3368,7 +3292,6 @@
 				6BFF26992AFA16DA00FCB4F7 /* forgetSecretKeyViewController.h in Headers */,
 				6B45C4FD2B57BC87007E6911 /* cloudPhoneExtraFileListModel.h in Headers */,
 				6B2C1E642C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS15.h in Headers */,
-				6BA08F1D2C01D01100A2242D /* HWDownloadManager.h in Headers */,
 				6BFF26912AF9D88200FCB4F7 /* AuthCodeTextField.h in Headers */,
 				6B5D403B2B4BFEB9000965CF /* PlayerViewController+downloadThumbnailImage.h in Headers */,
 				184C8ADA2A949DAC00F26650 /* HaveNewVersionView.h in Headers */,
@@ -3385,7 +3308,6 @@
 				6B467BB32BC7E4360039A6A6 /* addLogObject.h in Headers */,
 				183AE6D12A8CA98C00B11CB0 /* CloudPhoneAPI.h in Headers */,
 				6B07AC252BF85859005C2B0E /* ShareRecordModel.h in Headers */,
-				6BA08F372C01D01100A2242D /* SGDownloadSession.h in Headers */,
 				6B4C0F7E2C0314BA0070EF2E /* DFPlayerUIManager.h in Headers */,
 				6B5BE5932BFCA5FA00A1B9B3 /* videoPlayViewController.h in Headers */,
 				1868201D2AB97BE1005702A6 /* TipsQRCodeViewController.h in Headers */,
@@ -3429,7 +3351,6 @@
 				6B2C1E982C070ADE00FDCF82 /* ZFPlayerNotification.h in Headers */,
 				6B7EA7A42BF607FB002D5CC2 /* imageDetailsScrollViewController.h in Headers */,
 				6BFF26952AF9D8CC00FCB4F7 /* AuthCodeInputView.h in Headers */,
-				6BA08F232C01D01100A2242D /* NSURLSession+SGDownloadTask.h in Headers */,
 				6B1CC2C62B677F3E00AD4217 /* extraMediaEventModel.h in Headers */,
 				6B5B607A2B3E71B6009A2AE2 /* filePathCreatTableViewCell.h in Headers */,
 				18FCE5442AD136FF0020F623 /* ShortcutManager.h in Headers */,
@@ -3455,7 +3376,6 @@
 				6BA08F572C01D05B00A2242D /* CWUploadTask+CheckInfo.h in Headers */,
 				6BF52C972AD5546500A617DB /* SimplePing.h in Headers */,
 				6B3F96342AD2A15A008E349E /* netWorkManager.h in Headers */,
-				6BA08F332C01D01100A2242D /* SGDownloadQueue.h in Headers */,
 				6B2C1E302C070ADE00FDCF82 /* ZFNetworkSpeedMonitor.h in Headers */,
 				6B7EA7B02BF73DEB002D5CC2 /* addShareModel.h in Headers */,
 				6B2C1EAC2C070ADF00FDCF82 /* ZFIJKPlayerManager.h in Headers */,
@@ -3505,10 +3425,8 @@
 				6B0582852B0457C400D37290 /* uploadFileManager.h in Headers */,
 				6B2C1E2C2C070ADE00FDCF82 /* ZFLoadingView.h in Headers */,
 				6B2C1EA42C070ADE00FDCF82 /* ZFPresentTransition.h in Headers */,
-				6BA08F1F2C01D01100A2242D /* NSString+SGHashString.h in Headers */,
 				6B2C1E242C070ADE00FDCF82 /* UIView+ZFFrame.h in Headers */,
 				6B9354A12BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h in Headers */,
-				6BA08F272C01D01100A2242D /* SGCacheManager.h in Headers */,
 				6B2C1E942C070ADE00FDCF82 /* ZFPlayerMediaControl.h in Headers */,
 				6B467BB92BC7F7D70039A6A6 /* fileUploadToFileCenterModel.h in Headers */,
 				6B2C1EA82C070ADE00FDCF82 /* ZFReachabilityManager.h in Headers */,
@@ -3545,7 +3463,6 @@
 				6B2C1E742C070ADE00FDCF82 /* ZFLandscapeViewController.h in Headers */,
 				6B72725B2B0E22D000C03F87 /* uploadFileRecordBgScorllView.h in Headers */,
 				6B1F7FD62C00772500954720 /* boxDownloadFileManager.h in Headers */,
-				6BA08F2B2C01D01100A2242D /* SGDownloadManager.h in Headers */,
 				18A909982ABC4A3300E6D2BE /* ComontAlretViewController.h in Headers */,
 				6B7272532B0CABC600C03F87 /* cachesFileManager.h in Headers */,
 				6B1FBD3E2B46875300926382 /* backupsFileRecordCell.h in Headers */,
@@ -3569,7 +3486,6 @@
 				6B2C1E802C070ADE00FDCF82 /* ZFPersentInteractiveTransition.h in Headers */,
 				6B2C1E9C2C070ADE00FDCF82 /* ZFPlayerView.h in Headers */,
 				6B5BE5872BFC8B0B00A1B9B3 /* previewFileAndFolderSecondViewController.h in Headers */,
-				6BA08F2F2C01D01100A2242D /* SGDownloadOperation.h in Headers */,
 				6B2C1E202C070ADE00FDCF82 /* UIImageView+ZFCache.h in Headers */,
 				18F9CAFF2ABD3643003FF71A /* ModifyPWDSecondViewController.h in Headers */,
 				6BF52CA12AD7C2F600A617DB /* inputPWDViewController.h in Headers */,
@@ -3597,7 +3513,6 @@
 				6BD5069F2B9576A4006E7CB0 /* forgetSecretKeyViewController.h in Headers */,
 				6BD506A02B9576A4006E7CB0 /* cloudPhoneExtraFileListModel.h in Headers */,
 				6B2C1E652C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS15.h in Headers */,
-				6BA08F1E2C01D01100A2242D /* HWDownloadManager.h in Headers */,
 				6BD506A12B9576A4006E7CB0 /* AuthCodeTextField.h in Headers */,
 				6BD506A22B9576A4006E7CB0 /* PlayerViewController+downloadThumbnailImage.h in Headers */,
 				6BD506A32B9576A4006E7CB0 /* HaveNewVersionView.h in Headers */,
@@ -3614,7 +3529,6 @@
 				6B467BB52BC7E4360039A6A6 /* addLogObject.h in Headers */,
 				6BD506A92B9576A4006E7CB0 /* CloudPhoneAPI.h in Headers */,
 				6B07AC282BF85859005C2B0E /* ShareRecordModel.h in Headers */,
-				6BA08F382C01D01100A2242D /* SGDownloadSession.h in Headers */,
 				6B4C0F7F2C0314BA0070EF2E /* DFPlayerUIManager.h in Headers */,
 				6B5BE5952BFCA5FA00A1B9B3 /* videoPlayViewController.h in Headers */,
 				6BD506AA2B9576A4006E7CB0 /* TipsQRCodeViewController.h in Headers */,
@@ -3658,7 +3572,6 @@
 				6B2C1E992C070ADE00FDCF82 /* ZFPlayerNotification.h in Headers */,
 				6B7EA7A62BF607FB002D5CC2 /* imageDetailsScrollViewController.h in Headers */,
 				6BD506C22B9576A4006E7CB0 /* AuthCodeInputView.h in Headers */,
-				6BA08F242C01D01100A2242D /* NSURLSession+SGDownloadTask.h in Headers */,
 				6BD506C32B9576A4006E7CB0 /* extraMediaEventModel.h in Headers */,
 				6BD506C42B9576A4006E7CB0 /* filePathCreatTableViewCell.h in Headers */,
 				6BD506C52B9576A4006E7CB0 /* ShortcutManager.h in Headers */,
@@ -3684,7 +3597,6 @@
 				6BA08F582C01D05B00A2242D /* CWUploadTask+CheckInfo.h in Headers */,
 				6BD506D22B9576A4006E7CB0 /* SimplePing.h in Headers */,
 				6BD506D32B9576A4006E7CB0 /* netWorkManager.h in Headers */,
-				6BA08F342C01D01100A2242D /* SGDownloadQueue.h in Headers */,
 				6B2C1E312C070ADE00FDCF82 /* ZFNetworkSpeedMonitor.h in Headers */,
 				6B7EA7B22BF73DEB002D5CC2 /* addShareModel.h in Headers */,
 				6B2C1EAD2C070ADF00FDCF82 /* ZFIJKPlayerManager.h in Headers */,
@@ -3734,10 +3646,8 @@
 				6BD506EC2B9576A4006E7CB0 /* uploadFileManager.h in Headers */,
 				6B2C1E2D2C070ADE00FDCF82 /* ZFLoadingView.h in Headers */,
 				6B2C1EA52C070ADE00FDCF82 /* ZFPresentTransition.h in Headers */,
-				6BA08F202C01D01100A2242D /* NSString+SGHashString.h in Headers */,
 				6B2C1E252C070ADE00FDCF82 /* UIView+ZFFrame.h in Headers */,
 				6B9354A22BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h in Headers */,
-				6BA08F282C01D01100A2242D /* SGCacheManager.h in Headers */,
 				6B2C1E952C070ADE00FDCF82 /* ZFPlayerMediaControl.h in Headers */,
 				6B467BBB2BC7F7D70039A6A6 /* fileUploadToFileCenterModel.h in Headers */,
 				6B2C1EA92C070ADE00FDCF82 /* ZFReachabilityManager.h in Headers */,
@@ -3774,7 +3684,6 @@
 				6B2C1E752C070ADE00FDCF82 /* ZFLandscapeViewController.h in Headers */,
 				6BD506FD2B9576A4006E7CB0 /* uploadFileRecordBgScorllView.h in Headers */,
 				6B1F7FD82C00772500954720 /* boxDownloadFileManager.h in Headers */,
-				6BA08F2C2C01D01100A2242D /* SGDownloadManager.h in Headers */,
 				6BD506FE2B9576A4006E7CB0 /* ComontAlretViewController.h in Headers */,
 				6BD506FF2B9576A4006E7CB0 /* cachesFileManager.h in Headers */,
 				6BD507002B9576A4006E7CB0 /* backupsFileRecordCell.h in Headers */,
@@ -3798,7 +3707,6 @@
 				6B2C1E812C070ADE00FDCF82 /* ZFPersentInteractiveTransition.h in Headers */,
 				6B2C1E9D2C070ADE00FDCF82 /* ZFPlayerView.h in Headers */,
 				6B5BE5892BFC8B0B00A1B9B3 /* previewFileAndFolderSecondViewController.h in Headers */,
-				6BA08F302C01D01100A2242D /* SGDownloadOperation.h in Headers */,
 				6B2C1E212C070ADE00FDCF82 /* UIImageView+ZFCache.h in Headers */,
 				6BD507082B9576A4006E7CB0 /* ModifyPWDSecondViewController.h in Headers */,
 				6BD507092B9576A4006E7CB0 /* inputPWDViewController.h in Headers */,
@@ -4254,7 +4162,6 @@
 				6BD507382B9576A4006E7CB0 /* PlayerViewController+otherDelegate.mm in Sources */,
 				6B2C1E632C070ADE00FDCF82 /* ZFKVOController.m in Sources */,
 				6BD507392B9576A4006E7CB0 /* downloadManager.m in Sources */,
-				6BA08F2E2C01D01100A2242D /* SGDownloadManager.m in Sources */,
 				6BD5073A2B9576A4006E7CB0 /* FMDatabaseQueue.m in Sources */,
 				6B2C1E412C070ADE00FDCF82 /* ZFPortraitControlView.m in Sources */,
 				6BD5073B2B9576A4006E7CB0 /* customLaunchView.m in Sources */,
@@ -4314,7 +4221,6 @@
 				6B2C1E9B2C070ADE00FDCF82 /* ZFPlayerNotification.m in Sources */,
 				6BD507612B9576A4006E7CB0 /* FMDatabasePool.m in Sources */,
 				6BD507622B9576A4006E7CB0 /* iToast.m in Sources */,
-				6BA08F222C01D01100A2242D /* NSString+SGHashString.m in Sources */,
 				6B2C1E272C070ADE00FDCF82 /* UIView+ZFFrame.m in Sources */,
 				6BD507632B9576A4006E7CB0 /* HWPageListCell.m in Sources */,
 				6BD507642B9576A4006E7CB0 /* downloadFileRecordTableView.m in Sources */,
@@ -4329,7 +4235,6 @@
 				6BD5076B2B9576A4006E7CB0 /* JSONModel.m in Sources */,
 				6BD5076C2B9576A4006E7CB0 /* PlayerViewController+AppDelegate.m in Sources */,
 				6BD5076D2B9576A4006E7CB0 /* WHPingTester.m in Sources */,
-				6BA08F3A2C01D01100A2242D /* SGDownloadSession.m in Sources */,
 				6B467BB42BC7E4360039A6A6 /* addLogObject.m in Sources */,
 				6BD5076E2B9576A4006E7CB0 /* forgetPwdViewController.m in Sources */,
 				6BD5076F2B9576A4006E7CB0 /* uploadFileRecordTableViewHeadView.m in Sources */,
@@ -4342,10 +4247,8 @@
 				6B4C0F6D2C0314BA0070EF2E /* DFPlayerRequestManager.m in Sources */,
 				6BD507742B9576A4006E7CB0 /* extraMediaEventModel.m in Sources */,
 				6BD507752B9576A4006E7CB0 /* couldPhoneFolderListModel.m in Sources */,
-				6BA08F362C01D01100A2242D /* SGDownloadQueue.m in Sources */,
 				6BD507762B9576A4006E7CB0 /* backupsFileManager.m in Sources */,
 				6BD507772B9576A4006E7CB0 /* forgetSecretKeyViewController.m in Sources */,
-				6BA08F262C01D01100A2242D /* NSURLSession+SGDownloadTask.m in Sources */,
 				6BD507782B9576A4006E7CB0 /* UITextfield+NLLimit.m in Sources */,
 				6BD507792B9576A4006E7CB0 /* ShowImageView.m in Sources */,
 				6B7EA7B92BF74BDB002D5CC2 /* shareBySecretView.m in Sources */,
@@ -4401,7 +4304,6 @@
 				6BD5079D2B9576A4006E7CB0 /* UITextfield+NLLimit.m in Sources */,
 				6BD5079E2B9576A4006E7CB0 /* backupsFileRecordCell.m in Sources */,
 				6BD5079F2B9576A4006E7CB0 /* downLoadPreviewViewController.m in Sources */,
-				6BA08F2A2C01D01100A2242D /* SGCacheManager.m in Sources */,
 				6B2C1E672C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS15.m in Sources */,
 				6BD507A02B9576A4006E7CB0 /* playerShowSecretkeyView.m in Sources */,
 				6BD507A12B9576A4006E7CB0 /* uploadFileRecordCell.m in Sources */,
@@ -4451,7 +4353,6 @@
 				6BD507C12B9576A4006E7CB0 /* FLAnimatedImageView.m in Sources */,
 				6BEA31772BB65606005167AA /* clearCacheAlretViewController.m in Sources */,
 				6BD507C22B9576A4006E7CB0 /* DeviceThirdIdModel.m in Sources */,
-				6BA08F322C01D01100A2242D /* SGDownloadOperation.m in Sources */,
 				6B2C1E5F2C070ADE00FDCF82 /* ZFFloatView.m in Sources */,
 				6B07AC2D2BF8D38F005C2B0E /* NASFileAudioModel.m in Sources */,
 				6B9354A32BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m in Sources */,
@@ -4564,7 +4465,6 @@
 				6B7B65592AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm in Sources */,
 				6B2C1E622C070ADE00FDCF82 /* ZFKVOController.m in Sources */,
 				6B5D40402B4CE40F000965CF /* downloadManager.m in Sources */,
-				6BA08F2D2C01D01100A2242D /* SGDownloadManager.m in Sources */,
 				A08A950027E9A4E400C544BB /* FMDatabaseQueue.m in Sources */,
 				6B2C1E402C070ADE00FDCF82 /* ZFPortraitControlView.m in Sources */,
 				6BF52CA72AD7D3BE00A617DB /* customLaunchView.m in Sources */,
@@ -4624,7 +4524,6 @@
 				6B2C1E9A2C070ADE00FDCF82 /* ZFPlayerNotification.m in Sources */,
 				A08A950327E9A4E400C544BB /* FMDatabasePool.m in Sources */,
 				A003F6D327D8425C00715CBF /* iToast.m in Sources */,
-				6BA08F212C01D01100A2242D /* NSString+SGHashString.m in Sources */,
 				6B2C1E262C070ADE00FDCF82 /* UIView+ZFFrame.m in Sources */,
 				A08A94E027E9837600C544BB /* HWPageListCell.m in Sources */,
 				6BED888B2B4E819000F76DDC /* downloadFileRecordTableView.m in Sources */,
@@ -4639,7 +4538,6 @@
 				183AE6042A89CE3C00B11CB0 /* JSONModel.m in Sources */,
 				18FCE5492AD15E750020F623 /* PlayerViewController+AppDelegate.m in Sources */,
 				6BF52C9A2AD5546500A617DB /* WHPingTester.m in Sources */,
-				6BA08F392C01D01100A2242D /* SGDownloadSession.m in Sources */,
 				6B467BB22BC7E4360039A6A6 /* addLogObject.m in Sources */,
 				6BFF268D2AF8E1C600FCB4F7 /* forgetPwdViewController.m in Sources */,
 				6B72724C2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m in Sources */,
@@ -4652,10 +4550,8 @@
 				6B4C0F6C2C0314BA0070EF2E /* DFPlayerRequestManager.m in Sources */,
 				6B1CC2C72B677F3E00AD4217 /* extraMediaEventModel.m in Sources */,
 				6B5D401B2B4A9850000965CF /* couldPhoneFolderListModel.m in Sources */,
-				6BA08F352C01D01100A2242D /* SGDownloadQueue.m in Sources */,
 				6B1FBD2B2B452B3800926382 /* backupsFileManager.m in Sources */,
 				6BFF269A2AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m in Sources */,
-				6BA08F252C01D01100A2242D /* NSURLSession+SGDownloadTask.m in Sources */,
 				18E5572F2A3C6141005CC84B /* UITextfield+NLLimit.m in Sources */,
 				183AE6B72A8CA0C100B11CB0 /* ShowImageView.m in Sources */,
 				6B7EA7B72BF74BDB002D5CC2 /* shareBySecretView.m in Sources */,
@@ -4711,7 +4607,6 @@
 				A003F6B427D841EE00715CBF /* UITextfield+NLLimit.m in Sources */,
 				6B1FBD3F2B46875300926382 /* backupsFileRecordCell.m in Sources */,
 				6B5D40242B4AA7BF000965CF /* downLoadPreviewViewController.m in Sources */,
-				6BA08F292C01D01100A2242D /* SGCacheManager.m in Sources */,
 				6B2C1E662C070ADE00FDCF82 /* ZFLandscapeRotationManager_iOS15.m in Sources */,
 				6BFF26892AF8949F00FCB4F7 /* playerShowSecretkeyView.m in Sources */,
 				6B8FF6C22B05B24D00800981 /* uploadFileRecordCell.m in Sources */,
@@ -4761,7 +4656,6 @@
 				A003F6C127D841FF00715CBF /* FLAnimatedImageView.m in Sources */,
 				6BEA31762BB65606005167AA /* clearCacheAlretViewController.m in Sources */,
 				6BF0F3D62AD3937B000AA133 /* DeviceThirdIdModel.m in Sources */,
-				6BA08F312C01D01100A2242D /* SGDownloadOperation.m in Sources */,
 				6B2C1E5E2C070ADE00FDCF82 /* ZFFloatView.m in Sources */,
 				6B07AC2C2BF8D38F005C2B0E /* NASFileAudioModel.m in Sources */,
 				6B9354A02BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m in Sources */,

+ 1 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.h

@@ -9,7 +9,7 @@
 #import "TZImageManager.h"
 #import "TZAssetModel+imageData.h"
 #import "downloadThumbnailManager.h"
-#import "SGDownloadManager.h"
+
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 0 - 80
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/HWDownloadManager.h

@@ -1,80 +0,0 @@
-//
-//  HWDownloadManager.h
-//  VclustersGemini
-//
-//  Created by 余衡武 on 2020/4/24.
-//  Copyright © 2020 APPLE. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "SGDownloadManager.h"
-#import "SGDownloadSession.h"
-#import "SGDownloadQueue.h"
-#import "SGDownloadOperation.h"
-#import "SGCacheManager.h"
-#import "NSString+SGHashString.h"
-#import "NSURLSession+SGDownloadTask.h"
-#import "HWDownloadModel.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** 下载中通知 */
-#define  SGDownloadTaskExeing        @"SGDownloadTaskExeing"
-/** 下载失败通知 */
-#define  SGDownloadTaskExeError      @"SGDownloadTaskExeError"
-/** 下载完成通知 */
-#define  SGDownloadTaskExeEnd        @"SGDownloadTaskExeEnd"
-/** 下载暂停/取消通知 */
-#define  SGDownloadTaskExeSuspend    @"SGDownloadTaskExeSuspend"
-/** 删除下载任务通知 */
-#define  SGDownloadTaskExeDelete     @"SGDownloadTaskExeDelete"
-/** 移除loading通知 */
-#define  SGDownloadRemoveLoading     @"SGDownloadRemoveLoading"
-
-@interface HWDownloadManager : NSObject
-
-
-/** 操作记录plist文件保存路径 */
-@property (nonatomic,copy)NSString *plistPath;
-/** 登录账号信息字典 */
-@property (nonatomic,copy)NSDictionary *LoginInfo;
-/** 总任务数 */
-@property (nonatomic,strong)NSMutableArray *allTasks;
-/** 正在下载中的任务 */
-@property (nonatomic,strong)NSMutableArray *downloadingTasks;
-/** 等待下载的任务 */
-@property (nonatomic,strong)NSMutableArray *downloadWaitTasks;
-/** 最大下载任务数 */
-@property (nonatomic, assign) int downloadMaxNum;
-
-
-
-//获得管理类单例对象
-+ (instancetype)shardInstance;
-
-/** 创建下载任务 */
-- (void)creatDownloadTaskWithModel:(HWDownloadModel *)model;
-
-/** 开启所有下载任务 */
-- (void)startAllDownloadTask;
-/** 暂停所有下载任务 */
-- (void)pauseAllDownloadTask;
-/** 清除所有下载任务 */
-- (void)clearAllDownloadTask;
-/** 清除选中的下载任务 */
-- (void)deleteSelectedDownloadTask;
-/** 清除指定的下载任务 */
-- (void)deleteDownloadTaskWithModel:(HWDownloadModel *)model;
-
-// 新建某一个下载任务
-- (void)startDownloadTaskWithModel:(HWDownloadModel *)model;
-// 开始某一个下载任务
-- (void)taskResumeWithModel:(HWDownloadModel *)model;
-// 暂停某一个下载任务
-- (void)pauseDownloadTaskWithModel:(HWDownloadModel *)model;
-// 恢复某一个下载任务
-- (void)resumeDownloadTaskWithModel:(HWDownloadModel *)model;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 17
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/NSString+SGHashString.h

@@ -1,17 +0,0 @@
-//
-//  NSString+SGHashString.h
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/27.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
-@interface NSString (SGHashString)
-
-/** 获取MD5加密哈希散列值字符串 */
-- (NSString *)sg_md5HashString;
-
-@end

+ 0 - 43
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/NSString+SGHashString.m

@@ -1,43 +0,0 @@
-//
-//  NSString+SGHashString.m
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/27.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import "NSString+SGHashString.h"
-#import <CommonCrypto/CommonCrypto.h>
-
-@implementation NSString (SGHashString)
-#pragma mark - MD5加密
-- (NSString *)sg_md5HashString {
-    const char *str = self.UTF8String;
-    
-    uint8_t buffer[CC_MD5_DIGEST_LENGTH];
-    
-    CC_MD5(str, (CC_LONG)strlen(str), buffer);
-    
-    return [self sg_stringFromBytes:buffer length:CC_MD5_DIGEST_LENGTH];
-    
-}
-
-/**
- *  返回二进制 Bytes 流的字符串表示形式
- *
- *  @param bytes  二进制 Bytes 数组
- *  @param length 数组长度
- *
- *  @return 字符串表示形式
- */
-- (NSString *)sg_stringFromBytes:(uint8_t *)bytes length:(int)length {
-    NSMutableString *strM = [NSMutableString string];
-    
-    for (int i = 0; i < length; i++) {
-        [strM appendFormat:@"%02x", bytes[i]];
-    }
-    
-    return [strM copy];
-}
-
-@end

+ 0 - 22
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/NSURLSession+SGDownloadTask.h

@@ -1,22 +0,0 @@
-//
-//  NSURLSession+SGDownloadTask.h
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 2017/12/18.
-//  Copyright © 2017年 Shangen Zhang. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface NSURLSession (SGDownloadTask)
-
-/**
- 构造一个从特定位置开始下载的任务
-
- @param urlString 资源路径的URLstring
- @param startSize 开始的位置
- @return 下载任务
- */
-- (NSURLSessionDataTask *)sg_downloadDataTaskWithURLString:(NSString *)urlString
-                                                  startSize:(int64_t)startSize;
-@end

+ 0 - 42
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/NSURLSession+SGDownloadTask.m

@@ -1,42 +0,0 @@
-//
-//  NSURLSession+SGDownloadTask.m
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 2017/12/18.
-//  Copyright © 2017年 Shangen Zhang. All rights reserved.
-//
-
-#import "NSURLSession+SGDownloadTask.h"
-
-@implementation NSURLSession (SGDownloadTask)
-- (NSURLSessionDataTask *)sg_downloadDataTaskWithURLString:(NSString *)urlString
-                                                  startSize:(int64_t)startSize {
-    // 校验URL
-    if (urlString.length == 0) {
-        return nil;
-    }
-    NSURL *url = [NSURL URLWithString:urlString];
-    if (url == nil) {
-        return nil;
-    }
-    
-    // 创建请求 设置请求下载的位置
-    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
-//    NSString *tokenStr = [[UseAccountManage shareInstance] cloudAutoh];
-//    [request setValue:tokenStr forHTTPHeaderField:@"Authorization"];
-    request.HTTPMethod = @"GET";
-    
-    /*
-     bytes=0-100    请求0-100
-     bytes=200-1000
-     bytes=200-     从200开始直到结尾
-     bytes=-100
-     */
-    NSString *rangeStr = [NSString stringWithFormat:@"bytes=%lld-",startSize];
-    
-    [request setValue:rangeStr forHTTPHeaderField:@"Range"];
-    
-    // 创建task
-    return [self dataTaskWithRequest:request];
-}
-@end

+ 0 - 59
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGCacheManager.h

@@ -1,59 +0,0 @@
-//
-//  SGCacheManager.h
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-
-#define SG_EXTERN extern
-#import <Foundation/Foundation.h>
-
-
-//SG_EXTERN NSString const * filePath;
-//SG_EXTERN NSString const * fileSize;
-//SG_EXTERN NSString const * totalSize;
-//SG_EXTERN NSString const * fileName;
-//SG_EXTERN NSString const * fileUrl;
-//SG_EXTERN NSString const * isFinished;
-
-#define KFullPath [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]
-
-#define KFullDirector  [self getFullDirector]
-
-@interface SGCacheManager : NSObject
-
-/** 查询文件信息 */
-+ (NSDictionary *)queryFileInfoWithUrl:(NSString *)url;
-
-/** 查询要下载的文件大小 */
-+ (NSInteger)totalSizeWith:(NSString *)url;
-
-/** 记录要下载的文件大小 */
-+ (BOOL)saveTotalSizeWithSize:(NSInteger)size forURL:(NSString *)url;
-
-/**  增加配置信息 */
-+ (BOOL)saveFileInfoWithDict:(NSDictionary *)dict;
-
-
-/**  删除某个文件 */
-+ (BOOL)deleteFileWithUrl:(NSString *)url;
-
-/**  清理所有下载文件及下载信息 */
-+ (BOOL)clearDisks;
-
-/**  取消所有当前下载的文件 清理内存缓存的数据 */
-+ (BOOL)clearMemory;
-
-/**  取消所有当前下载的文件 删除磁盘所有的下载 清理内存缓存的数据 */
-+ (BOOL)clearMemoryAndDisk;
-
-
-+ (NSString *)getFullDirector;
-
-+ (NSString *)getNewPlistPath;
-
-+ (NSMutableDictionary *)getDownloadList;
-
-@end

+ 0 - 206
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGCacheManager.m

@@ -1,206 +0,0 @@
-//
-//  SGCacheManager.m
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import "SGCacheManager.h"
-#import "NSString+SGHashString.h"
-#import "CWFileManager.h"
-
-static NSMutableDictionary *_downloadList;
-
-static dispatch_semaphore_t _semaphore;
-
-
-//NSString const * filePath   =  @"filePath";
-//NSString const * fileSize   =  @"fileSize";
-//NSString const * fileName   =  @"fileName";
-//NSString const * fileUrl    =  @"fileUrl";
-//NSString const * isFinished =  @"isFinished";
-//NSString const * totalSize  =  @"totalSize";
-
-
-#define SGDownloadInfoPath  [self getNewPlistPath]
-
-#define SGDownloadList      [self getDownloadList]
-
-@interface SGCacheManager ()
-
-
-@end
-
-
-
-@implementation SGCacheManager
-
-+ (void)initialize {
-    _semaphore = dispatch_semaphore_create(1);
-}
-
-#pragma mark-plist
-+ (NSString *)getNewPlistPath {
-    
-    NSString *fileFolder = kPath_YunPan_Download_Folder;
-    HLog(@"登录账号:%@", kPath_YunPan_Download_Folder);
-    return [fileFolder stringByAppendingPathComponent:@"downloadInfo.plist"];
-}
-
-+ (NSString *)getFullDirector {
-
-    return kPath_YunPan_Download_Folder;
-}
-
-+ (NSMutableDictionary *)getDownloadList {
-    
-    if (!_downloadList) { // 内存没有
-        _downloadList = [[NSDictionary dictionaryWithContentsOfFile:SGDownloadInfoPath] mutableCopy]; // 本地加载
-        if (!_downloadList) { // 本地没有,分配内存
-            _downloadList = [NSMutableDictionary dictionary];
-        }
-    }
-    return _downloadList;
-}
-
-#pragma mark - save
-//+ (void)didReciveDownloadCompleteNoti:(NSNotification *)noti {
-//
-//    // 缓存记录
-//    NSMutableDictionary *dictM = [noti.userInfo mutableCopy];
-//    
-//    // 从磁盘获取到下载了
-//    if ([noti.object integerValue] == 2 && ([self queryFileInfoWithUrl:dictM[fileUrl]])) {
-//        return;
-//    }
-//    
-//    // 缓存记录
-//    [dictM setObject:@(YES) forKey:isFinished];
-//    NSString *key = [dictM[fileUrl] sg_md5HashString];
-//    
-//    [SGDownloadList setObject:dictM forKey:key];
-//    
-//    [SGDownloadList writeToFile:SGDownloadInfoPath atomically:YES];
-//    
-//}
-
-#pragma mark - query
-+ (NSDictionary *)queryFileInfoWithUrl:(NSString *)url {
-    // 本地查找
-    NSString *key = [[url lastPathComponent] stringByDeletingPathExtension];
-    NSMutableDictionary *dictM  = [[SGDownloadList objectForKey:key] mutableCopy];
-    
-    if (dictM) {
-        NSString *path = [KFullDirector stringByAppendingString:dictM[@"fileName"]];
-        [dictM setObject:path forKey:@"filePath"];
-        HLog(@"路径:%@", path);
-    }
-    
-    return dictM;
-    
-}
-
-+ (NSInteger)totalSizeWith:(NSString *)url {
-    //NSNumber *size = [self queryFileInfoWithUrl:url][totalSize];
-    
-    return [[self queryFileInfoWithUrl:url][@"totalSize"] integerValue];
-}
-
-/** 记录要下载的文件大小 */
-+ (BOOL)saveTotalSizeWithSize:(NSInteger)size forURL:(NSString *)url {
-    
-    return YES;
-}
-
-/**  增加配置信息 */
-+ (BOOL)saveFileInfoWithDict:(NSDictionary *)dict {
-    
-    // 多账号下载 判断是否需要缓存记录
-    //HLog(@"%@", dict);
-    if ([[dict allKeys] containsObject:@"fullPath"]) {
-        NSArray *fileArray = [[dict objectForKey:@"fullPath"] pathComponents];
-        NSString *filePathAccount = @"0";
-        if (fileArray.count > 3) {
-            filePathAccount = fileArray[fileArray.count - 3];
-        }
-
-//        NSString *account = [HWDataManager getStringWithKey:Const_HWAccountPhoneNumber];
-//        if (account.length == 0) {
-//            HLog(@"获取accout失败");
-//        }
-//
-//        if (![filePathAccount isEqualToString:account]) {
-//            HLog(@"切换账号 文件缓存账号%@ 与 当前登录账号:%@ 不一致", filePathAccount, account);
-//            return NO;
-//        }
-    }
-    
-    
-    // 线程等待 (信号量 + 1)
-    dispatch_semaphore_wait(_semaphore, DISPATCH_TIME_FOREVER);
-    
-    NSString *key = [[dict[@"url"] lastPathComponent] stringByDeletingPathExtension];
-    NSMutableDictionary *dictM =  SGDownloadList;
-    [dictM setObject:dict forKey:key];
-    BOOL flag = [dictM writeToFile:SGDownloadInfoPath atomically:YES];
-    
-    // 线程结束 (信号量 - 1)
-    dispatch_semaphore_signal(_semaphore);
-    
-    return flag;
-    
-}
-
-/**  删除配置信息 */
-+ (BOOL)deleteFileWithUrl:(NSString *)url {
-    // 线程等待 分配信号量 (信号量 + 1)
-    dispatch_semaphore_wait(_semaphore, DISPATCH_TIME_FOREVER);
-    
-    // 删除缓存的文件
-    NSString *fileFolder = kPath_YunPan_Download_Folder;
-    NSString *fileName = [url lastPathComponent];
-    NSString *fileURL = [fileFolder stringByAppendingPathComponent:fileName];
-
-    BOOL flag = [[NSFileManager defaultManager] removeItemAtPath:fileURL error:nil];
-//    BOOL flag = [[NSFileManager defaultManager] removeItemAtPath:dict[@"fullPath"] error:nil];
-    
-    // 删除plist的文件文件记录
-    NSString *key = [[url lastPathComponent] stringByDeletingPathExtension];
-//    NSDictionary *dict = SGDownloadList[key];
-    [SGDownloadList removeObjectForKey:key];
-    BOOL writeFlag = [SGDownloadList writeToFile:SGDownloadInfoPath atomically:YES];
-    
-    // 线程结束 释放信号量(信号量 - 1)
-    dispatch_semaphore_signal(_semaphore);
-    return (flag && writeFlag);
-}
-
-
-
-#pragma mark - 
-
-+ (BOOL)clearDisks {
-    // 1.删除所有的文件下载信息关联表
-    // 2.删除cache 下的download文件夹
-   return  [[NSFileManager defaultManager] removeItemAtPath:KFullDirector error:nil];
-      
-}
-
-/**  取消所有当前下载的文件 清理内存缓存的数据 */
-+ (BOOL)clearMemory {
-    // 删除信息关联
-    _downloadList = nil;
-    
-    return YES;
-}
-
-/**  取消所有当前下载的文件 删除磁盘所有的下载 清理内存缓存的数据 */
-+ (BOOL)clearMemoryAndDisk {
-    return ([self clearMemory] && [self clearDisks]);
-}
-
-
-
-
-@end

+ 0 - 90
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadManager.h

@@ -1,90 +0,0 @@
-//
-//  SGDownloadManager.h
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "SGDownloadOperation.h"
-
-/** 下载中通知 */
-#define  SGDownloadTaskExeing        @"SGDownloadTaskExeing"
-/** 下载失败通知 */
-#define  SGDownloadTaskExeError      @"SGDownloadTaskExeError"
-/** 下载完成通知 */
-#define  SGDownloadTaskExeEnd        @"SGDownloadTaskExeEnd"
-/** 下载暂停/等待中通知 */
-#define  SGDownloadTaskExeSuspend    @"SGDownloadTaskExeSuspend"
-/** 删除下载任务通知 */
-#define  SGDownloadTaskExeDelete     @"SGDownloadTaskExeDelete"
-/** 移除loading通知 */
-#define  SGDownloadRemoveLoading     @"SGDownloadRemoveLoading"
-
-/**
- block 回调
- */
-typedef void(^SGDownloadBeginBlock)(NSString * filePath);
-typedef void(^SGDownloadProgressBlock)(NSInteger completeSize,NSInteger expectSize);
-typedef void(^SGDownloadCompleteBlock)(NSDictionary *respose,NSError *error);
-
-
-/**
- 下载管理
- */
-@interface SGDownloadManager : NSObject
-
-/** 获取全部下载任务 */
-- (NSMutableArray *)getAllOperation;
-
-/** 实例化对象(单例) */
-+ (instancetype)shareManager;
-
-#pragma mark - 添加下载任务同时开启任务下载
-/** 开启下载任务 监听完成下载 */
-- (void)downloadWithURL:(NSURL *)url
-               complete:(SGDownloadCompleteBlock)complete;
-
-- (void)downloadWithURL:(NSURL *)url
-               fileType:(NSInteger)fileType
-               fileSize:(NSInteger)fileSize
-               complete:(SGDownloadCompleteBlock)complete;
-
-/** 开启下载任务 监听下载进度、完成下载 */
-- (void)downloadWithURL:(NSURL *)url
-               progress:(SGDownloadProgressBlock)progress
-               complete:(SGDownloadCompleteBlock)complete;
-
-/** 开启下载任务 监听开始下载信息、下载进度、完成下载 */
-- (void)downloadWithURL:(NSURL *)url
-                  begin:(SGDownloadBeginBlock)begin
-               progress:(SGDownloadProgressBlock)progress
-               complete:(SGDownloadCompleteBlock)complete;
-
-
-
-#pragma mark - 队列中的任务进行操作
-/** 开始任务(不会自动添加任务,列队中没有就直接返回) */
-- (void)startDownLoadWithUrl:(NSString *)url;
-
-/** 暂停任务(暂停下载url内容的任务) */
-- (void)supendDownloadWithUrl:(NSString *)url;
-
-/** 取消任务(取消下载url内容的任务) */
-- (void)cancelDownloadWithUrl:(NSString *)url;
-
-
-/** 暂停当前所有的下载任务 下载任务不会从列队中删除 */
-- (void)suspendAllDownloadTask;
-
-/** 开启当前列队中所有被暂停的下载任务 */
-- (void)startAllDownloadTask;
-
-/** 停止当前所有的下载任务 调用此方法会清空所有列队下载任务 */
-- (void)stopAllDownloads;
-
-@end
-
-
-

+ 0 - 177
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadManager.m

@@ -1,177 +0,0 @@
-//
-//  SGDownloadManager.m
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import "SGDownloadManager.h"
-#import "SGDownloadSession.h"
-#import "SGCacheManager.h"
-#import <MJExtension.h>
-
-@interface SGDownloadManager ()
-
-@property(nonatomic,strong) SGDownloadSession *downloadSession;
-
-@end
-
-
-@implementation SGDownloadManager
-
-+ (instancetype)shareManager {
-    static SGDownloadManager *_instance;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        _instance = [[self alloc] init];
-        [_instance registeNotification];
-    });
-    return _instance;
-}
-
-- (NSMutableArray *)getAllOperation {
-    NSMutableDictionary *allOperationDict = [SGCacheManager getDownloadList];
-//    HLog(@"%@---%@", allOperation,allOperation.allKeys);
-    NSMutableArray *allOperationArray = [NSMutableArray array];
-    for (NSDictionary *dict in allOperationDict.allValues) {
-        SGDownloadOperation *operation = [SGDownloadOperation mj_objectWithKeyValues:dict];
-        [allOperationArray addObject:operation];
-    }
-    return allOperationArray;
-}
-
-#pragma mark-监听通知
-- (void)registeNotification {
-    
-//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exchanggeAccount) name:ExchangeLoginAccountNotification object:nil];
-//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exchanggeAccount) name:AccountLoginOutsideNotification object:nil];
-}
-
-- (void)exchanggeAccount {
-    HLog(@"切换账号");
-    [self suspendAllDownloadTask];
-    
-    [SGCacheManager clearMemory];
-}
-
-#pragma mark - 外界交互
-- (void)downloadWithURL:(NSURL *)url complete:(void(^)(NSDictionary *,NSError *))complete{
-    [self downloadWithURL:url begin:nil progress:nil complete:complete];
-}
-
-- (void)downloadWithURL:(NSURL *)url fileType:(NSInteger)fileType fileSize:(NSInteger)fileSize complete:(SGDownloadCompleteBlock)complete {
-    [self downloadWithURL:url fileType:fileType fileSize:fileSize begin:nil progress:nil complete:complete];
-}
-
-- (void)downloadWithURL:(NSURL *)url progress:(void(^)(NSInteger,NSInteger ))progress complete:(void(^)(NSDictionary *,NSError *))complete {
-    [self downloadWithURL:url begin:nil progress:progress complete:complete];
-}
-
-- (void)downloadWithURL:(NSURL *)url begin:(void(^)(NSString *))begin progress:(void(^)(NSInteger,NSInteger))progress complete:(void(^)(NSDictionary *,NSError *))complete {
-    
-    if (![url isKindOfClass:NSURL.class]) {
-        if ([url isKindOfClass:NSString.class]) {
-            url = [NSURL URLWithString:(NSString *)url];
-        }else {
-            // 失败回调
-            
-            return;
-        }
-    }
-    // 开启异步 操作
-    dispatch_async(dispatch_get_global_queue(0, 0), ^{
-        // 本地查找
-        NSDictionary *fileInfo = [SGCacheManager queryFileInfoWithUrl:url.absoluteString];
-        
-        // 本地存在直接返回
-        if (fileInfo && [fileInfo[@"currentSize"] integerValue] == [fileInfo[@"totalSize"] integerValue]) {
-            
-            dispatch_async(dispatch_get_main_queue(), ^{
-                !complete ? : complete(fileInfo,nil);
-            });
-            return;
-        }
-        
-        // 交给downloader下载
-        [self.downloadSession downloadWithURL:url begin:begin progress:progress complete:complete];
-    });
-    
-}
-
-- (void)downloadWithURL:(NSURL *)url fileType:(NSInteger)fileType fileSize:(NSInteger)fileSize begin:(void(^)(NSString *))begin progress:(void(^)(NSInteger,NSInteger))progress complete:(void(^)(NSDictionary *,NSError *))complete {
-    
-    if (![url isKindOfClass:NSURL.class]) {
-        if ([url isKindOfClass:NSString.class]) {
-            url = [NSURL URLWithString:(NSString *)url];
-        }else {
-            // 失败回调
-            
-            return;
-        }
-    }
-    // 开启异步 操作
-    dispatch_async(dispatch_get_global_queue(0, 0), ^{
-        // 本地查找
-        NSDictionary *fileInfo = [SGCacheManager queryFileInfoWithUrl:url.absoluteString];
-        
-        // 本地存在直接返回
-        if (fileInfo && [fileInfo[@"currentSize"] integerValue] == [fileInfo[@"totalSize"] integerValue]) {
-            
-            dispatch_async(dispatch_get_main_queue(), ^{
-                !complete ? : complete(fileInfo,nil);
-            });
-            return;
-        }
-        
-        // 交给downloader下载
-        [self.downloadSession downloadWithURL:url fileType:fileType fileSize:fileSize begin:begin progress:progress complete:complete];
-    });
-    
-}
-
-#pragma mark - 
-- (void)startDownLoadWithUrl:(NSString *)url {
-    // 开始下载
-    [self.downloadSession startDownLoadWithUrl:url];
-}
-
-- (void)supendDownloadWithUrl:(NSString *)url {
-    // 暂停下载
-    [self.downloadSession supendDownloadWithUrl:url];
-}
-
-- (void)cancelDownloadWithUrl:(NSString *)url {
-    // 取消下载
-    [self.downloadSession cancelDownloadWithUrl:url];
-}
-
-
-/** 暂停当前所有的下载任务 下载任务不会从列队中删除 */
-- (void)suspendAllDownloadTask {
-    [self.downloadSession suspendAllDownloads];
-}
-
-/** 开启当前列队中所有被暂停的下载任务 */
-- (void)startAllDownloadTask {
-    [self.downloadSession startAllDownloads];
-}
-
-/** 停止当前所有的下载任务 调用此方法会清空所有列队下载任务 */
-- (void)stopAllDownloads {
-    [self.downloadSession cancelAllDownloads];
-    self.downloadSession = nil;
-}
-
-#pragma mark - lazy load
-- (SGDownloadSession *)downloadSession {
-    if (!_downloadSession) {
-        _downloadSession = [[SGDownloadSession alloc] init];
-        
-    }
-    return _downloadSession;
-}
-
-
-
-@end

+ 0 - 100
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadOperation.h

@@ -1,100 +0,0 @@
-//
-//  SGDownloadOperation.h
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "SGCacheManager.h"
-
-
-SG_EXTERN NSString * const SGDownloadCompleteNoti;
-
-typedef void(^SGReceiveResponseOperation)(NSString *filePath);
-typedef void(^SGReceivDataOperation)(NSInteger completeSize,NSInteger expectSize);
-typedef void(^SGCompleteOperation)(NSDictionary *respose,NSError *error);
-
-/** 下载状态*/
-typedef  enum : NSUInteger {
-    DownloadStateWaiting = 0,   /** 下载等待中 */
-    DownloadStateDoing,         /** 下载中 */
-    DownloadStateSuspended,     /** 下载暂停 */
-    DownloadStateCompleted,     /** 下载完成 */
-    DownloadStateFailed,        /** 下载失败 */
-} DownloadStateType;
-
-@protocol SGDownloadOperationProtocol <NSObject>
-                                    
-// 供queue管理方法
-
-// 处理响应值
-- (void)operateWithResponse:(NSURLResponse *)response;
-// 处理接收到的碎片
-- (void)operateWithReceivingData:(NSData *)data;
-// 处理完成回调
-- (void)operateWithComplete:(NSError *)error;
-
-
-/**
- 设置block回调
-
- @param didReceiveResponse 开始下载的回调
- @param didReceivData 接收到下载的回调
- @param didComplete 下载完成的回调
- */
-- (void)configCallBacksWithDidReceiveResponse:(SGReceiveResponseOperation)didReceiveResponse
-                                didReceivData:(SGReceivDataOperation)didReceivData
-                                  didComplete:(SGCompleteOperation)didComplete;
-
-@end
-
-@interface SGDownloadOperation : NSObject <SGDownloadOperationProtocol>
-
-/** 绑定的标示及task的创建 */
-@property (readonly,nonatomic, copy)NSString *url;
-
-/** 下载任务 */
-@property (nonatomic,strong)NSURLSessionDataTask *dataTask;
-
-/** 文件句柄 可以记录文件的下载的位置 */
-@property (nonatomic,strong) NSFileHandle *handle;
-
-/** 下载的文件总大小 */
-@property (nonatomic,assign) int64_t totalSize;
-
-/** 当前下载了多少 */
-@property (nonatomic,assign) int64_t currentSize;
-
-/** 当前下载文件名称 */
-@property (nonatomic,copy) NSString *fileName;
-
-/** 当前下载文件沙盒全路径 */
-@property (nonatomic,copy) NSString *fullPath;
-
-/** 文件下载状态 */
-@property (nonatomic,assign) DownloadStateType downloadState;
-
-/** 下载完成-时间戳 */
-@property (nonatomic,assign)  NSInteger timeStamp;
-
-/** 文件类型 */
-@property (nonatomic,assign)  NSInteger fileType;
-
-/** 是否完成 */
-@property (nonatomic, assign)  NSInteger isFinished;
-
-
-
-// 创建下载操作任务
-- (instancetype)initWith:(NSString *)url session:(NSURLSession *)session;
-
-- (instancetype)initWith:(NSString *)url session:(NSURLSession *)session fileType:(NSInteger)fileType fileSize:(NSInteger)fileSize;
-
-
-
-- (NSDictionary *)downLoadInfoWithFinished:(BOOL)finished;
-
-@end
-

+ 0 - 268
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadOperation.m

@@ -1,268 +0,0 @@
-//
-//  SGDownloadOperation.m
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import "SGDownloadOperation.h"
-#import "NSString+SGHashString.h"
-#import "NSURLSession+SGDownloadTask.h"
-#import "SGDownloadManager.h"
-
-NSString * const SGDownloadCompleteNoti = @"SGDownloadCompleteNoti";
-
-@interface SGDownloadOperation ()
-{
-    SGReceiveResponseOperation  _didReceiveResponseCallBack;
-    SGReceivDataOperation       _didReceivDataCallBack;
-    SGCompleteOperation         _didCompleteCallBack;
-}
-
-
-@end
-
-@implementation SGDownloadOperation
-
-- (instancetype)initWith:(NSString *)url session:(NSURLSession *)session {
-    
-    if (self = [super init]) {
-        _url = url;
-        // 初始化下载信息
-        _currentSize = [self getFileSizeWithURL:url];
-        
-        // 偏好设置里面存储总数据
-        _totalSize = [SGCacheManager totalSizeWith:url];
-        
-        _timeStamp = [iTools getNowTimeStamp];
-        // 校验
-        if (self.currentSize == self.totalSize && self.totalSize != 0) {
-            return nil;
-        }
-        
-        _downloadState = DownloadStateWaiting;
-        [SGCacheManager saveFileInfoWithDict:[self downLoadInfoWithFinished:NO]];
-        
-        _dataTask = [session sg_downloadDataTaskWithURLString:url startSize:_currentSize];
-    }
-    return _dataTask ? self : nil;
-}
-
-- (instancetype)initWith:(NSString *)url session:(NSURLSession *)session fileType:(NSInteger)fileType fileSize:(NSInteger)fileSize {
-    
-    if (self = [super init]) {
-        _url = url;
-        // 初始化下载信息
-        _currentSize = [self getFileSizeWithURL:url];
-        
-        // 偏好设置里面存储总数据
-        _totalSize = fileSize;
-        
-        _fileType = fileType;
-        
-        // 校验
-        if (self.currentSize == self.totalSize && self.totalSize != 0) {
-            return nil;
-        }
-        
-        _downloadState = DownloadStateWaiting;
-        [SGCacheManager saveFileInfoWithDict:[self downLoadInfoWithFinished:NO]];
-        
-        _dataTask = [session sg_downloadDataTaskWithURLString:url startSize:_currentSize];
-    }
-    return _dataTask ? self : nil;
-}
-
-#pragma mark - setups
-- (int64_t)getFileSizeWithURL:(NSString *)url {
-//    // md5文件名加密
-//    NSString *md5FielName = [[url lastPathComponent] stringByDeletingPathExtension];
-//    // 获取后缀名
-//    NSArray *subString = [[url lastPathComponent] componentsSeparatedByString:@"."];
-//    // 拼接后缀名
-    self.fileName = [url lastPathComponent];
-    
-    // 创建文件储存路径
-    if (![[NSFileManager defaultManager] fileExistsAtPath:[SGCacheManager getFullDirector]]) {
-        [[NSFileManager defaultManager] createDirectoryAtPath:[SGCacheManager getFullDirector] withIntermediateDirectories:YES attributes:nil error:nil];
-    }
-
-    // 设置下载路径
-    self.fullPath = [[SGCacheManager getFullDirector] stringByAppendingPathComponent:self.fileName];
-    
-    // 获取下载进度
-    NSDictionary *fileInfo = [[NSFileManager defaultManager] attributesOfItemAtPath:self.fullPath error:nil];
-    // 获取已下载的长度
-    return  [fileInfo[NSFileSize] longLongValue];
-}
-
-#pragma mark - SGDownloadOperationProtocol
-// 接收到相应时
-- (void)operateWithResponse:(NSURLResponse *)response {
-    // 总的size
-    if (self.currentSize + response.expectedContentLength == 0) {
-        HLog(@"下载数据回调异常");
-        return;
-    }
-    self.totalSize = self.currentSize + response.expectedContentLength;
-    
-    // 创建空的文件夹
-    if (self.currentSize == 0) {
-        // 创建空的文件
-        [[NSFileManager defaultManager]  createFileAtPath:self.fullPath contents:nil attributes:nil];
-    }
-    
-    // 创建文件句柄
-    self.handle = [NSFileHandle fileHandleForWritingAtPath:self.fullPath];
-    
-    // 文件句柄移动到文件末尾 位置 // 返回值是 unsign long long
-    [self.handle seekToEndOfFile];
-    
-    // 开始下载记录文件下载信息
-    _downloadState = DownloadStateDoing;
-    [SGCacheManager saveFileInfoWithDict:[self downLoadInfoWithFinished:NO]];
-    
-    // 回调给外界
-    if (_didReceiveResponseCallBack) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            self->_didReceiveResponseCallBack(self.fullPath);
-            
-        });
-        
-    }
-}
-
-- (void)operateWithReceivingData:(NSData *)data {
-    // 获得已经下载的文件大小
-    self.currentSize += data.length;
-    HLog(@"currentSize:%zd---progress:%.2f", self.currentSize, 1.00*self.currentSize/self.totalSize);
-    // 写入文件
-    [self.handle writeData:data];
-    
-    // 下载状态 通知代理
-    if (_didReceivDataCallBack) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            self->_didReceivDataCallBack((NSUInteger)self.currentSize,(NSUInteger)self.totalSize);
-            
-        });
-    }
-    
-    // 下载中通知
-    [self operationDoningWithOperation:self];
-}
-
-- (void)operateWithComplete:(NSError *)error {
-    // 关闭文件句柄
-    [self.handle closeFile];
-    // 释放文件句柄
-    self.handle = nil;
-    
-    // 完成下载 通知 block
-    if (error) {
-        [self completFailueWithError:error];
-    } else {
-        [self completCusesseWithCode:1];
-    }
-}
-
-- (void)configCallBacksWithDidReceiveResponse:(SGReceiveResponseOperation)didReceiveResponse
-                                didReceivData:(SGReceivDataOperation)didReceivData
-                                  didComplete:(SGCompleteOperation)didComplete {
-    _didReceiveResponseCallBack  = didReceiveResponse;
-    _didReceivDataCallBack       = didReceivData;
-    _didCompleteCallBack         = didComplete;
-    
-}
-
-#pragma mark - operations
-/** 成功回调 1代表下载后成功回调 2代表直接从磁盘中获取了 */
-- (void)completCusesseWithCode:(NSInteger)code {
-    // 获取下载信息
-    NSDictionary *dict = [self downLoadInfoWithFinished:YES];
-    
-    
-    // 通知
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadCompleteNoti object:self userInfo:dict];
-    
-    if (code == 1) {
-        // 存储 文件下载信息
-        HLog(@"%zd", DownloadStateCompleted);
-        _downloadState = DownloadStateCompleted;
-        self.timeStamp = [iTools getNowTimeStamp];
-        [SGCacheManager saveFileInfoWithDict:dict];
-    }
-    
-    // 回到主线程 回调
-    if (_didCompleteCallBack) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            self->_didCompleteCallBack(dict,nil);
-        });
-    }
-    
-    // 成功通知
-    [self operationSuccessWithOperation:self];
-}
-
-/** 失败回调 */
-- (void)completFailueWithError:(NSError *)error {
-    
-    // 发通知
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadCompleteNoti object:self userInfo:@{@"error":error}];
-    // 存储
-    _downloadState = DownloadStateFailed;
-    [SGCacheManager saveFileInfoWithDict:[self downLoadInfoWithFinished:NO]];
-    
-    // 回调
-    if (_didCompleteCallBack) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            self->_didCompleteCallBack(nil,error);
-        });
-    }
-    
-    // 失败通知
-    [self operationFailedWithOperation:self];
-}
-
-#pragma mark 发送通知
-// 失败某一个operation 保存本地 通知外界
-- (void)operationFailedWithOperation:(SGDownloadOperation *)operation {
-    HLog(@"SGDownloadTaskExeError");
-    operation.downloadState = DownloadStateFailed;
-    [SGCacheManager saveFileInfoWithDict:[operation downLoadInfoWithFinished:NO]];
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadTaskExeError object:nil userInfo:@{@"operation" : operation}];
-}
-
-// 重启某一个operation 保存本地 通知外界
-- (void)operationDoningWithOperation:(SGDownloadOperation *)operation {
-    HLog(@"SGDownloadTaskExeing");
-//    operation.downloadState = DownloadStateDoing; // 暂停之后 数据回来 状态会被修改为下载中 不科学
-    [SGCacheManager saveFileInfoWithDict:[operation downLoadInfoWithFinished:NO]];
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadTaskExeing object:nil userInfo:@{@"operation" : operation}];
-}
-
-// 等待某一个operation 保存本地 通知外界
-- (void)operationSuccessWithOperation:(SGDownloadOperation *)operation {
-    HLog(@"SGDownloadTaskExeEnd");
-    operation.downloadState = DownloadStateCompleted;
-    [SGCacheManager saveFileInfoWithDict:[operation downLoadInfoWithFinished:YES]];
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadTaskExeEnd object:nil userInfo:@{@"operation" : operation}];
-}
-
-#pragma mark - get download info
-// 构造回调信息
-- (NSDictionary *)downLoadInfoWithFinished:(BOOL)finished {
-    HLog(@"%zd", self.downloadState);
-    return  @{
-                    @"url" : self.url,
-               @"fileName" : self.fileName,
-               @"fullPath" : self.fullPath,
-            @"currentSize" : @(self.currentSize),
-              @"totalSize" : @(self.totalSize),
-               @"fileType" : @(self.fileType),
-              @"timeStamp" : @(self.timeStamp),
-          @"downloadState" : @(self.downloadState),
-             @"isFinished" : @(finished)
-            };
-}
-@end

+ 0 - 55
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadQueue.h

@@ -1,55 +0,0 @@
-//
-//  SGDownloadQueue.h
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-/** 下载处理 */
-typedef  enum : NSUInteger {
-    DownloadHandleTypeStart,    // 开始下载
-    DownloadHandleTypeSuspend,  // 暂停下载
-    DownloadHandleTypeCancel,   // 取消下载
-} DownloadHandleType;
-
-
-@interface SGDownloadQueue : NSObject
-
-/** 设置最大的并发下载个数 */
-@property (nonatomic, assign) NSInteger              maxCount;
-
-@property (nonatomic,strong) NSURLSession *session;
-
-// 添加下载任务
-- (void)addDownloadWithSession:(NSURLSession *)session
-                        URL:(NSURL *)url
-                      begin:(void(^)(NSString * filePath))begin
-                   progress:(void(^)(NSInteger completeSize,NSInteger expectSize))progress
-                   complete:(void(^)(NSDictionary *respose,NSError *error))complet;
-
-- (void)addDownloadWithSession:(NSURLSession *)session
-                        URL:(NSURL *)url
-                      fileType:(NSInteger)fileType
-                      fileSize:(NSInteger)fileSize
-                      begin:(void(^)(NSString * filePath))begin
-                   progress:(void(^)(NSInteger completeSize,NSInteger expectSize))progress
-                   complete:(void(^)(NSDictionary *respose,NSError *error))complet;
-
-// 对当前任务进行操作
-- (void)operateDownloadWithUrl:(NSString *)url session:(NSURLSession *)session handle:(DownloadHandleType)handle;
-
-// 取消所有任务
-//- (void)cancelAllTasks;
-- (void)suspendAllTasksWithSession:(NSURLSession *)session;
-- (void)startAllTasksWithSession:(NSURLSession *)session;
-
-// 供downloader 处理下载调用
-- (void)dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response;
-
-- (void)dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data;
-
-- (void)task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error;
-@end

+ 0 - 407
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadQueue.m

@@ -1,407 +0,0 @@
-//
-//  SGDownloadQueue.m
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import "SGDownloadQueue.h"
-#import "SGDownloadOperation.h"
-#import "SGDownloadManager.h"
-#import "NSURLSession+SGDownloadTask.h"
-#import <MJExtension.h>
-
-@interface SGDownloadQueue ()
-// 列队管理集合
-@property (nonatomic,strong) NSMutableArray <SGDownloadOperation *> *operations;
-
-@end
-
-@implementation SGDownloadQueue
-
-- (instancetype)init {
-
-    if (self = [super init]) {
-        _maxCount = 3;
-        //_maxCount = 5;
-        [self registeNotification];
-    }
-    return self;
-}
-
-- (void)dealloc {
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
-}
-
-- (void)didResiveDownloadFileCompete:(NSNotification *)noti {
-    SGDownloadOperation *operation = noti.object;
-    if (operation) {
-        [self.operations removeObject:operation];
-    }
-}
-
-- (NSMutableArray *)getOperationDoing {
-    
-    NSMutableArray *doingArray = [NSMutableArray array];
-    for (SGDownloadOperation *operation in self.operations) {
-        if (operation.downloadState == DownloadStateDoing) {
-            [doingArray addObject:operation];
-        }
-    }
-    return doingArray;
-}
-
-- (NSMutableArray *)getOperationWaiting {
-    
-    NSMutableArray *waitingArray = [NSMutableArray array];
-    [self.operations enumerateObjectsUsingBlock:^(SGDownloadOperation * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-        
-        SGDownloadOperation *operation = (SGDownloadOperation *)obj;
-        if (operation.downloadState == DownloadStateWaiting) {
-            [waitingArray addObject:operation];
-        }
-    }];
-    return waitingArray;
-}
-
-#pragma mark - handle Out operations
-- (void)addDownloadWithSession:(NSURLSession *)session URL:(NSURL *)url begin:(void(^)(NSString *))begin progress:(void(^)(NSInteger,NSInteger))progress complete:(void(^)(NSDictionary *,NSError *))complet {
-    // 获取operation对象
-    SGDownloadOperation *operation = [self operationWithUrl:url.absoluteString];
-    
-    if (operation == nil) { // 之前不存在此任务
-        
-        operation = [[SGDownloadOperation alloc] initWith:url.absoluteString session:session];
-        
-        if (operation == nil) {
-            // 没有下载任务代表已下载完成
-            NSDictionary *fileInfo = [SGCacheManager queryFileInfoWithUrl:url.absoluteString];
-            if (fileInfo && complet) {
-                complet(fileInfo,nil);
-            }else {
-                complet(nil,[NSError errorWithDomain:@"构建下载任务失败" code:-1 userInfo:nil]);
-            }
-            return;
-        }
-        
-        [self.operations addObject:operation];
-    }
-    
-    // 回调赋值operation
-//    [operation configCallBacksWithDidReceiveResponse:begin didReceivData:progress didComplete:complet];
-    
-//    [operation.dataTask resume];
-    
-}
-
-- (void)addDownloadWithSession:(NSURLSession *)session URL:(NSURL *)url fileType:(NSInteger)fileType fileSize:(NSInteger)fileSize begin:(void(^)(NSString * filePath))begin progress:(void(^)(NSInteger completeSize,NSInteger expectSize))progress complete:(void(^)(NSDictionary *respose,NSError *error))complet {
-    // 获取operation对象
-    SGDownloadOperation *operation = [self operationWithUrl:url.absoluteString];
-    
-    if (operation == nil) { // 队列里不存在此任务
-        
-        operation = [[SGDownloadOperation alloc] initWith:url.absoluteString session:session fileType:fileType fileSize:fileSize];
-        
-        if (operation == nil) {
-            // 没有下载任务代表已下载完成
-            NSDictionary *fileInfo = [SGCacheManager queryFileInfoWithUrl:url.absoluteString];
-            if (fileInfo && complet) {
-                complet(fileInfo,nil);
-            }else {
-                complet(nil,[NSError errorWithDomain:@"构建下载任务失败" code:-1 userInfo:nil]);
-            }
-            return;
-        }
-        
-        [self.operations addObject:operation];
-    }
-    
-    // 回调赋值operation
-//    [operation configCallBacksWithDidReceiveResponse:begin didReceivData:progress didComplete:complet];
-    
-    if ([self getOperationDoing].count < self.maxCount) { // 下载中任务数少于最大任务限制
-        [operation.dataTask resume];
-        [self operationStartWithOperation:operation];
-    }else { // 下载中任务数大于最大任务限制
-//        [operation.dataTask suspend];
-        [self operationWaitingWithOperation:operation];
-//        HLog(@"下载中任务数等于最大任务限制:%zd",[self getOperationDoing].count);
-    }
-}
-
-- (void)operateDownloadWithUrl:(NSString *)url session:(NSURLSession *)session handle:(DownloadHandleType)handle {
-    // 1、任务列表里取任务
-    SGDownloadOperation *operation = [self operationWithUrl:url];
-    
-    // 2、本地plist文件里提取的任务
-    if (!operation) {
-        NSDictionary *dict = [SGCacheManager queryFileInfoWithUrl:url];
-        operation = [SGDownloadOperation mj_objectWithKeyValues:dict];
-    }
-
-    // 3、本地plist文件里提取的任务不存在dataTask
-    if (!operation.dataTask && operation.currentSize != operation.totalSize) {
-        operation.dataTask = [self.session sg_downloadDataTaskWithURLString:operation.url startSize:operation.currentSize];
-        [self.operations addObject:operation];
-    }
-    
-    if (operation) {
-        
-        switch (handle) {
-            case DownloadHandleTypeStart:
-                
-                switch (operation.dataTask.state) {
-                    case NSURLSessionTaskStateRunning:
-                        HLog(@"NSURLSessionTaskStateRunning");
-                        break;
-                    
-                    case NSURLSessionTaskStateSuspended:
-                        HLog(@"NSURLSessionTaskStateSuspended");
-                        operation.dataTask = [self.session sg_downloadDataTaskWithURLString:operation.url startSize:operation.currentSize];
-                        break;
-                        
-                    case NSURLSessionTaskStateCanceling:
-                        HLog(@"NSURLSessionTaskStateCanceling");
-                        operation.dataTask = [self.session sg_downloadDataTaskWithURLString:operation.url startSize:operation.currentSize];
-                        break;
-                        
-                    case NSURLSessionTaskStateCompleted:
-                        HLog(@"NSURLSessionTaskStateCompleted");
-                        break;
-                        
-                    default:
-                        break;
-                }
-                
-                if ([self getOperationDoing].count >= self.maxCount) { // 下载中任务数超过最大任务限制
-                    HLog(@"下载中的任务数超过最大限制")
-//                    [operation.dataTask suspend]; // 暂停
-                    [self operationWaitingWithOperation:operation];
-                    return;
-                }
-                
-                [operation.dataTask resume]; // 开始
-                [self operationStartWithOperation:operation];
-                break;
-            case DownloadHandleTypeSuspend:
-                [operation.dataTask suspend]; // 暂停
-                [self operationSuspendWithOperation:operation];
-                break;
-            case DownloadHandleTypeCancel:
-                if (operation.dataTask) { // 任务列表删除任务
-                    [operation.dataTask cancel];  // 取消
-                    [self.operations removeObject:operation];
-                }
-                [SGCacheManager deleteFileWithUrl:url];   // plist删除任务
-                [self operationDeleteWithOperation:operation];
-                break;
-        }
-    }
-}
-
-- (void)cancelAllTasks {
-    // 取消所有的任务
-    [self.operations enumerateObjectsUsingBlock:^(SGDownloadOperation * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-        [obj.dataTask cancel];
-    }];
-    // 清理内存
-    self.operations = nil;
-}
-
-- (void)suspendAllTasksWithSession:(NSURLSession *)session {
-    // 暂停所有的任务
-    [self.operations enumerateObjectsUsingBlock:^(SGDownloadOperation * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-        
-        SGDownloadOperation *operation = (SGDownloadOperation *)obj;
-        if (operation.currentSize != operation.totalSize) { // 暂停未完成的下载任务
-            if (!operation.dataTask) { // 给plist里的任务添加dataTask 添加到operations
-                operation.dataTask = [self.session sg_downloadDataTaskWithURLString:operation.url startSize:operation.currentSize];
-            }
-            [operation.dataTask suspend];
-            [self operationSuspendWithOperation:operation];
-        }else {
-            HLog(@"已完成的任务");
-        }
-
-    }];
-}
-
-- (void)startAllTasksWithSession:(NSURLSession *)session {
-    
-    // 开始所有的任务
-    [self.operations enumerateObjectsUsingBlock:^(SGDownloadOperation * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-        
-        SGDownloadOperation *operation = (SGDownloadOperation *)obj;
-        if (!operation.dataTask) { // 给plist里的任务添加dataTask 添加到operations
-            operation.dataTask = [self.session sg_downloadDataTaskWithURLString:operation.url startSize:operation.currentSize];
-        }
-  
-        if ([self getOperationDoing].count < self.maxCount) { // 下载中任务数少于最大任务限制
-            
-            switch (operation.dataTask.state) {
-                case NSURLSessionTaskStateRunning:
-                    HLog(@"NSURLSessionTaskStateRunning");
-                    break;
-                
-                case NSURLSessionTaskStateSuspended:
-                    HLog(@"NSURLSessionTaskStateSuspended");
-                    break;
-                    
-                case NSURLSessionTaskStateCanceling:
-                    HLog(@"NSURLSessionTaskStateCanceling");
-                    operation.dataTask = [self.session sg_downloadDataTaskWithURLString:operation.url startSize:operation.currentSize];
-                    break;
-                    
-                case NSURLSessionTaskStateCompleted:
-                    HLog(@"NSURLSessionTaskStateCompleted");
-                    break;
-                    
-                default:
-                    break;
-            }
-            
-            [operation.dataTask resume]; // 开始
-            [self operationStartWithOperation:operation];
-        }else { // 下载中任务数大于最大任务限制
-//            [operation.dataTask suspend];
-            [self operationWaitingWithOperation:operation];
-    //        HLog(@"下载中任务数等于最大任务限制:%zd",[self getOperationDoing].count);
-        }
-
-    }];
-}
-
-#pragma mark-监听通知
-- (void)registeNotification {
-    // 监听完成通知
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didResiveDownloadFileCompete:) name:SGDownloadCompleteNoti object:nil];
-    
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskExeEnd:) name:SGDownloadTaskExeEnd object:nil];
-//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskExeEnd:) name:SGDownloadTaskExeError object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskExeEnd:) name:SGDownloadTaskExeSuspend object:nil];
-//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskExeEnd:) name:SGDownloadTaskExeDelete object:nil];
-}
-    
-- (void)taskExeEnd:(NSNotification *)notification
-{
-    NSMutableArray *operationWaiting = [self getOperationWaiting];
-    
-    [operationWaiting enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-        SGDownloadOperation *operation = obj;
-        if ([self getOperationDoing].count < self.maxCount) {
-            [self operateDownloadWithUrl:operation.url session:self.session handle:DownloadHandleTypeStart];
-            
-        }else {
-            *stop = YES;
-        }
-    }];
-}
-
-#pragma mark 发送通知
-// 暂停某一个operation 保存本地 通知外界
-- (void)operationSuspendWithOperation:(SGDownloadOperation *)operation {
-    operation.downloadState = DownloadStateSuspended;
-    [SGCacheManager saveFileInfoWithDict:[operation downLoadInfoWithFinished:NO]];
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadTaskExeSuspend object:nil userInfo:@{@"operation" : operation}];
-}
-
-// 重启某一个operation 保存本地 通知外界
-- (void)operationStartWithOperation:(SGDownloadOperation *)operation {
-    operation.downloadState = DownloadStateDoing;
-    [SGCacheManager saveFileInfoWithDict:[operation downLoadInfoWithFinished:NO]];
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadTaskExeing object:nil userInfo:@{@"operation" : operation}];
-}
-
-// 等待某一个operation 保存本地 通知外界
-- (void)operationWaitingWithOperation:(SGDownloadOperation *)operation {
-    operation.downloadState = DownloadStateWaiting;
-    [SGCacheManager saveFileInfoWithDict:[operation downLoadInfoWithFinished:NO]];
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadTaskExeSuspend object:nil userInfo:@{@"operation" : operation}];
-}
-
-// 删除某一个operation 保存本地 通知外界
-- (void)operationDeleteWithOperation:(SGDownloadOperation *)operation {
-    [[NSNotificationCenter defaultCenter] postNotificationName:SGDownloadTaskExeDelete object:nil userInfo:nil];
-}
-
-#pragma mark - handle download
-- (void)dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response {
-    [[self oprationWithDataTask:dataTask] operateWithResponse:response];
-}
-
-- (void)dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data {
-    [[self oprationWithDataTask:dataTask] operateWithReceivingData:data];
-}
-
-
-- (void)task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error {
-    [[self oprationWithDataTask:task] operateWithComplete:error];
-}
-
-
-#pragma mark - query operation
-- (SGDownloadOperation *)operationWithUrl:(NSString *)url{
-    __block SGDownloadOperation *operation = nil;
-    
-    [self.operations enumerateObjectsUsingBlock:^(SGDownloadOperation * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-        if ([obj.url isEqualToString:url]) {
-            operation = obj;
-            *stop = YES;
-        }
-    }];
-    
-    return operation;
-}
-
-// 寻找operation
-- (SGDownloadOperation *)oprationWithDataTask:(NSURLSessionTask *)dataTask {
-    __block SGDownloadOperation *operation = nil;
-    
-    [self.operations enumerateObjectsUsingBlock:^(SGDownloadOperation * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-        if (obj.dataTask == dataTask) {
-            operation = obj;
-            *stop = YES;
-        }
-    }];
-    
-    return operation;
-}
-
-#pragma mark - lazy load 
-- (NSMutableArray<SGDownloadOperation *> *)operations {
-    
-    if (!_operations) {
-        _operations = [NSMutableArray array];
-        [self addOperationsFromPlist];
-    }
-    return _operations;
-}
-
-- (void)addOperationsFromPlist {
-    
-    [self.operations removeAllObjects];
-    
-    NSMutableArray *operations = [[SGDownloadManager shareManager] getAllOperation];
-    for (SGDownloadOperation *operationPlist in operations) {
-        
-        // 1、任务列表里取任务
-        SGDownloadOperation *operation = [self operationWithUrl:operationPlist.url];
-        
-        // 2、本地plist文件里提取的任务
-        if (!operation) {
-            NSDictionary *dict = [SGCacheManager queryFileInfoWithUrl:operationPlist.url];
-            operation = [SGDownloadOperation mj_objectWithKeyValues:dict];
-        }
-
-        // 3、本地plist文件里提取的任务不存在dataTask
-        if (!operation.dataTask) {
-            operation.dataTask = [self.session sg_downloadDataTaskWithURLString:operation.url startSize:operation.currentSize];
-            operation.handle = [NSFileHandle fileHandleForWritingAtPath:operation.fullPath];
-//            [operation configCallBacksWithDidReceiveResponse:begin didReceivData:progress didComplete:complet];
-            [self.operations addObject:operation];
-        }
-    }
-}
-
-@end

+ 0 - 37
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadSession.h

@@ -1,37 +0,0 @@
-//
-//  SGDownloader.h
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "SGDownloadManager.h"
-
-@interface SGDownloadSession : NSObject
-
-// 接口回调
-- (void)downloadWithURL:(NSURL *)url
-                  begin:(void(^)(NSString *))begin
-               progress:(void(^)(NSInteger,NSInteger))progress
-               complete:(void(^)(NSDictionary *,NSError *))complet;
-
-- (void)downloadWithURL:(NSURL *)url
-               fileType:(NSInteger)fileType
-               fileSize:(NSInteger)fileSize
-                  begin:(void(^)(NSString *))begin
-               progress:(void(^)(NSInteger,NSInteger))progress
-               complete:(void(^)(NSDictionary *,NSError *))complet;
-
-
-- (void)startDownLoadWithUrl:(NSString *)url;
-
-- (void)supendDownloadWithUrl:(NSString *)url;
-
-- (void)cancelDownloadWithUrl:(NSString *)url;
-
-- (void)cancelAllDownloads;
-- (void)startAllDownloads;
-- (void)suspendAllDownloads;
-@end

+ 0 - 165
创维盒子/双子星云手机/Vendor/DownLoadManager/SGDwonload/SGDownloadSession.m

@@ -1,165 +0,0 @@
-//
-//  SGDownloader.m
-//  OfflineBreakPointDownload
-//
-//  Created by Shangen Zhang on 16/11/26.
-//  Copyright © 2016年 Shangen Zhang. All rights reserved.
-//
-
-#import "SGDownloadSession.h"
-#import "SGDownloadQueue.h"
-
-@interface SGDownloadSession () <NSURLSessionDataDelegate>
-
-/** session 可以支持多个任务下载,创建一次就可以 */
-@property (nonatomic,strong) NSURLSession *session;
-
-/** 下载列队管理 专门负责接收到数据时分配给不同operation */
-@property (nonatomic,strong) SGDownloadQueue *queue;
-
-@end
-
-
-@implementation SGDownloadSession
-// 添加任务
-- (void)downloadWithURL:(NSURL *)url begin:(void(^)(NSString *))begin progress:(void(^)(NSInteger,NSInteger))progress complete:(void(^)(NSDictionary *,NSError *))complet {
-    // 交给列队管理
-    [self.queue addDownloadWithSession:self.session URL:url begin:begin progress:progress complete:complet];
-}
-
-- (void)downloadWithURL:(NSURL *)url fileType:(NSInteger)fileType fileSize:(NSInteger)fileSize begin:(void(^)(NSString *))begin progress:(void(^)(NSInteger,NSInteger))progress complete:(void(^)(NSDictionary *,NSError *))complet {
-    // 交给列队管理
-    [self.queue addDownloadWithSession:self.session URL:url fileType:fileType fileSize:fileSize begin:begin progress:progress complete:complet];
-}
-
-#pragma mark - 操作任务接口
-- (void)startDownLoadWithUrl:(NSString *)url {
-    [self.queue operateDownloadWithUrl:url session:self.session handle:DownloadHandleTypeStart];
-}
-
-- (void)supendDownloadWithUrl:(NSString *)url {
-    [self.queue operateDownloadWithUrl:url session:self.session handle:DownloadHandleTypeSuspend];
-}
-
-- (void)cancelDownloadWithUrl:(NSString *)url {
-    [self.queue operateDownloadWithUrl:url session:self.session handle:DownloadHandleTypeCancel];
-}
-
-- (void)cancelAllDownloads {
-    
-    dispatch_async(dispatch_get_global_queue(0, 0), ^{
-        // 取消所有session的任务
-        // 耗时操作
-        // 会调用 URLSession:task:didCompleteWithError: 方法抛出error取消
-        [self.session invalidateAndCancel];
-    });
-}
-- (void)startAllDownloads {
-    [self.queue startAllTasksWithSession:self.session];
-}
-- (void)suspendAllDownloads {
-    [self.queue suspendAllTasksWithSession:self.session];
-}
-
-#pragma mark - <NSURLSessionDataDelegate>
-
-// ssl 服务 证书信任
-- (void)URLSession:(NSURLSession *)session
-didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
- completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler{
-    if(![challenge.protectionSpace.authenticationMethod isEqualToString:@"NSURLAuthenticationMethodServerTrust"]) {
-        return;
-    }
-    
-    // 信任该插件
-    NSURLCredential *credential = [[NSURLCredential alloc] initWithTrust:challenge.protectionSpace.serverTrust];
-    // 第一个参数 告诉系统如何处置
-    completionHandler(NSURLSessionAuthChallengeUseCredential,credential);
-}
-
-//当请求协议是https的时候回调用该方法
-//Challenge 挑战 质询(受保护空间)
-//NSURLAuthenticationMethodServerTrust 服务器信任证书
-- (void)URLSession:(NSURLSession *)session
-              task:(NSURLSessionTask *)task
-didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
- completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * __nullable credential))completionHandler {
-    
-    if(![challenge.protectionSpace.authenticationMethod isEqualToString:@"NSURLAuthenticationMethodServerTrust"]) {
-        return;
-    }
-    
-    // 信任该插件
-    NSURLCredential *credential = [[NSURLCredential alloc] initWithTrust:challenge.protectionSpace.serverTrust];
-    // 第一个参数 告诉系统如何处置
-    completionHandler(NSURLSessionAuthChallengeUseCredential,credential);
-    
-}
-
-
-// 接受到响应调用
-- (void)URLSession:(NSURLSession *)session
-          dataTask:(NSURLSessionDataTask *)dataTask
-didReceiveResponse:(NSURLResponse *)response
- completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler {
-    HLog(@"%@",response);
-    // 将响应交给列队处理
-    [self.queue dataTask:dataTask didReceiveResponse:response];
-    
-    // 允许下载
-    completionHandler(NSURLSessionResponseAllow);
-}
-
-// 接受到数据碎片 的时候调用,调用多次
-- (void)URLSession:(NSURLSession *)session
-          dataTask:(NSURLSessionDataTask *)dataTask
-    didReceiveData:(NSData *)data {
-    // 接收到session 下载碎片交个列队管理
-    [self.queue dataTask:dataTask didReceiveData:data];
-}
-
-// <NSURLSessionDataDelegate> 完成下载
-- (void)URLSession:(NSURLSession *)session
-              task:(NSURLSessionTask *)task
-didCompleteWithError:(nullable NSError *)error {
-    [self.queue task:task didCompleteWithError:error];
-}
-
-- (void)URLSession:(NSURLSession *)session
-              task:(NSURLSessionTask *)task
- needNewBodyStream:(void (^)(NSInputStream * _Nullable bodyStream))completionHandler {
-    
-}
-
-- (void)URLSession:(NSURLSession *)session
-              task:(NSURLSessionTask *)task
-   didSendBodyData:(int64_t)bytesSent
-    totalBytesSent:(int64_t)totalBytesSent
-totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend {
-    
-}
-
-#pragma mark - lazy load
-- (NSURLSession *)session {
-    if (!_session) {
-        NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
-        // 设置请求超时
-        config.timeoutIntervalForRequest = -1;
-//        config.networkServiceType = NSURLNetworkServiceTypeVideo;
-        config.timeoutIntervalForResource = -1;
-//        config.TLSMaximumSupportedProtocol = kSSLProtocolAll;
-        
-        _session = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:[NSOperationQueue currentQueue]];
-    }
-    
-    return _session;
-}
-
-- (SGDownloadQueue *)queue {
-    if (!_queue) {
-        _queue = [[SGDownloadQueue alloc] init];
-        _queue.session = self.session;
-    }
-    return _queue;
-}
-@end