فهرست منبع

Remove old code

Marino Faggiana 8 سال پیش
والد
کامیت
5452698df1

+ 0 - 8
Share Ext/CCSharedDBSession.h

@@ -21,16 +21,8 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //
 
-#ifdef CC
-#import <DropboxSDK/DropboxSDK.h>
-#endif
-
 @interface CCSharedDBSession : NSObject
 
 + (CCSharedDBSession *)sharedDBSession;
 
-#ifdef CC
-- (DBSession *)dBSession;
-#endif
-
 @end

+ 0 - 19
Share Ext/CCSharedDBSession.m

@@ -41,26 +41,7 @@
 {
     self = [super init];
     
-#ifdef CC
-    [self dBSession];
-#endif
-    
     return self;
 }
 
-#ifdef CC
-- (DBSession *)dBSession
-{
-    static DBSession* dBSession = nil;
-    if (dBSession == nil) {
-        
-        NSString *appKey = appKeyCryptoCloud;
-        NSString *appSecret = appSecretCryptoCloud;
-      
-        dBSession = [[DBSession alloc] initWithAppKey:appKey appSecret:appSecret root:kDBRootDropbox];
-    }
-    return dBSession;
-}
-#endif
-
 @end

+ 0 - 7
Share Ext/ShareViewController.h

@@ -38,14 +38,7 @@
 
 #import "TableAccount.h"
 
-#ifdef CC
-#import "DBnetworking.h"
-@interface ShareViewController : UIViewController <UITableViewDelegate, CCMoveDelegate, OCNetworkingDelegate, DBnetworkingDelegate, MBProgressHUDDelegate, BKPasscodeViewControllerDelegate, CCNetworkingDelegate>
-#endif
-
-#ifdef NC
 @interface ShareViewController : UIViewController <UITableViewDelegate, CCMoveDelegate, OCNetworkingDelegate, MBProgressHUDDelegate, BKPasscodeViewControllerDelegate, CCNetworkingDelegate>
-#endif
 
 @property (nonatomic, strong) NSOperationQueue *networkingOperationQueue;
 

+ 1 - 54
Share Ext/ShareViewController.m

@@ -23,14 +23,7 @@
 
 #import "ShareViewController.h"
 
-#ifdef CC
-#import "Share_Ext-Swift.h"
-#import "CCSharedDBSession.h"
-#endif
-
-#ifdef NC
 #import "Share_Ext_Nextcloud-Swift.h"
-#endif
 
 @import MobileCoreServices;
 
@@ -79,14 +72,6 @@
         _directoryUser = [CCUtility getDirectoryActiveUser:self.activeUser activeUrl:self.activeUrl];
         _typeCloud = recordAccount.typeCloud;
         
-        /*** DROPBOX ***/
-
-        if ([_typeCloud isEqualToString:typeCloudDropbox]) {
-            
-            _activeUID = recordAccount.uid;
-            _activeAccessToken = recordAccount.token;
-        }
-        
         if ([_activeAccount isEqualToString:[CCUtility getActiveAccountShareExt]]) {
             
             // load
@@ -202,14 +187,7 @@
     // Title
     [self.navigationController.navigationBar setTitleTextAttributes: @{NSForegroundColorAttributeName:self.navigationController.navigationBar.tintColor}];
     
-#ifdef CC
-    self.navigationItem.title = @"Crypto Cloud";
-#endif
-   
-#ifdef NC
     self.navigationItem.title = @"Nextcloud";
-#endif
-    
     self.navigationItem.leftBarButtonItem = leftButtonCancel;
     self.navigationItem.rightBarButtonItems = [[NSArray alloc] initWithObjects:rightButtonUpload, rightButtonEncrypt, nil];
     self.navigationItem.hidesBackButton = YES;
@@ -311,19 +289,6 @@
     [self.hud progress:progress];
 }
 
-- (void)dropboxFailure
-{
-    [self.hud hideHud];
-    
-    UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_comm_error_dropbox_", nil) message:NSLocalizedString(@"_comm_error_dropbox_txt_", nil) preferredStyle:UIAlertControllerStyleAlert];
-    UIAlertAction *ok = [UIAlertAction actionWithTitle: NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault
-                                               handler:^(UIAlertAction * action) {
-                                                   [alert dismissViewControllerAnimated:YES completion:nil];
-                                               }];
-    [alert addAction:ok];
-    [self presentViewController:alert animated:YES completion:nil];
-}
-
 - (void)uploadFileFailure:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector message:(NSString *)message errorCode:(NSInteger)errorCode
 {
     [self.hud hideHud];
@@ -366,19 +331,9 @@
 {
     id operation;
     
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([_typeCloud isEqualToString:typeCloudOwnCloud] || [_typeCloud isEqualToString:typeCloudNextcloud])
         operation = [[OCnetworking alloc] initWithDelegate:self metadataNet:metadataNet withUser:_activeUser withPassword:_activePassword withUrl:_activeUrl withTypeCloud:_typeCloud activityIndicator:NO];
     
-#ifdef CC
-    
-    /*** DROPBOX ***/
-
-    if ([_typeCloud isEqualToString:typeCloudDropbox])
-        operation = [[DBnetworking alloc] initWithDelegate:self metadataNet:metadataNet withUser:_activeUser withPassword:_activePassword withUrl:_activeUrl withActiveUID:_activeUID withActiveAccessToken:_activeAccessToken activityIndicator:NO];
-#endif
-    
     [operation setQueuePriority:metadataNet.priority];
     
     [_networkingOperationQueue addOperation:operation];
@@ -409,15 +364,7 @@
     BKTouchIDManager *touchIDManager = [[BKTouchIDManager alloc] initWithKeychainServiceName:BKPasscodeKeychainServiceName];
     touchIDManager.promptText = NSLocalizedString(@"_scan_fingerprint_", nil);
     viewController.touchIDManager = touchIDManager;
-    
-#ifdef CC
-    viewController.title = @"Crypto Cloud";
-#endif
-    
-#ifdef NC
-     viewController.title = @"Nextcloud";
-#endif
-    
+    viewController.title = @"Nextcloud";
     viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(passcodeViewCloseButtonPressed:)];
     viewController.navigationItem.leftBarButtonItem.tintColor = COLOR_ENCRYPTED;
     

+ 0 - 15
iOSClient/AppDelegate.h

@@ -25,10 +25,6 @@
 #import <CoreData/CoreData.h>
 #import <MagicalRecord/MagicalRecord.h>
 
-#ifdef CC
-#import <DropboxSDK/DropboxSDK.h>
-#endif
-
 #import "OCCapabilities.h"
 #import "BKPasscodeLockScreenManager.h"
 #import "REMenu.h"
@@ -44,13 +40,7 @@
 #import "CCPhotosCameraUpload.h"
 #import "CCFavorite.h"
 
-#ifdef CC
-@interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, DBRestClientDelegate, LMMediaPlayerViewDelegate, TWMessageBarStyleSheet>
-#endif
-
-#ifdef NC
 @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, LMMediaPlayerViewDelegate, TWMessageBarStyleSheet>
-#endif
 
 // Timer 5 sec.
 @property (nonatomic, strong) NSTimer *timerVerifyProcess;
@@ -73,11 +63,6 @@
 @property double currentLatitude;
 @property double currentLongitude;
 
-#ifdef CC
-// Dropbox & Networking Session
-@property (nonatomic, strong) DBRestClient *restClient;
-#endif
-
 // ownCloud & Nextcloud
 @property BOOL hasServerForbiddenCharactersSupport;
 @property BOOL hasServerShareSupport;

+ 0 - 161
iOSClient/AppDelegate.m

@@ -130,15 +130,6 @@
     _netQueueUploadWWan.name = netQueueUploadWWanName;
     _netQueueUploadWWan.maxConcurrentOperationCount = maxConcurrentOperationDownloadUpload;
     
-#ifdef CC
-    // Inizialize DBSession for Dropbox
-    NSString *appKey = appKeyCryptoCloud;
-    NSString *appSecret = appSecretCryptoCloud;
-    
-    DBSession *dbSession = [[DBSession alloc] initWithAppKey:appKey appSecret:appSecret root:kDBRootDropbox];
-    [DBSession setSharedSession:dbSession];
-#endif
-    
     // Add notification change session
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sessionChanged:) name:networkingSessionNotification object:nil];
     
