Преглед изворни кода

rename class for porting in swift

marinofaggiana пре 4 година
родитељ
комит
c7ebe65a9d

+ 6 - 6
Nextcloud.xcodeproj/project.pbxproj

@@ -268,7 +268,7 @@
 		F7AE00F8230E81CB007ACF8A /* NCBrowserWeb.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7AE00F7230E81CB007ACF8A /* NCBrowserWeb.swift */; };
 		F7AE00FA230E81EB007ACF8A /* NCBrowserWeb.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7AE00F9230E81EB007ACF8A /* NCBrowserWeb.storyboard */; };
 		F7AF7633246BEDFE00B86E3C /* TOPasscodeViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7AF7632246BEDFE00B86E3C /* TOPasscodeViewController.framework */; };
-		F7B0C1751EE839A30033AC24 /* NCAutoUpload.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B0C1741EE839A30033AC24 /* NCAutoUpload.m */; };
+		F7B0C1751EE839A30033AC24 /* CCAutoUpload.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B0C1741EE839A30033AC24 /* CCAutoUpload.m */; };
 		F7B174C822FAC0A8000B7579 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B174C722FAC0A8000B7579 /* AppDelegate.m */; };
 		F7B2DEF01F976854007CF4D2 /* NYMnemonic.m in Sources */ = {isa = PBXBuildFile; fileRef = F7B2DEEF1F976785007CF4D2 /* NYMnemonic.m */; };
 		F7B2DEF11F976859007CF4D2 /* english.txt in Resources */ = {isa = PBXBuildFile; fileRef = F7B2DEED1F976785007CF4D2 /* english.txt */; };
@@ -625,8 +625,8 @@
 		F7AE00F7230E81CB007ACF8A /* NCBrowserWeb.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCBrowserWeb.swift; sourceTree = "<group>"; };
 		F7AE00F9230E81EB007ACF8A /* NCBrowserWeb.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCBrowserWeb.storyboard; sourceTree = "<group>"; };
 		F7AF7632246BEDFE00B86E3C /* TOPasscodeViewController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TOPasscodeViewController.framework; path = Carthage/Build/iOS/TOPasscodeViewController.framework; sourceTree = "<group>"; };
-		F7B0C1731EE839A30033AC24 /* NCAutoUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NCAutoUpload.h; sourceTree = "<group>"; };
-		F7B0C1741EE839A30033AC24 /* NCAutoUpload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NCAutoUpload.m; sourceTree = "<group>"; };
+		F7B0C1731EE839A30033AC24 /* CCAutoUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAutoUpload.h; sourceTree = "<group>"; };
+		F7B0C1741EE839A30033AC24 /* CCAutoUpload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCAutoUpload.m; sourceTree = "<group>"; };
 		F7B174C722FAC0A8000B7579 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		F7B1A7761EBB3C8000BFB6D1 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
 		F7B2DEED1F976785007CF4D2 /* english.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = english.txt; sourceTree = "<group>"; };
@@ -1226,8 +1226,8 @@
 			children = (
 				F7BFCCC01B68C21900548E76 /* CCManageLocation.h */,
 				F7BFCCC11B68C21900548E76 /* CCManageLocation.m */,
-				F7B0C1731EE839A30033AC24 /* NCAutoUpload.h */,
-				F7B0C1741EE839A30033AC24 /* NCAutoUpload.m */,
+				F7B0C1731EE839A30033AC24 /* CCAutoUpload.h */,
+				F7B0C1741EE839A30033AC24 /* CCAutoUpload.m */,
 			);
 			path = AutoUpload;
 			sourceTree = "<group>";
@@ -2048,7 +2048,7 @@
 				F77444F8222816D5000D5EB0 /* NCPickerViewController.swift in Sources */,
 				F72A47EC2487B06B005AD489 /* NCOperationQueue.swift in Sources */,
 				F769454622E9F1B0000A798A /* NCShareCommon.swift in Sources */,
-				F7B0C1751EE839A30033AC24 /* NCAutoUpload.m in Sources */,
+				F7B0C1751EE839A30033AC24 /* CCAutoUpload.m in Sources */,
 				F738E8421F90FFD100F95C8E /* NCManageEndToEndEncryption.m in Sources */,
 				F70753F12542A9A200972D44 /* NCViewerImageZoom.swift in Sources */,
 				F7A80BCB252624C100C7CD01 /* NCFileViewInFolder.swift in Sources */,

+ 5 - 5
iOSClient/AppDelegate.m

@@ -23,7 +23,7 @@
 
 #import "AppDelegate.h"
 #import "NCBridgeSwift.h"
-#import "NCAutoUpload.h"
+#import "CCAutoUpload.h"
 #import "NSNotificationCenter+MainThread.h"
 #import "NCPushNotification.h"
 #import <QuartzCore/QuartzCore.h>
@@ -195,7 +195,7 @@
     [self passcodeWithAutomaticallyPromptForBiometricValidation:true];
     
     // Initialize Auto upload
-    [[NCAutoUpload shared] initStateAutoUpload];
+    [[CCAutoUpload shared] initStateAutoUpload];
     
     // Read active directory
     [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterReloadDataSourceNetworkForced object:nil];
