Explorar el Código

1.文件备份添加选择磁盘----在外挂产品创建文件夹成功

huangxiaodong hace 1 año
padre
commit
a50c1d8ddc

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

@@ -6,12 +6,15 @@
 //
 
 #import <UIKit/UIKit.h>
-
+#import "cloudPhoneExtraFileListModel.h"
+//#import "couldPhoneBaseInfoModel.h"
 @interface AppDelegate : UIResponder <UIApplicationDelegate>
 
 //进入云手机后拿到的云手机分辨率  h264课指定 720.0 1280.0
 @property (nonatomic, assign)CGFloat couldPhone_W_PHONE;
 @property (nonatomic, assign)CGFloat couldPhone_H_PHONE;
+@property (nonatomic, strong)cloudPhoneExtraFileListModel* cloudPhoneExtraFileListMod;
+//@property (nonatomic, strong)couldPhoneBaseInfoModel *couldPhoneBaseInfoMod;
 +(AppDelegate*)sharedAppDelegate;
 @end
 

+ 2 - 0
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -42,6 +42,8 @@
 #import "netWorkManager.h"
 #import "newWorkInterface.h"
 
+#import "AppDelegate.h"
+
 #define globalBlock(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), block)
 
 /**宏定义*/

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

@@ -223,14 +223,20 @@
 {
     filePathCreatPopView * filePathCreatPopV = [[filePathCreatPopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
     
-    //[self.view.window addSubview:filePathCreatPopV];
+    if(ksharedAppDelegate.cloudPhoneExtraFileListMod){
+        filePathCreatPopV.outSizeArr =  ksharedAppDelegate.cloudPhoneExtraFileListMod.data;
+    }
+    else{
+        filePathCreatPopV.outSizeArr = @[];
+    }
+    
     [self.view addSubview:filePathCreatPopV];
     
     filePathCreatPopV.curType = _curType;
     
     KWeakSelf
-    filePathCreatPopV.didClickOkBut = ^(NSString * _Nonnull folderName) {
-        [weakSelf didGetFolderName:folderName];
+    filePathCreatPopV.didClickOkBut = ^(NSString * _Nonnull folderName, NSString * _Nonnull DiskPathStr) {
+        [weakSelf didGetFolderName:folderName withDiskPath:DiskPathStr];
     };
 }
 
@@ -246,15 +252,17 @@
 }
 
 #pragma mark
-- (void)didGetFolderName:(NSString*)folderName
+- (void)didGetFolderName:(NSString*)folderName withDiskPath:(NSString*)diskPathStr
 {
     _createFolderNameStr = folderName;
     
-    NSString *curbackupsDefaultPath = [[NSString alloc] initWithFormat:@"sdcard/%@",_createFolderNameStr];
+    //NSString *curbackupsDefaultPath = [[NSString alloc] initWithFormat:@"sdcard/%@",_createFolderNameStr];
+    NSString *curbackupsDefaultPath = [[NSString alloc] initWithFormat:@"%@/%@",diskPathStr,_createFolderNameStr];
+    
     
     [HWDataManager setStringWithKey:Const_photo_backups_default_path value:curbackupsDefaultPath];
     
-    [[NSNotificationCenter defaultCenter] postNotificationName:createFolderBeginNotification object:folderName];/*发送通知*/
+    [[NSNotificationCenter defaultCenter] postNotificationName:createFolderBeginNotification object:curbackupsDefaultPath];/*发送通知*/
 }
 
 - (void)createFolderDoneNotFun:(NSNotification *)notification

+ 5 - 1
创维盒子/双子星云手机/CloudPlayer/Model/cloudPhoneExtraFileListModel.h

@@ -11,7 +11,11 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface cloudPhoneExtraFileModel : SuperModel
 @property (nonatomic, copy) NSString * extraPath;
-@property (nonatomic, assign) long  extraSize;
+@property (nonatomic, copy) NSString * name;
+@property (nonatomic, assign) long  extraAvableSize;
+@property (nonatomic, assign) long  extraTotalSize;
+
+@property (nonatomic, assign) BOOL  isCheckType;
 @end
 
 @protocol cloudPhoneExtraFileModel;

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

@@ -19,6 +19,7 @@
 #import "downloadManager.h"
 #import "uploadFileManager.h"
 #import "cloudPhoneExtraFileListModel.h"
+#import "AppDelegate.h"
 
 @implementation PlayerViewController (otherDelegate)
 
@@ -360,8 +361,7 @@
 - (void)getExtraFilesResponseFun:(NSDictionary *)dataDict
 {
     cloudPhoneExtraFileListModel *model = [[cloudPhoneExtraFileListModel alloc] initWithDictionary:dataDict error:nil];
-    
-    HLog(@"333");
+    ksharedAppDelegate.cloudPhoneExtraFileListMod = model;
 }
 
 @end

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

@@ -207,9 +207,9 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  * @brief 创建文件夹
  *
- * @param folderName  folderName
+ * @param pathAndfolderName  pathAndfolderName
  */
-+ (NSString *)applyForCreateFolderwithFolderName:(NSString *)folderName;
++ (NSString *)applyForCreateFolderwithFolderName:(NSString *)pathAndfolderName;
 
 /**
  * @brief 获取创建的文件夹(备份)

+ 3 - 3
创维盒子/双子星云手机/CloudPlayer/RCCommandHelp.m

@@ -1012,10 +1012,10 @@
     return dataStr;
 }
 
-+ (NSString *)applyForCreateFolderwithFolderName:(NSString *)folderName
++ (NSString *)applyForCreateFolderwithFolderName:(NSString *)pathAndfolderName
 {
-    NSString * name = [[NSString alloc] initWithFormat:@"sdcard/%@",folderName];
-    NSString *dataStr =[NSString stringWithFormat:@"{\"data\":{\"path\":\"%@\"},\"type\":\"mkdir\"}",name];
+    //NSString * name = [[NSString alloc] initWithFormat:@"sdcard/%@",folderName];
+    NSString *dataStr =[NSString stringWithFormat:@"{\"data\":{\"path\":\"%@\"},\"type\":\"mkdir\"}",pathAndfolderName];
     
     if (USENEWCONTROLLCOMMONDNO500)
     {