@@ -826,71 +817,29 @@
     // netQueueDownload
     for (NSOperation *operation in [app.netQueueDownload operations]) {
         
-        /*** NEXTCLOUD OWNCLOUD ***/
-        
         if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud])
             if (((OCnetworking *)operation).isExecuting == NO) _queueNunDownload++;
-        
-#ifdef CC
-        
-        /*** DROPBOX ***/
-        
-        if ([app.typeCloud isEqualToString:typeCloudDropbox])
-            if (((DBnetworking *)operation).isExecuting == NO) _queueNunDownload++;
-        
-#endif
     }
     
     // netQueueDownloadWWan
     for (NSOperation *operation in [app.netQueueDownloadWWan operations]) {
         
-        /*** NEXTCLOUD OWNCLOUD ***/
-        
         if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud])
             if (((OCnetworking *)operation).isExecuting == NO) _queueNumDownloadWWan++;
-        
-#ifdef CC
-        
-        /*** DROPBOX ***/
-        
-        if ([app.typeCloud isEqualToString:typeCloudDropbox])
-            if (((DBnetworking *)operation).isExecuting == NO) _queueNumDownloadWWan++;
-        
-#endif
     }
     
     // netQueueUpload
     for (NSOperation *operation in [app.netQueueUpload operations]) {
         
-        /*** NEXTCLOUD OWNCLOUD ***/
-        
         if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud])
             if (((OCnetworking *)operation).isExecuting == NO) _queueNumUpload++;
-        
-#ifdef CC
-        
-        /*** DROPBOX ***/
-        
-        if ([app.typeCloud isEqualToString:typeCloudDropbox])
-            if (((DBnetworking *)operation).isExecuting == NO) _queueNumUpload++;
-#endif
     }
     
     // netQueueUploadWWan
     for (NSOperation *operation in [app.netQueueUploadWWan operations]) {
         
-        /*** NEXTCLOUD OWNCLOUD ***/
-        
         if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud])
             if (((OCnetworking *)operation).isExecuting == NO) _queueNumUploadWWan++;
-        
-#ifdef CC
-        
-        /*** DROPBOX ***/
-        
-        if ([app.typeCloud isEqualToString:typeCloudDropbox])
-            if (((DBnetworking *)operation).isExecuting == NO) _queueNumUploadWWan++;
-#endif
     }
     
     // Total
@@ -1131,19 +1080,9 @@
     if (netQueue == _netQueue)
         activityIndicator = YES;
     
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([_typeCloud isEqualToString:typeCloudOwnCloud] || [_typeCloud isEqualToString:typeCloudNextcloud])
         operation = [[OCnetworking alloc] initWithDelegate:delegate metadataNet:metadataNet withUser:_activeUser withPassword:_activePassword withUrl:_activeUrl withTypeCloud:_typeCloud activityIndicator:activityIndicator];
     
-#ifdef CC
-    
-    /*** DROPBOX ***/
-    
-    if ([_typeCloud isEqualToString:typeCloudDropbox])
-        operation = [[DBnetworking alloc] initWithDelegate:delegate metadataNet:metadataNet withUser:_activeUser withPassword:_activePassword withUrl:_activeUrl withActiveUID:_activeUID withActiveAccessToken:_activeAccessToken activityIndicator:activityIndicator];
-#endif
-    
     [operation setQueuePriority:metadataNet.priority];
     
     [netQueue addOperation:operation];
@@ -1153,8 +1092,6 @@
 {
     NSMutableArray *metadatasNet = [[NSMutableArray alloc] init];
     
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
         
         for (OCnetworking *operation in [self.netQueueDownload operations])
@@ -1166,23 +1103,6 @@
                 [metadatasNet addObject:[operation.metadataNet copy]];
     }
     
-#ifdef CC
-    
-    /*** DROPBOX ***/
-    
-    if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        for (DBnetworking *operation in [self.netQueueDownload operations])
-            if ([operation.metadataNet.selector isEqualToString:selector])
-                [metadatasNet addObject:operation.metadataNet];
-        
-        for (DBnetworking *operation in [self.netQueueDownloadWWan operations])
-            if ([operation.metadataNet.selector isEqualToString:selector])
-                [metadatasNet addObject:operation.metadataNet];
-    }
-    
-#endif
-    
     return metadatasNet;
 }
 
@@ -1190,8 +1110,6 @@
 {
     NSMutableArray *metadatasNet = [[NSMutableArray alloc] init];
     
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
         
         for (OCnetworking *operation in [self.netQueueUpload operations])
@@ -1203,23 +1121,6 @@
                 [metadatasNet addObject:[operation.metadataNet copy]];
     }
     
-#ifdef CC
-
-    /*** DROPBOX ***/
-    
-    if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        for (DBnetworking *operation in [self.netQueueUpload operations])
-            if ([operation.metadataNet.selector isEqualToString:selector])
-                [metadatasNet addObject:operation.metadataNet];
-        
-        for (DBnetworking *operation in [self.netQueueUploadWWan operations])
-            if ([operation.metadataNet.selector isEqualToString:selector])
-                [metadatasNet addObject:operation.metadataNet];
-    }
-    
-#endif
-    
     return metadatasNet;
 }
 
@@ -1407,41 +1308,6 @@
     });
 }
 
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark ===== Dropbox =====
-#pragma --------------------------------------------------------------------------------------------
-
-#ifdef CC
-- (void)sessionDidReceiveAuthorizationFailure:(DBSession*)session userId:(NSString *)userId
-{
-    
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"messageLoginIncorrect" object:nil];
-}
-
-- (void)restClient:(DBRestClient *)client loadedAccountInfo:(DBAccountInfo *)info
-{
-    NSString *account = [NSString stringWithFormat:@"%@ %@", [info email], typeCloudDropbox];
-    
-    [CCCoreData deleteAccount:account];
-        
-    // new account
-    [CCCoreData addAccount:account url:@"https://www.dropbox.com" user:[info email] password:nil uid:info.userId typeCloud:typeCloudDropbox];
-    TableAccount *tableAccount = [CCCoreData setActiveAccount:account];
-    if (tableAccount)
-        [self settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activePassword:tableAccount.password activeUID:tableAccount.uid activeAccessToken:tableAccount.token typeCloud:tableAccount.typeCloud];
-    
-    NSString *uuid = [CCUtility getUUID];
-    NSString *passcode = [CCUtility getKeyChainPasscodeForUUID:uuid];
-    
-    // update ManageAccount
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"updateFormManageAccount" object:nil];
-    
-    // Login correct
-    if ([passcode length] > 0  && [self.activeAccount length] > 0)
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"messageLoginCorrect" object:nil];
-}
-#endif
-
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Open CCUploadFromOtherUpp  =====
 #pragma --------------------------------------------------------------------------------------------
@@ -1456,34 +1322,7 @@
 {
     NSLog(@"[LOG] URL from %@ application", sourceApplication);
     NSLog(@"[LOG] the path is: %@", url.path);
-    
-#ifdef CC
-    /*************************************** DROPBOX *********************************/
-    
-    if ([[DBSession sharedSession] handleOpenURL:url]) {
-        NSString *query = url.query;
-        if ([[url absoluteString] rangeOfString:@"cancel"].location == NSNotFound) {
-            NSDictionary *urlData = [DBSession parseURLParams:query];
-            NSString *uid = [urlData objectForKey:@"uid"];
-            if ([[[DBSession sharedSession] userIds] containsObject:uid]) {
-                
-                self.restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession] userId:uid];
-                self.restClient.delegate = self;
-                
-                [self.restClient loadAccountInfo];
-            }
-            
-        } else {
-            
-            // user cancelled the login
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"messageLoginIncorrect" object:nil];
-        }
         
-        return YES;
-    }
-    /*********************************************************************************/
-#endif
-    
     NSArray *splitedUrl = [url.path componentsSeparatedByString:@"/"];
     self.fileNameUpload = [NSString stringWithFormat:@"%@",[splitedUrl objectAtIndex:([splitedUrl count]-1)]];
     NSString *passcode = [CCUtility getKeyChainPasscodeForUUID:[CCUtility getUUID]];

+ 0 - 1
iOSClient/CCGlobal.h

@@ -30,7 +30,6 @@ extern NSString *const appDatabase;
 extern NSString *const appCertificates;
 
 extern NSString *const webDAV;