@@ -269,11 +269,11 @@
     // Not Photos Video in library ? then align and Init Auto Upload
     NSArray *recordsPhotoLibrary = [[NCManageDatabase shared] getPhotoLibraryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", self.account]];
     if ([recordsPhotoLibrary count] == 0) {
-        [[NCAutoUpload shared] alignPhotoLibrary];
+        [[CCAutoUpload shared] alignPhotoLibrary];
     }
     
     // Start Auto Upload
-    [[NCAutoUpload shared] initStateAutoUpload];
+    [[CCAutoUpload shared] initStateAutoUpload];
     
     // Start services
     [[NCService shared] startRequestServicesServer];
@@ -521,7 +521,7 @@
     [[NCCommunicationCommon shared] writeLog:@"Start perform Fetch With Completion Handler"];
     
     // Verify new photo
-    [[NCAutoUpload shared] initStateAutoUpload];
+    [[CCAutoUpload shared] initStateAutoUpload];
     
     // after 20 sec
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 20 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

+ 3 - 3
iOSClient/AutoUpload/NCAutoUpload.h → iOSClient/AutoUpload/CCAutoUpload.h

@@ -1,5 +1,5 @@
 //
-//  NCAutoUpload.h
+//  CCAutoUpload.h
 //  Nextcloud
 //
 //  Created by Marino Faggiana on 07/06/17.
@@ -27,9 +27,9 @@
 
 @class tableAccount;
 
-@interface NCAutoUpload : NSObject <CCManageLocationDelegate>
+@interface CCAutoUpload : NSObject <CCManageLocationDelegate>
 
-+ (NCAutoUpload *)shared;
++ (CCAutoUpload *)shared;
 
 - (void)initStateAutoUpload;
 - (BOOL)checkIfLocationIsEnabled;

+ 7 - 7
iOSClient/AutoUpload/NCAutoUpload.m → iOSClient/AutoUpload/CCAutoUpload.m

@@ -1,5 +1,5 @@
 //
-//  NCAutoUpload.m
+//  CCAutoUpload.m
 //  Nextcloud
 //
 //  Created by Marino Faggiana on 07/06/17.
@@ -21,14 +21,14 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //
 
-#import "NCAutoUpload.h"
+#import "CCAutoUpload.h"
 #import "AppDelegate.h"
 #import "NCBridgeSwift.h"
 #import "CCHud.h"
 
 #pragma GCC diagnostic ignored "-Wundeclared-selector"
 
-@interface NCAutoUpload ()
+@interface CCAutoUpload ()
 {
     AppDelegate *appDelegate;
     CCHud *_hud;
@@ -36,17 +36,17 @@
 }
 @end
 
-@implementation NCAutoUpload
+@implementation CCAutoUpload
 
-+ (NCAutoUpload *)shared {
++ (CCAutoUpload *)shared {
     
-    static NCAutoUpload *shared;
+    static CCAutoUpload *shared;
     
     @synchronized(self)
     {
         if (!shared) {
             
-            shared = [NCAutoUpload new];
+            shared = [CCAutoUpload new];
             shared->appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         }
         return shared;

+ 1 - 1
iOSClient/Nextcloud-Bridging-Header.h

@@ -4,7 +4,7 @@
 
 #import "AppDelegate.h"
 #import "CCManageAccount.h"
-#import "NCAutoUpload.h"
+#import "CCAutoUpload.h"
 #import "NCEndToEndEncryption.h"
 #import "NYMnemonic.h"
 #import "UIImage+animatedGIF.h"

+ 1 - 1
iOSClient/Settings/CCAdvanced.m

@@ -353,7 +353,7 @@
     
     [CCUtility createDirectoryStandard];
 
-    [[NCAutoUpload shared] alignPhotoLibrary];
+    [[CCAutoUpload shared] alignPhotoLibrary];
 
     // Inizialized home
     [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterInitializeMain object:nil userInfo:nil];

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -24,7 +24,7 @@
 #import "CCManageAccount.h"
 #import "AppDelegate.h"
 #import "CCLogin.h"
-#import "NCAutoUpload.h"
+#import "CCAutoUpload.h"
 #import "NSNotificationCenter+MainThread.h"
 #import "NCBridgeSwift.h"
 

+ 6 - 6
iOSClient/Settings/CCManageAutoUpload.m

@@ -22,7 +22,7 @@
 //
 
 #import "CCManageAutoUpload.h"
-#import "NCAutoUpload.h"
+#import "CCAutoUpload.h"
 #import "AppDelegate.h"
 #import "NCBridgeSwift.h"
 
@@ -261,7 +261,7 @@
             }
             
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
-                [[NCAutoUpload shared] alignPhotoLibrary];
+                [[CCAutoUpload shared] alignPhotoLibrary];
             });
             
         } else {
@@ -287,7 +287,7 @@
             
             BOOL isLocationIsEnabled = NO;
             
-            [[NCAutoUpload shared] checkIfLocationIsEnabled];
+            [[CCAutoUpload shared] checkIfLocationIsEnabled];
                             
             if(isLocationIsEnabled == YES) {
                 
@@ -315,7 +315,7 @@
         
         if ([[rowDescriptor.value valueData] boolValue] == YES) {
             
-            [[NCAutoUpload shared] setupAutoUploadFull];
+            [[CCAutoUpload shared] setupAutoUploadFull];
             [[NCManageDatabase shared] setAccountAutoUploadProperty:@"autoUploadFull" state:YES];
             
         } else {
@@ -331,7 +331,7 @@
 
         if ([[rowDescriptor.value valueData] boolValue] == YES) {
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
-                [[NCAutoUpload shared] alignPhotoLibrary];
+                [[CCAutoUpload shared] alignPhotoLibrary];
             });
         }
     }
@@ -347,7 +347,7 @@
 
         if ([[rowDescriptor.value valueData] boolValue] == YES){
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
-                [[NCAutoUpload shared] alignPhotoLibrary];
+                [[CCAutoUpload shared] alignPhotoLibrary];
             });
         }
     }