-extern NSString *const typeCloudDropbox;
 extern NSString *const typeCloudNextcloud;
 extern NSString *const typeCloudOwnCloud;
 

+ 0 - 4
iOSClient/CCGlobal.m

@@ -32,10 +32,6 @@ NSString *const appCertificates = @"Library/Application Support/Certificates";
 NSString *const webDAV = @"/remote.php/webdav";
 NSString *const typeCloudNextcloud = @"nextcloud";
 NSString *const typeCloudOwnCloud = @"owncloud";
-NSString *const typeCloudDropbox = @"dropbox";
-
-NSString *const urlBaseDownloadDB = @"https://api-content.dropbox.com/1/files/dropbox";
-NSString *const urlBaseUploadDB = @"https://api-content.dropbox.com/1/files_put/dropbox";
 
 // BKPasscode
 NSString *const BKPasscodeKeychainServiceName = @"Crypto Cloud";

+ 2 - 47
iOSClient/FileSystem/CCCoreData.m

@@ -111,9 +111,7 @@
 + (TableAccount *)setActiveFirstAccountNextcloudOwncloud
 {
     NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
+        
     TableAccount *record = [TableAccount MR_findFirstWithPredicate:[NSPredicate predicateWithFormat:@"(typeCloud == %@) OR (typeCloud == %@)", typeCloudNextcloud, typeCloudOwnCloud] inContext:context];
     
     if (record)
@@ -129,16 +127,7 @@
     
     NSManagedObjectContext *context = [NSManagedObjectContext MR_defaultContext];
     
-#ifdef CC
-    records = [TableAccount MR_findAllInContext:context];
-#endif
-    
-#ifdef NC
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     records = [TableAccount MR_findAllWithPredicate:[NSPredicate predicateWithFormat:@"(typeCloud == %@) OR (typeCloud == %@)", typeCloudNextcloud, typeCloudOwnCloud] inContext:context];
-#endif
     
     for (TableAccount *tableAccount in records)
         [accounts addObject:tableAccount.account];
@@ -159,17 +148,8 @@
 
     NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"account" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)];
     NSArray *records;
-    
-#ifdef CC
-    records = [TableAccount MR_findAllInContext:context];
-#endif
-    
-#ifdef NC
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
+        
     records = [TableAccount MR_findAllWithPredicate:[NSPredicate predicateWithFormat:@"(typeCloud == %@) OR (typeCloud == %@)", typeCloudNextcloud, typeCloudOwnCloud] inContext:context];
-#endif
     
     records = [NSMutableArray arrayWithArray:[records sortedArrayUsingDescriptors:[[NSArray alloc] initWithObjects:descriptor, nil]]];
     
@@ -182,13 +162,8 @@
 
     TableAccount *record = [TableAccount MR_findFirstByAttribute:@"active" withValue:[NSNumber numberWithBool:YES] inContext:context];
     
-#ifdef NC
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([record.typeCloud isEqualToString:typeCloudNextcloud] == NO && [record.typeCloud isEqualToString:typeCloudOwnCloud] == NO)
         return [self setActiveFirstAccountNextcloudOwncloud];
-#endif
     
     if (record) return record;
     else return nil;
@@ -1683,26 +1658,6 @@
     // rimuovi tutte le condivisioni
     [self removeAllShareActiveAccount:activeAccount sharesLink:sharesLink sharesUserAndGroup:sharesUserAndGroup];
     
-    /*** DROPBOX ***/
-    
-    if ([typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        // Link
-        for (NSString *url in items) {
-            
-            NSDictionary *item = [items objectForKey:url];
-            
-            NSString *path = [item objectForKey:@"path"];
-            NSString *fileName = [path lastPathComponent];
-            NSString *serverUrl = [path stringByDeletingLastPathComponent];
-            
-            if ([item objectForKey:@"url"])
-                [self setShareLink:[item objectForKey:@"url"] fileName:fileName serverUrl:serverUrl sharesLink:sharesLink activeAccount:activeAccount];
-        }
-    }
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([typeCloud isEqualToString:typeCloudOwnCloud] || [typeCloud isEqualToString:typeCloudNextcloud]) {
         
         NSMutableArray *itemsLink = [[NSMutableArray alloc] init];

+ 0 - 6
iOSClient/Login/CCLogin.m

@@ -43,14 +43,8 @@
     
     self.brand.image = [UIImage imageNamed:image_launchscreen];
     
-#ifdef CC
-    _nextcloud.hidden = YES;
-#endif
-    
-#ifdef NC
     _owncloud.hidden = YES;
     _dropbox.hidden = YES;
-#endif
     
     [_nextcloud setTitle:[NSString stringWithFormat:@"     %@", NSLocalizedString(@"_add_your_nextcloud_", nil)] forState:UIControlStateNormal];
     [_owncloud setTitle:[NSString stringWithFormat:@"     %@", NSLocalizedString(@"_add_your_owncloud_", nil)] forState:UIControlStateNormal];

+ 0 - 10
iOSClient/Main/CCMain.h

@@ -61,17 +61,7 @@
 #import "CCPassaporto.h"
 #import "CCPatenteGuida.h"
 
-#ifdef CC
-#import "CCShareDB.h"
-
-@interface CCMain : UITableViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate, UIGestureRecognizerDelegate, UIDocumentInteractionControllerDelegate, UIViewControllerPreviewingDelegate, CCMoveDelegate, CTAssetsPickerControllerDelegate, BKPasscodeViewControllerDelegate, UISplitViewControllerDelegate, UIPopoverControllerDelegate, CCNetworkingDelegate, CCShareOCDelegate, CCShareDBDelegate, CCAccountWebDelegate, CCBancomatDelegate, CCCartaDiCreditoDelegate, CCCartaIdentitaDelegate, CCContoCorrenteDelegate, CCNoteDelegate, CCPassaportoDelegate, CCPatenteGuidaDelegate, CCDetailViewDelegate, CCPeekPopDelegate, UIDocumentMenuDelegate, UIDocumentPickerDelegate>
-
-@property (nonatomic, weak) CCShareDB* shareDB;
-#endif
-
-#ifdef NC
 @interface CCMain : UITableViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate, UIGestureRecognizerDelegate, UIDocumentInteractionControllerDelegate, UIViewControllerPreviewingDelegate, CCMoveDelegate, CTAssetsPickerControllerDelegate, BKPasscodeViewControllerDelegate, UISplitViewControllerDelegate, UIPopoverControllerDelegate, CCNetworkingDelegate, CCShareOCDelegate, CCAccountWebDelegate, CCBancomatDelegate, CCCartaDiCreditoDelegate, CCCartaIdentitaDelegate, CCContoCorrenteDelegate, CCNoteDelegate, CCPassaportoDelegate, CCPatenteGuidaDelegate, CCDetailViewDelegate, CCPeekPopDelegate, UIDocumentMenuDelegate, UIDocumentPickerDelegate>
-#endif
 
 @property (nonatomic ,strong) NSString *localServerUrl;
 

+ 3 - 205
iOSClient/Main/CCMain.m

@@ -958,11 +958,6 @@
 
 - (void)changePasswordAccount
 {
-    if (_loginVC || [app.typeCloud isEqualToString:typeCloudDropbox])
-        return;
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([app.typeCloud isEqualToString:typeCloudNextcloud])
         _loginVC = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"CCLoginNextcloud"];
     
@@ -1050,15 +1045,6 @@
     app.hasServerForbiddenCharactersSupport = NO;
     app.hasServerShareSupport = YES;
     
-    /*** DROPBOX ***/
-
-    if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-                
-        [self requestSharedByServer];
-    }
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
         
         metadataNet.action = actionGetFeaturesSuppServer;
@@ -1069,22 +1055,6 @@
     }
 }
 
-- (void)dropboxFailure
-{
-    [_hud hideHud];
-    
-    [app cancelAllOperations];
-    [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
-    
-    UIAlertController * alert= [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_comm_error_dropbox_", nil) message:NSLocalizedString(@"_comm_error_dropbox_txt_", nil) preferredStyle:UIAlertControllerStyleAlert];
-    UIAlertAction* ok = [UIAlertAction actionWithTitle: NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault
-                                               handler:^(UIAlertAction * action) {
-                                                   [alert dismissViewControllerAnimated:YES completion:nil];
-                                               }];
-    [alert addAction:ok];
-    [self presentViewController:alert animated:YES completion:nil];
-}
-
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ==== Download Thumbnail ====
 #pragma --------------------------------------------------------------------------------------------
@@ -1125,13 +1095,6 @@
     metadataNet.action = actionDownloadThumbnail;
     metadataNet.fileID = metadata.fileID;
 
-    /*** DROPBOX ***/
-
-    if ([metadata.typeCloud isEqualToString:typeCloudDropbox])
-        metadataNet.fileName = metadata.fileName;
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([metadata.typeCloud isEqualToString:typeCloudOwnCloud] || [metadata.typeCloud isEqualToString:typeCloudNextcloud])
         metadataNet.fileName = [CCUtility returnFileNamePathFromFileName:metadata.fileName serverUrl:_localServerUrl activeUrl:app.activeUrl typeCloud:app.typeCloud];
     
@@ -1319,22 +1282,10 @@
         
         for (NSOperation *operation in [app.netQueue operations]) {
             
-            /*** NEXTCLOUD OWNCLOUD ***/
-            
             if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
                 if ([((OCnetworking *)operation).metadataNet.selector isEqualToString:selectorLoadPlist])
                     countSelectorLoadPlist++;
             }
-            
-#ifdef CC
-            /*** DROPBOX ***/
-
-            if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-                if ([((DBnetworking *)operation).metadataNet.selector isEqualToString:selectorLoadPlist])
-                    countSelectorLoadPlist++;
-            }
-#endif
-            
         }
         
         if ((countSelectorLoadPlist == 0 || countSelectorLoadPlist % maxConcurrentOperation == 0) && [metadata.directoryID isEqualToString:_localDirectoryID]) {
@@ -1491,30 +1442,6 @@
             
             CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
             
-            /*** DROPBOX ***/
-
-            if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-                
-                metadataNet.action = actionUploadAsset;
-                metadataNet.assetLocalItentifier = asset.localIdentifier;
-                metadataNet.cryptated = cryptated;
-                metadataNet.errorCode = 0;
-                metadataNet.fileName = fileNameUpload;
-                metadataNet.priority = NSOperationQueuePriorityVeryHigh;
-                metadataNet.selector = selectorUploadFile;
-                metadataNet.selectorPost = nil;
-                metadataNet.session = session;
-                metadataNet.serverUrl = serverUrl;
-                metadataNet.taskStatus = taskStatusResume;
-                
-                if ([metadataNet.session containsString:@"wwan"])
-                    [app addNetworkingOperationQueue:app.netQueueUploadWWan delegate:self metadataNet:metadataNet];
-                else
-                    [app addNetworkingOperationQueue:app.netQueueUpload delegate:self metadataNet:metadataNet];
-            }
-            
-            /*** NEXTCLOUD OWNCLOUD ***/
-            
             if ([app.typeCloud isEqualToString:typeCloudNextcloud] || [app.typeCloud isEqualToString:typeCloudOwnCloud]) {
             
                 metadataNet.action = actionReadFile;
@@ -1956,23 +1883,6 @@
 {
     CCMetadata *metadata = [CCCoreData getMetadataWithPreficate:[NSPredicate predicateWithFormat:@"(fileID == %@) AND (account == %@)", metadataNet.fileID, app.activeAccount] context:nil];
     
-    /*** DROPBOX ***/
-
-    if ([app.typeCloud isEqualToString:typeCloudDropbox] && [metadataNet.selector isEqualToString:selectorMoveCrypto] == NO) {
-        
-        // Drop Box cambia rev, quindi cambio etav e rev da metadata.rev e metadata.fileID ----> revTo
-        [CCCoreData changeRevFileIDDB:metadata.rev revTo:revTo activeAccount:app.activeAccount];
-            
-        // change file
-        [[NSFileManager defaultManager] moveItemAtPath:[NSString stringWithFormat:@"%@/%@",app.directoryUser,metadata.fileID] toPath:[NSString stringWithFormat:@"%@/%@",app.directoryUser,revTo] error:nil];
-        
-        UIImage *image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico",app.directoryUser,metadata.fileID]];
-        [CCGraphics saveIcoWithFileID:revTo image:image writeToFile:nil copy:NO move:YES fromPath:[NSString stringWithFormat:@"%@/%@.ico",app.directoryUser,metadata.fileID] toPath:[NSString stringWithFormat:@"%@/%@.ico",app.directoryUser,revTo]];
-        
-        metadata.fileID = revTo;
-        metadata.rev = revTo;
-    }
-
     if (metadata.directory == YES)
         [CCCoreData renameDirectory:[CCUtility stringAppendServerUrl:metadataNet.serverUrl addServerUrl:metadataNet.fileName] serverUrlTo:[CCUtility stringAppendServerUrl:metadataNet.serverUrl addServerUrl:metadataNet.fileNameTo] activeAccount:app.activeAccount];
     else
@@ -2101,18 +2011,6 @@
         NSString *directoryID = metadataNet.directoryID;
         NSString *directoryIDTo = metadataNet.directoryIDTo;
 
-        /*** DROPBOX ***/
-
-        if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-        
-            // Drop Box change rev
-            [CCCoreData changeRevFileIDDB:metadataNet.rev revTo:revTo activeAccount:app.activeAccount];
-            
-            // fileID -> rev ;
-            [[NSFileManager defaultManager] moveItemAtPath:[NSString stringWithFormat:@"%@/%@",app.directoryUser,metadataNet.fileID] toPath:[NSString stringWithFormat:@"%@/%@",app.directoryUser,revTo] error:nil];
-            [[NSFileManager defaultManager] moveItemAtPath:[NSString stringWithFormat:@"%@/%@.ico",app.directoryUser,metadataNet.fileID] toPath:[NSString stringWithFormat:@"%@/%@.ico",app.directoryUser,revTo] error:nil];
-        }
-    
         // FILE -> Metadata
         if (metadataNet.directory == NO) {
             
@@ -2737,38 +2635,6 @@
     
     [CCCoreData updateShare:items sharesLink:app.sharesLink sharesUserAndGroup:app.sharesUserAndGroup activeAccount:app.activeAccount activeUrl:app.activeUrl typeCloud:app.typeCloud];
     
-#ifdef CC
-    
-    /*** DROPBOX ***/
-
-    if (openWindow && [app.typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        if (_shareDB) {
-                
-            [_shareDB reloadData];
-                
-        } else {
-            
-            CCMetadata *metadata = [CCCoreData getMetadataWithPreficate:[NSPredicate predicateWithFormat:@"(fileID == %@) AND (account == %@)", metadataNet.fileID, app.activeAccount] context:nil];
-            
-            // Apriamo la view
-            _shareDB = [[UIStoryboard storyboardWithName:@"CCShare" bundle:nil] instantiateViewControllerWithIdentifier:@"CCShareDB"];
-            
-            _shareDB.delegate = self;
-            _shareDB.metadata = metadata;
-            _shareDB.serverUrl = metadataNet.serverUrl;
-            
-            _shareDB.shareLink = [app.sharesLink objectForKey:metadata.fileID];
-
-            [_shareDB setModalPresentationStyle:UIModalPresentationFormSheet];
-            [self presentViewController:_shareDB animated:YES completion:nil];
-        }
-    }
-    
-#endif
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if (openWindow && ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud])) {
             
         if (_shareOC) {
@@ -2815,39 +2681,16 @@
     if (_shareOC)
         [_shareOC reloadData];
     
-#ifdef CC
-    if (_shareDB)
-        [_shareDB reloadData];
-#endif
-    
     [self tableViewReload];
     
     if (errorCode == 401)
         [self changePasswordAccount];
 }
 
-// Dropbox
-- (void)shareSuccessDropBox:(CCMetadataNet *)metadataNet link:(NSString *)link
-{
-    [_hud hideHud];
-    
-    // salviamo il link
-    [CCCoreData setShareLink:link fileName:metadataNet.fileName serverUrl:metadataNet.serverUrl sharesLink:app.sharesLink activeAccount:app.activeAccount];
-    
-#ifdef CC
-    if (_shareDB)
-        [_shareDB reloadData];
-#endif
-    
-    [self tableViewReload];
-}
-
 - (void)share:(CCMetadata *)metadata serverUrl:(NSString *)serverUrl password:(NSString *)password
 {
     CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
+        
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
         
         metadataNet.action = actionShare;
@@ -2861,30 +2704,6 @@
         [app addNetworkingOperationQueue:app.netQueue delegate:self metadataNet:metadataNet];
     }
 
-    /*** DROPBOX ***/
-
-    if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        metadataNet.fileID = metadata.fileID;
-        metadataNet.fileName = metadata.fileName;
-        metadataNet.fileNamePrint = metadata.fileNamePrint;
-        metadataNet.serverUrl = serverUrl;
-        
-        NSString *shareLink = [app.sharesLink objectForKey:metadata.fileID];
-        
-        if ([shareLink length] > 0) {
-                        
-            [self shareSuccessDropBox:metadataNet link:shareLink];
-            
-        } else {
-            
-            metadataNet.action = actionShare;
-            metadataNet.selector = selectorShare;
-            
-            [app addNetworkingOperationQueue:app.netQueue delegate:self metadataNet:metadataNet];
-        }
-    }
-    
     [_hud visibleHudTitle:NSLocalizedString(@"_creating_sharing_", nil) mode:MBProgressHUDModeIndeterminate color:nil];
 }
 
@@ -2894,24 +2713,13 @@
     
     // rimuoviamo la condivisione da db
     [CCCoreData unShare:metadataNet.share fileName:metadataNet.fileName serverUrl:metadataNet.serverUrl sharesLink:app.sharesLink sharesUserAndGroup:app.sharesUserAndGroup activeAccount:app.activeAccount];
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
+        
     if ([app.typeCloud isEqualToString:typeCloudNextcloud] && _shareOC)
         [_shareOC reloadData];
 
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] && _shareOC)
         [_shareOC reloadData];
     
-#ifdef CC
-    
-    /*** DROPBOX ***/
-
-    if ([app.typeCloud isEqualToString:typeCloudDropbox] && _shareDB)
-        [_shareDB reloadData];
-    
-#endif
-    
     [self tableViewReload];
 }
 
@@ -2936,8 +2744,6 @@
 {
     CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
     
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
         
         metadataNet.action = actionUpdateShare;
@@ -2973,9 +2779,7 @@
 - (void)getUserAndGroup:(NSString *)find
 {
     CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:app.activeAccount];
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
+        
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
         
         metadataNet.action = actionGetUserAndGroup;
@@ -3234,12 +3038,6 @@
         item.title = [record.account stringByTruncatingToWidth:self.view.bounds.size.width - 100 withFont:[UIFont systemFontOfSize:12.0] atEnd:YES];
         item.argument = record.account;
         
-        /*** DROPBOX ***/
-
-        if ([record.typeCloud isEqualToString:typeCloudDropbox]) item.image = [UIImage imageNamed:image_typeCloudDropbox];
-        
-        /*** NEXTCLOUD OWNCLOUD ***/
-        
         if ([record.typeCloud isEqualToString:typeCloudNextcloud]) item.image = [UIImage imageNamed:image_typeCloudNextcloud];
         if ([record.typeCloud isEqualToString:typeCloudOwnCloud]) item.image = [UIImage imageNamed:image_typeCloudOwnCloud];
         

+ 0 - 10
iOSClient/Move/CCMove.h

@@ -30,19 +30,9 @@
 #import "OCNetworking.h"
 #import "CCHud.h"
 
-#ifdef CC
-#import "DBnetworking.h"
-
-@protocol CCMoveDelegate;
-
-@interface CCMove : UITableViewController <UIAlertViewDelegate, UITableViewDelegate, OCNetworkingDelegate, DBnetworkingDelegate, BKPasscodeViewControllerDelegate>
-#endif
-
-#ifdef NC
 @protocol CCMoveDelegate;
 
 @interface CCMove : UITableViewController <UIAlertViewDelegate, UITableViewDelegate, OCNetworkingDelegate, BKPasscodeViewControllerDelegate>
-#endif
 
 @property (nonatomic, weak) id <CCMoveDelegate> delegate;
 @property (nonatomic, strong) NSOperationQueue *networkingOperationQueue;

+ 0 - 29
iOSClient/Move/CCMove.m

@@ -221,23 +221,8 @@
 
 // MARK: - NetWorking
 
-- (void)dropboxFailure
-{
-    [_hud hideHud];
-    
-    UIAlertController * alert= [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_comm_error_dropbox_", nil) message:NSLocalizedString(@"_comm_error_dropbox_txt_", nil) preferredStyle:UIAlertControllerStyleAlert];
-    UIAlertAction* ok = [UIAlertAction actionWithTitle: NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault
-                                               handler:^(UIAlertAction * action) {
-                                                   [alert dismissViewControllerAnimated:YES completion:nil];
-                                               }];
-    [alert addAction:ok];
-    [self presentViewController:alert animated:YES completion:nil];
-}
-
 - (void)addNetworkingQueue:(CCMetadataNet *)metadataNet
 {
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([typeCloud isEqualToString:typeCloudOwnCloud] || [typeCloud isEqualToString:typeCloudNextcloud]) {
         
         OCnetworking *operation = [[OCnetworking alloc] initWithDelegate:self metadataNet:metadataNet withUser:activeUser withPassword:activePassword withUrl:activeUrl withTypeCloud:typeCloud activityIndicator:NO];
@@ -245,20 +230,6 @@
         _networkingOperationQueue.maxConcurrentOperationCount = maxConcurrentOperation;
         [_networkingOperationQueue addOperation:operation];
     }
-    
-#ifdef CC
-    
-    /*** DROPBOX ***/
-
-    if ([typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        DBnetworking *operation = [[DBnetworking alloc] initWithDelegate:self metadataNet:metadataNet withUser:activeUser withPassword:activePassword withUrl:activeUrl withActiveUID:activeUID withActiveAccessToken:activeAccessToken activityIndicator:NO];
-        
-        _networkingOperationQueue.maxConcurrentOperationCount = maxConcurrentOperation;
-        [_networkingOperationQueue addOperation:operation];
-    }
-#endif
-    
 }
 
 // MARK: - Download File

+ 0 - 6
iOSClient/Networking/CCNetworking.h

@@ -73,12 +73,6 @@
 - (void)verifyUploadInProgress;
 - (void)automaticUploadInError;
 
-#ifdef CC
-// Dropbox
-- (NSString *)apiAuthorizationHeader:(NSInteger)version;
-- (void)requestAccessTokenOAuth2;
-#endif
-
 @end
 
 @protocol CCNetworkingDelegate <NSObject>

+ 0 - 181
iOSClient/Networking/CCNetworking.m

@@ -29,11 +29,6 @@
 
 #import "NSDate+ISO8601.h"
 
-
-#ifdef CC
-#import "CCSharedDBSession.h"
-#endif
-
 @interface CCNetworking ()
 {
     NSManagedObjectContext *_context;
@@ -427,8 +422,6 @@
     
     if ([task isKindOfClass:[NSURLSessionDownloadTask class]]) {
         
-        /*** NEXTCLOUD OWNCLOUD ***/
-        
         if ([_typeCloud isEqualToString:typeCloudOwnCloud] || [_typeCloud isEqualToString:typeCloudNextcloud]) {
             
             NSDictionary *fields = [httpResponse allHeaderFields];
@@ -438,24 +431,6 @@
                 date = [dateFormatter dateFromString:[fields objectForKey:@"Date"]];
             }
         }
-
-#ifdef CC
-        
-        /*** DROPBOX ***/
-        
-        if ([_typeCloud isEqualToString:typeCloudDropbox]) {
-            
-            NSData *data = [_taskData objectForKey:[NSNumber numberWithLong:task.taskIdentifier]];
-            
-            if (errorCode == 0 && data) {
-                NSDictionary *response = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
-                DBMetadata *dbMetadata = [[DBMetadata alloc] initWithDictionary:response];
-                fileID = dbMetadata.rev;
-                date = dbMetadata.lastModifiedDate;
-            }
-        }
-#endif
-        
         
         dispatch_async(dispatch_get_main_queue(), ^{
         
@@ -471,8 +446,6 @@
     
     if ([task isKindOfClass:[NSURLSessionUploadTask class]]) {
         
-        /*** NEXTCLOUD OWNCLOUD ***/
-        
         if ([_typeCloud isEqualToString:typeCloudOwnCloud] || [_typeCloud isEqualToString:typeCloudNextcloud]) {
             
             NSDictionary *fields = [httpResponse allHeaderFields];
@@ -483,23 +456,6 @@
                 date = [dateFormatter dateFromString:[fields objectForKey:@"Date"]];
             }
         }
-
-#ifdef CC
-        
-        /*** DROPBOX ***/
-
-        if ([_typeCloud isEqualToString:typeCloudDropbox]) {
-            
-            NSData *data = [_taskData objectForKey:[NSNumber numberWithLong:task.taskIdentifier]];
-            
-            if (errorCode == 0 && data) {
-                NSDictionary *response = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
-                DBMetadata *dbMetadata = [[DBMetadata alloc] initWithDictionary:response];
-                fileID = dbMetadata.rev;
-                date = dbMetadata.lastModifiedDate;
-            }
-        }
-#endif
         
         dispatch_async(dispatch_get_main_queue(), ^{
             
@@ -581,23 +537,6 @@
     NSURL *url;
     NSMutableURLRequest *request;
     
-#ifdef CC
-    
-    /*** DROPBOX ***/
-    
-    if ([_typeCloud isEqualToString:typeCloudDropbox]) {
-    
-        NSString *serverFileUrl = [[urlBaseDownloadDB stringByAppendingString:[CCUtility stringAppendServerUrl:serverUrl addServerUrl:fileName]] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-    
-        url = [NSURL URLWithString:serverFileUrl];
-        request = [[NSMutableURLRequest alloc] initWithURL:url];
-    
-        [request addValue:[self apiAuthorizationHeader:1] forHTTPHeaderField:@"Authorization"];
-    }
-#endif
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([_typeCloud isEqualToString:typeCloudNextcloud] || [_typeCloud isEqualToString:typeCloudOwnCloud]) {
         
         NSString *serverFileUrl = [[NSString stringWithFormat:@"%@/%@", serverUrl, fileName] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
@@ -1241,32 +1180,6 @@
     NSURLSession *sessionUpload;
     NSURL *url;
     NSMutableURLRequest *request;
-  
-#ifdef CC
-    
-    /*** DROPBOX ***/
-    
-    if ([_typeCloud isEqualToString:typeCloudDropbox]) {
-    
-        NSString *fileNamePath = [CCUtility stringAppendServerUrl:serverUrl addServerUrl:fileName];
-        NSString *urlWithParams = [urlBaseUploadDB stringByAppendingString:fileNamePath];
-        
-        // Add parameter, if present, parent_rev
-        if (parentRev)
-            urlWithParams = [NSString stringWithFormat:@"%@?parent_rev=%@", urlWithParams, parentRev];
-        
-        // Encoding UTF8
-        urlWithParams = [urlWithParams stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-    
-        url = [NSURL URLWithString:urlWithParams];
-        request = [[NSMutableURLRequest alloc] initWithURL:url];
-        
-        [request setHTTPMethod:@"PUT"];
-        [request addValue:[self apiAuthorizationHeader:1] forHTTPHeaderField:@"Authorization"];
-    }
-#endif
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
     
     if ([_typeCloud isEqualToString:typeCloudNextcloud] || [_typeCloud isEqualToString:typeCloudOwnCloud]) {
         
@@ -1818,19 +1731,6 @@
 {
     NSString *fileName = [url lastPathComponent];
     
-    /*** DROPBOX ***/
-
-    if ([_typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        url = [url stringByReplacingOccurrencesOfString:urlBaseDownloadDB withString:@""];
-        url = [url stringByReplacingOccurrencesOfString:urlBaseUploadDB withString:@""];
-        url = [url stringByReplacingOccurrencesOfString:[@"/" stringByAppendingString:fileName] withString:@""];
-        
-        if ([url length] == 0) url = @"/";
-    }
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([_typeCloud isEqualToString:typeCloudOwnCloud] || [_typeCloud isEqualToString:typeCloudNextcloud]) {
         
         url = [url stringByReplacingOccurrencesOfString:[@"/" stringByAppendingString:fileName] withString:@""];
@@ -1851,85 +1751,4 @@
     return [data objectForKey:@"title"];
 }
 
-#ifdef CC
-
-// ===== DB OAuth version = 1.0 & 2.0 =====
-
-- (NSString *)apiAuthorizationHeader:(NSInteger)version
-{
-    NSString *header;
-    
-    if (version == 1) {
-        
-#ifdef EXTENSION
-        MPOAuthCredentialConcreteStore *mpoAuth = [[[CCSharedDBSession sharedDBSession] dBSession] credentialStoreForUserId:_activeUID];
-#else
-        MPOAuthCredentialConcreteStore *mpoAuth = [[DBSession sharedSession] credentialStoreForUserId:_activeUID];
-#endif
-        
-        NSString *token = [mpoAuth accessToken];
-        NSString *tokenSecret = [mpoAuth accessTokenSecret];
-        
-        NSString *appKey = appKeyCryptoCloud;
-        NSString *appSecret = appSecretCryptoCloud;
-        
-        header = [NSString stringWithFormat:@"OAuth oauth_version=\"1.0\",oauth_signature_method=\"PLAINTEXT\",oauth_consumer_key=\"%@\"",appKey];
-        
-        if (token) header = [header stringByAppendingString:[NSString stringWithFormat:@",oauth_token=\"%@\"",token]];
-        if (!tokenSecret) tokenSecret = @"";
-        
-        header = [header stringByAppendingString:[NSString stringWithFormat:@",oauth_signature=\"%@&%@\"",appSecret,tokenSecret]];
-    }
-    
-    if (version == 2) {
-        
-        if ([_activeAccessToken length] == 0) _activeAccessToken = [CCCoreData getTokenActiveAccount:_activeAccount];
-        if ([_activeAccessToken length] == 0) [self requestAccessTokenOAuth2];
-        
-        header = [NSString stringWithFormat:@"Bearer %@", _activeAccessToken];
-    }
-    
-    return header;
-}
-
-// ===== Richiesta Token OAuth 2.0 =====
-
-- (void)requestAccessTokenOAuth2
-{
-    NSString *urlWithParams = @"https://api.dropboxapi.com/1/oauth2/token_from_oauth1";
-    NSURL *url = [NSURL URLWithString:urlWithParams];
-    
-    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
-    [request setHTTPMethod:@"POST"];
-    [request addValue:[self apiAuthorizationHeader:1] forHTTPHeaderField:@"Authorization"];
-    
-    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
-    
-    NSURLSessionDataTask *dataTask = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
-        
-        NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)response;
-        
-        if (error == nil && (httpResponse.statusCode >= 200 && httpResponse.statusCode < 300)) {
-            
-            NSDictionary *record = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
-            NSString *accessToken = [record objectForKey:@"access_token"];
-            
-            if (accessToken) {
-                
-                [CCCoreData setTokenAccount:accessToken activeAccount:_activeAccount];
-                _activeAccessToken = accessToken;
-            }
-        }
-        
-        dispatch_semaphore_signal(semaphore);
-        
-    }];
-    
-    [dataTask resume];
-    
-    while (dispatch_semaphore_wait(semaphore, DISPATCH_TIME_NOW))
-        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
-}
-#endif
-
 @end

+ 0 - 4
iOSClient/Networking/OCNetworking.m

@@ -28,10 +28,6 @@
 #import "CCCertificate.h"
 #import "NSString+Encode.h"
 
-#ifdef CC
-#import "CCSharedDBSession.h"
-#endif
-
 #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
 
 @interface OCnetworking ()

+ 0 - 10
iOSClient/PeekPop/CCPeekPop.h

@@ -26,19 +26,9 @@
 #import "CCMetadata.h"
 #import "OCNetworking.h"
 
-#ifdef CC
-#import "DBnetworking.h"
-
-@protocol CCPeekPopDelegate;
-
-@interface CCPeekPop : UIViewController <OCNetworkingDelegate, DBnetworkingDelegate>
-#endif
-
-#ifdef NC
 @protocol CCPeekPopDelegate;
 
 @interface CCPeekPop : UIViewController <OCNetworkingDelegate>
-#endif
 
 @property (nonatomic, weak) id <CCPeekPopDelegate> delegate;
 

+ 0 - 7
iOSClient/PeekPop/CCPeekPop.m

@@ -107,13 +107,6 @@
     metadataNet.action = actionDownloadThumbnail;
     metadataNet.fileID = metadata.fileID;
     
-    /*** DROPBOX ***/
-
-    if ([metadata.typeCloud isEqualToString:typeCloudDropbox])
-        metadataNet.fileName = metadata.fileName;
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([metadata.typeCloud isEqualToString:typeCloudOwnCloud] || [metadata.typeCloud isEqualToString:typeCloudNextcloud])
         metadataNet.fileName = [self returnFileNamePathFromFileName:metadata.fileName serverUrl:app.serverUrl];
     

+ 0 - 10
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -1272,16 +1272,6 @@
 {
     OCnetworking *ocNet;
     
-    /*** DROPBOX ***/
-
-    if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        [CCCoreData clearDateReadDirectory:[CCUtility deletingLastPathComponentFromServerUrl:folderPathName] activeAccount:app.activeAccount];
-        return YES;
-    }
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
         
         NSError *error;

+ 3 - 9
iOSClient/Settings/Acknowledgements.rtf

@@ -1,7 +1,8 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf760
 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
 {\colortbl;\red255\green255\blue255;}
-\paperw12240\paperh15840\margl1440\margr1440\vieww20200\viewh9920\viewkind0
+{\*\expandedcolortbl;;}
+\margl1440\margr1440\vieww20200\viewh9920\viewkind0
 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
 
 \f0\fs24 \cf0 \
@@ -222,11 +223,4 @@ GPLv3 Licensed & The MIT License (MIT)\
 Copyright (c) ownCloud Inc. (http://www.owncloud.org/)\
 ____________________________________________\
 \
-
-\b Dropbox iOS Library\
-
-\b0 \
-Copyright (c) Dropbox Inc. (https://www.dropbox.com/dmca)\
-____________________________________________\
-\
 }

+ 0 - 58
iOSClient/Settings/CCManageAccount.m

@@ -71,30 +71,12 @@
     if (listAccount.count == 0) row.disabled = @YES;
     [section addFormRow:row];
 
-#ifdef NC
     // New Account nextcloud
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"addAccountNextcloud" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_add_nextcloud_", nil)];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
     [row.cellConfig setObject:[UIImage imageNamed:image_settingsAccountNextcloud] forKey:@"imageView.image"];
     row.action.formSelector = @selector(addAccountNextcloud:);
     [section addFormRow:row];
-#endif
-    
-#ifdef CC
-    // New Account ownCloud
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"addAccountOwnCloud" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_add_owncloud_", nil)];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [row.cellConfig setObject:[UIImage imageNamed:image_settingsAccountOwnCloud] forKey:@"imageView.image"];
-    row.action.formSelector = @selector(addAccountOwnCloud:);
-    [section addFormRow:row];
-    
-    // New Account Dropbox
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"addAccountDropbox" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_add_dropbox_", nil)];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [row.cellConfig setObject:[UIImage imageNamed:image_settingsAccountDropbox] forKey:@"imageView.image"];
-    row.action.formSelector = @selector(addAccountDropbox:);
-    [section addFormRow:row];
-#endif
     
     // delete Account
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"delAccount" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_delete_account_", nil)];
@@ -162,8 +144,6 @@
     [self presentViewController:loginVC animated:YES completion:nil];
 }
 
-/*** OWNCLOUD ***/
-
 - (void)addAccountOwnCloud:(XLFormRowDescriptor *)sender
 {
     [self deselectFormRow:sender];
@@ -179,22 +159,6 @@
     [self presentViewController:loginVC animated:YES completion:nil];
 }
 
-#ifdef CC
-
-/*** DROPBOX ***/
-
-- (void)addAccountDropbox:(XLFormRowDescriptor *)sender
-{
-    [self deselectFormRow:sender];
-    
-    [app cancelAllOperations];
-    [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
-    
-    [[DBSession sharedSession] linkFromController:self];
-}
-
-#endif
-
 - (void)openLoginSetupVC
 {    
     // remove any message
@@ -219,8 +183,6 @@
     
     [app cancelAllOperations];
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
-
-    /*** NEXTCLOUD OWNCLOUD ***/
     
     if ([app.typeCloud isEqualToString:typeCloudNextcloud] || [app.typeCloud isEqualToString:typeCloudOwnCloud]) {
     
@@ -238,17 +200,6 @@
         [self presentViewController:loginVC animated:YES completion:nil];
     }
     
-#ifdef CC
-    
-    /*** DROPBOX ***/
-
-    if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-        
-        [[DBSession sharedSession] linkFromController:self];
-    }
-    
-#endif
-    
     [self UpdateForm];
 }
 
@@ -271,15 +222,6 @@
         
         [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
 
-#ifdef CC
-        
-        /*** DROPBOX ***/
-
-        // Dropbox unlink UID
-        if ([app.typeCloud isEqualToString:typeCloudDropbox])
-            [[DBSession sharedSession] unlinkUserId:app.activeUID];
-#endif
-
         [self deleteAccount:accountNow];
         
         // Clear active user

+ 1 - 3
iOSClient/Settings/CCManageCameraUpload.m

@@ -202,9 +202,7 @@
     if ([rowDescriptor.tag isEqualToString:@"cameraupload"]) {
         
         if ([[rowDescriptor.value valueData] boolValue] == YES) {
-            
-            /*** NEXTCLOUD OWNCLOUD ***/
-            
+                        
             // Create Folder cameraUpload
             if (([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) && app.activeMain)
                 [app.activeMain createFolderCameraUpload];

+ 0 - 26
iOSClient/Settings/CCManageHelp.m

@@ -60,32 +60,6 @@
     row.action.formSelector = @selector(intro:);
     [section addFormRow:row];
 
-#ifdef CC
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"synchronizations" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_help_synchronizations_", nil)];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    row.action.formSelector = @selector(synchronizations:);
-    [section addFormRow:row];
-    
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"share" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_help_share_", nil)];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    row.action.formSelector = @selector(share:);
-    [section addFormRow:row];
-    
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"itunesshare" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_help_itunes_share_", nil)];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    row.action.formSelector = @selector(itunesshare:);
-    [section addFormRow:row];
-
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"shareext" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_help_share_ext_", nil)];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
-    [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
-    row.action.formSelector = @selector(shareExt:);
-    [section addFormRow:row];
-#endif
-
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"switchuser" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_help_switch_user_", nil)];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];

+ 0 - 13
iOSClient/Settings/CCManagePhotos.m

@@ -98,8 +98,6 @@
     
     if (serverUrlTo) {
         
-        /*** NEXTCLOUD OWNCLOUD ***/
-        
         if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) {
             
             NSURL *url = [NSURL URLWithString:[serverUrlTo stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
@@ -110,15 +108,6 @@
             
         }
         
-        /*** DROPBOX ***/
-
-        if ([app.typeCloud isEqualToString:typeCloudDropbox]) {
-            
-            fileName = [serverUrlTo lastPathComponent];
-            newPath = [serverUrlTo stringByDeletingLastPathComponent];
-
-        }
-        
         if ([serverUrlTo isEqualToString:[CCUtility getHomeServerUrlActiveUrl:app.activeUrl typeCloud:app.typeCloud]]) {
             
             UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"_error_", nil) message:NSLocalizedString(@"_camera_upload_not_select_home_", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:NSLocalizedString(@"_ok_", nil), nil];
@@ -182,8 +171,6 @@
     // rebuild
     if (app.activeAccount && app.activeUrl && app.activePhotosCameraUpload)
         [app.activePhotosCameraUpload reloadDatasourceForced];
-
-    /*** NEXTCLOUD OWNCLOUD ***/
     
     // Create Folder cameraUpload
     if (([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud]) && app.activeMain)

+ 0 - 7
iOSClient/Settings/CCManageSynchronizations.m

@@ -136,16 +136,9 @@
         
         for (TableDirectory *directory in tableSynchronized) {
             
-            /*** NEXTCLOUD OWNCLOUD ***/
-            
             if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud])
                 title = [directory.serverUrl stringByReplacingOccurrencesOfString:home withString:@""];
             
-            /*** DROPBOX ***/
-
-            if ([app.typeCloud isEqualToString:typeCloudDropbox])
-                title = directory.serverUrl;
-            
             title = [title lastPathComponent];
             if ([CCUtility isCryptoString:title]) {
                 

+ 0 - 24
iOSClient/Settings/CCSettings.m

@@ -166,13 +166,7 @@
     section = [XLFormSectionDescriptor formSection];
     [form addFormSection:section];
     
-#ifdef CC
-    section.footerTitle = @"Crypto Cloud © 2016 T.W.S. Inc.";
-#endif
-    
-#ifdef NC
     section.footerTitle = @"Nextcloud © 2016 T.W.S. Inc.";
-#endif
     
     row = [XLFormRowDescriptor formRowDescriptorWithTag:@"buttonLeftAligned" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_acknowledgements_", nil)];
     [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
@@ -411,16 +405,9 @@
     if ([CCUtility getSimplyBlockCode]) [rowSimplyPasscode setValue:@1]; else [rowSimplyPasscode setValue:@0];
     if ([CCUtility getOnlyLockDir]) [rowOnlyLockDir setValue:@1]; else [rowOnlyLockDir setValue:@0];
     
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([app.typeCloud isEqualToString:typeCloudOwnCloud] || [app.typeCloud isEqualToString:typeCloudNextcloud])
         rowVersionServer.value =  [CCNetworking sharedNetworking].sharedOCCommunication.getCurrentServerVersion;
     
-    /*** DROPBOX ***/
-
-    if ([app.typeCloud isEqualToString:typeCloudDropbox])
-        rowVersionServer.value = @"Dropbox Inc.";
-    
     rowUrlCloud.value = app.activeUrl;
     rowUserNameCloud.value = app.activeUser;
         
@@ -654,15 +641,8 @@
     // Email Recipents
     NSArray *toRecipents;
     
-#ifdef CC
-    messageBody = [NSString stringWithFormat:@"\n\n\nCrypto Cloud Version %@ (%@)", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
-    toRecipents = [NSArray arrayWithObject:_mail_me_];
-#endif
-    
-#ifdef NC
     messageBody = [NSString stringWithFormat:@"\n\n\nNextcloud Version %@ (%@)", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
     toRecipents = [NSArray arrayWithObject:_mail_me_];
-#endif
     
     MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
     mc.mailComposeDelegate = self;
@@ -703,10 +683,6 @@
             [CCCoreData flushAllDatabase];
         
             [CCUtility deleteAllChainStore];
-        
-#ifdef CC
-            [[DBSession sharedSession] unlinkAll];
-#endif
             
             [self emptyDocumentsDirectory];
         

+ 0 - 8
iOSClient/Utility/CCUtility.h

@@ -29,10 +29,6 @@
 #import <MessageUI/MessageUI.h>
 #import <UICKeyChainStore/UICKeyChainStore.h>
 
-#ifdef CC
-#import <DropboxSDK/DropboxSDK.h>
-#endif
-
 #import "OCFileDto.h"
 #import "CCMetadata.h"
 #import "CCCrypto.h"
@@ -157,10 +153,6 @@
 
 // ===== CCMetadata =====
 
-#ifdef CC
-+ (CCMetadata *)trasformedMetadataToMetadata:(DBMetadata *)dbMetadata fileNamePrint:(NSString *)fileNamePrint serverUrl:(NSString *)serverUrl directoryID:(NSString *)directoryID cameraFolderName:(NSString *)cameraFolderName cameraFolderPath:(NSString *)cameraFolderPath activeAccount:(NSString *)activeAccount directoryUser:(NSString *)directoryUser;
-#endif
-
 + (CCMetadata *)trasformedOCFileToCCMetadata:(OCFileDto *)itemDto fileNamePrint:(NSString *)fileNamePrint serverUrl:(NSString *)serverUrl directoryID:(NSString *)directoryID cameraFolderName:(NSString *)cameraFolderName cameraFolderPath:(NSString *)cameraFolderPath activeAccount:(NSString *)activeAccount directoryUser:(NSString *)directoryUser typeCloud:(NSString *)typeCloud;
 
 + (void)insertTypeFileIconName:(CCMetadata *)metadata directory:(NSString *)directory cameraFolderName:(NSString *)cameraFolderName cameraFolderPath:(NSString *)cameraFolderPath;

+ 1 - 66
iOSClient/Utility/CCUtility.m

@@ -379,8 +379,6 @@
 {
     NSString *appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
     
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
     if ([typeCloud isEqualToString:typeCloudOwnCloud])
         return [NSString stringWithFormat:@"%@%@",@"Mozilla/5.0 (iOS) CryptoCloud-iOS/",appVersion];
     
@@ -493,17 +491,10 @@
     if (activeUrl == nil || typeCloud == nil) return nil;
     
     NSString *home;
-    
-    /*** NEXTCLOUD OWNCLOUD ***/
-    
+        
     if ([typeCloud isEqualToString:typeCloudOwnCloud] || [typeCloud isEqualToString:typeCloudNextcloud])
         home = [activeUrl stringByAppendingString:webDAV];
     
-    /*** DROPBOX ***/
-
-    if ([typeCloud isEqualToString:typeCloudDropbox])
-        home = @"/";
-    
     return home;
 }
 
@@ -718,60 +709,6 @@
 #pragma mark ===== CCMetadata =====
 #pragma --------------------------------------------------------------------------------------------
 
-#ifdef CC
-+ (CCMetadata *)trasformedMetadataToMetadata:(DBMetadata *)dbMetadata fileNamePrint:(NSString *)fileNamePrint serverUrl:(NSString *)serverUrl directoryID:(NSString *)directoryID cameraFolderName:(NSString *)cameraFolderName cameraFolderPath:(NSString *)cameraFolderPath activeAccount:(NSString *)activeAccount directoryUser:(NSString *)directoryUser
-{
-    CCMetadata *metadata = [[CCMetadata alloc] init];
-    
-    metadata.account = activeAccount;
-    metadata.cryptated = NO;
-    metadata.date = dbMetadata.lastModifiedDate;
-    metadata.directory = dbMetadata.isDirectory;
-    metadata.errorPasscode = NO;
-    metadata.fileID = dbMetadata.rev;
-    metadata.directoryID = directoryID;
-    metadata.fileName = [CCUtility removeForbiddenCharacters:dbMetadata.filename];
-    metadata.fileNameData = [CCUtility trasformedFileNamePlistInCrypto:metadata.fileName];
-    metadata.fileNamePrint = [CCUtility removeForbiddenCharacters:fileNamePrint];
-    metadata.iconName = @"";
-    metadata.model = @"";
-    metadata.nameCurrentDevice = [CCUtility getNameCurrentDevice];
-    metadata.permissions = @"";
-    metadata.protocol = @"";
-    metadata.rev = dbMetadata.rev;
-    metadata.size = (long)dbMetadata.totalBytes;
-    metadata.thumbnailExists = dbMetadata.thumbnailExists;
-    metadata.title = @"";
-    metadata.type = metadataType_file;
-    metadata.typeFile = @"";
-    metadata.typeCloud = typeCloudDropbox;
-    metadata.uuid = [CCUtility getUUID];
-    
-    switch ([self getTypeFileName:metadata.fileName]) {
-            
-        case metadataTypeFilenamePlist:
-            
-            metadata.cryptated = YES;
-            metadata.fileNamePrint = NSLocalizedString(@"_download_plist_", nil);
-            
-            [self insertInformationPlist:metadata directoryUser:directoryUser];
-            
-            break;
-            
-        case metadataTypeFilenameCrypto:
-            
-            metadata.cryptated = YES;
-            metadata.fileNamePrint = @"";
-            
-            break;
-    }
-
-    [self insertTypeFileIconName:metadata directory:serverUrl cameraFolderName:cameraFolderName cameraFolderPath:cameraFolderPath];
-    
-    return metadata;
-}
-#endif
-
 + (CCMetadata *)trasformedOCFileToCCMetadata:(OCFileDto *)itemDto fileNamePrint:(NSString *)fileNamePrint serverUrl:(NSString *)serverUrl directoryID:(NSString *)directoryID cameraFolderName:(NSString *)cameraFolderName cameraFolderPath:(NSString *)cameraFolderPath activeAccount:(NSString *)activeAccount directoryUser:(NSString *)directoryUser typeCloud:(NSString *)typeCloud
 {
     CCMetadata *metadata = [[CCMetadata alloc] init];
@@ -836,8 +773,6 @@
         
         NSString *ext = (__bridge NSString *)fileExtension;
         ext = ext.uppercaseString;
-
-        /*** NEXTCLOUD OWNCLOUD ***/
         
         // thumbnailExists for typeCloudOwnCloud
         if ([metadata.typeCloud isEqualToString:typeCloudOwnCloud] || [metadata.typeCloud isEqualToString:typeCloudNextcloud]) {