Marino Faggiana 8 vuotta sitten
vanhempi
commit
c2155245d3

+ 19 - 1
Nextcloud.xcodeproj/project.pbxproj

@@ -126,6 +126,10 @@
 		F73CCE301DC13798007E38D8 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */; };
 		F73CCE321DC13798007E38D8 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */; };
 		F749E4E91DC1FB38009BA2FD /* Share Ext Nextcloud.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = F7CE8AFB1DC1F8D8009CAE48 /* Share Ext Nextcloud.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		F74EF41D1E06C627009A6222 /* TableUpload+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F74EF41A1E06C627009A6222 /* TableUpload+CoreDataClass.m */; };
+		F74EF41E1E06C627009A6222 /* TableUpload+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F74EF41A1E06C627009A6222 /* TableUpload+CoreDataClass.m */; };
+		F74EF41F1E06C627009A6222 /* TableUpload+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F74EF41C1E06C627009A6222 /* TableUpload+CoreDataProperties.m */; };
+		F74EF4201E06C627009A6222 /* TableUpload+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F74EF41C1E06C627009A6222 /* TableUpload+CoreDataProperties.m */; };
 		F750374D1DBFA91A008FB480 /* ALView+PureLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = F75037441DBFA91A008FB480 /* ALView+PureLayout.m */; };
 		F750374F1DBFA91A008FB480 /* NSArray+PureLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = F75037461DBFA91A008FB480 /* NSArray+PureLayout.m */; };
 		F75037511DBFA91A008FB480 /* NSLayoutConstraint+PureLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = F75037481DBFA91A008FB480 /* NSLayoutConstraint+PureLayout.m */; };
@@ -1122,6 +1126,10 @@
 		F744BE961BEBB31E004FFF66 /* ImagesIntro.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ImagesIntro.xcassets; sourceTree = "<group>"; };
 		F74D3DBD1BAC1941000BAE4B /* OCNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCNetworking.h; sourceTree = "<group>"; };
 		F74D3DBE1BAC1941000BAE4B /* OCNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCNetworking.m; sourceTree = "<group>"; };
+		F74EF4191E06C627009A6222 /* TableUpload+CoreDataClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TableUpload+CoreDataClass.h"; sourceTree = "<group>"; };
+		F74EF41A1E06C627009A6222 /* TableUpload+CoreDataClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "TableUpload+CoreDataClass.m"; sourceTree = "<group>"; };
+		F74EF41B1E06C627009A6222 /* TableUpload+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TableUpload+CoreDataProperties.h"; sourceTree = "<group>"; };
+		F74EF41C1E06C627009A6222 /* TableUpload+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "TableUpload+CoreDataProperties.m"; sourceTree = "<group>"; };
 		F75037431DBFA91A008FB480 /* ALView+PureLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ALView+PureLayout.h"; sourceTree = "<group>"; };
 		F75037441DBFA91A008FB480 /* ALView+PureLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ALView+PureLayout.m"; sourceTree = "<group>"; };
 		F75037451DBFA91A008FB480 /* NSArray+PureLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+PureLayout.h"; sourceTree = "<group>"; };
@@ -1348,6 +1356,7 @@
 		F7BE6E2C1D2D5C3B00106933 /* CCQuickActions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCQuickActions.m; sourceTree = "<group>"; };
 		F7BF1B3F1D51E893000854F6 /* CCLoginNCOC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLoginNCOC.h; sourceTree = "<group>"; };
 		F7BF1B401D51E893000854F6 /* CCLoginNCOC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCLoginNCOC.m; sourceTree = "<group>"; };
+		F7BFA4541E0693EE0010E44C /* cryptocloud 5.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "cryptocloud 5.xcdatamodel"; sourceTree = "<group>"; };
 		F7BFCCBE1B68C21900548E76 /* CCManageAsset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCManageAsset.h; sourceTree = "<group>"; };
 		F7BFCCBF1B68C21900548E76 /* CCManageAsset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCManageAsset.m; sourceTree = "<group>"; };
 		F7BFCCC01B68C21900548E76 /* CCManageLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCManageLocation.h; sourceTree = "<group>"; };
@@ -2698,6 +2707,10 @@
 		F77F86401B4ABF6D009F0A10 /* Table */ = {
 			isa = PBXGroup;
 			children = (
+				F74EF4191E06C627009A6222 /* TableUpload+CoreDataClass.h */,
+				F74EF41A1E06C627009A6222 /* TableUpload+CoreDataClass.m */,
+				F74EF41B1E06C627009A6222 /* TableUpload+CoreDataProperties.h */,
+				F74EF41C1E06C627009A6222 /* TableUpload+CoreDataProperties.m */,
 				F7994B731D5B854C008525D9 /* TableCertificates+CoreDataProperties.h */,
 				F7994B741D5B854C008525D9 /* TableCertificates+CoreDataProperties.m */,
 				F7994B751D5B854C008525D9 /* TableCertificates.h */,
@@ -3522,6 +3535,7 @@
 				F71459E11D12E3B700CAFEEC /* CCHud.m in Sources */,
 				F71459E21D12E3B700CAFEEC /* TableAccount+CoreDataProperties.m in Sources */,
 				F71459E41D12E3B700CAFEEC /* RNDecryptor.m in Sources */,
+				F74EF41E1E06C627009A6222 /* TableUpload+CoreDataClass.m in Sources */,
 				F71459E61D12E3B700CAFEEC /* NYXImagesHelper.m in Sources */,
 				F71459E91D12E3B700CAFEEC /* UIImage+Enhancing.m in Sources */,
 				F71459EA1D12E3B700CAFEEC /* CCCellShareExt.m in Sources */,
@@ -3545,6 +3559,7 @@
 				F71459FF1D12E3B700CAFEEC /* RNCryptor.m in Sources */,
 				F7145A001D12E3B700CAFEEC /* CCGlobal.m in Sources */,
 				F7145A011D12E3B700CAFEEC /* UIImage+Blurring.m in Sources */,
+				F74EF4201E06C627009A6222 /* TableUpload+CoreDataProperties.m in Sources */,
 				F7145A021D12E3B700CAFEEC /* BKTouchIDManager.m in Sources */,
 				F7145A041D12E3B700CAFEEC /* CCloadItemData.swift in Sources */,
 				F7145A081D12E3B700CAFEEC /* PPCollectionViewCell.m in Sources */,
@@ -3591,6 +3606,7 @@
 				F7659A681DC0B760004860C4 /* PSTCollectionViewUpdateItem.m in Sources */,
 				F77B0E071D118A16002130FE /* ioapi.c in Sources */,
 				F77B0E0D1D118A16002130FE /* CCSecurityOptions.m in Sources */,
+				F74EF41F1E06C627009A6222 /* TableUpload+CoreDataProperties.m in Sources */,
 				F73CCDF11DC13776007E38D8 /* XLFormStepCounterCell.m in Sources */,
 				F73CCE1F1DC13776007E38D8 /* XLForm.m in Sources */,
 				F77B0E0E1D118A16002130FE /* REMenuItemView.m in Sources */,
@@ -3729,6 +3745,7 @@
 				F77B0E831D118A16002130FE /* TableLocalFile.m in Sources */,
 				F77B0E851D118A16002130FE /* MWTapDetectingView.m in Sources */,
 				F75037511DBFA91A008FB480 /* NSLayoutConstraint+PureLayout.m in Sources */,
+				F74EF41D1E06C627009A6222 /* TableUpload+CoreDataClass.m in Sources */,
 				F73CCE151DC13776007E38D8 /* XLFormRowNavigationAccessoryView.m in Sources */,
 				F73CCDFB1DC13776007E38D8 /* XLFormOptionsViewController.m in Sources */,
 				F77B0E871D118A16002130FE /* NSData+Base64.m in Sources */,
@@ -4226,12 +4243,13 @@
 		F78088E51DD3A1DB005C5A7C /* cryptocloud.xcdatamodeld */ = {
 			isa = XCVersionGroup;
 			children = (
+				F7BFA4541E0693EE0010E44C /* cryptocloud 5.xcdatamodel */,
 				F78088E61DD3A1DB005C5A7C /* cryptocloud 2.xcdatamodel */,
 				F78088E71DD3A1DB005C5A7C /* cryptocloud 3.xcdatamodel */,
 				F78088E81DD3A1DB005C5A7C /* cryptocloud 4.xcdatamodel */,
 				F78088E91DD3A1DB005C5A7C /* cryptocloud.xcdatamodel */,
 			);
-			currentVersion = F78088E81DD3A1DB005C5A7C /* cryptocloud 4.xcdatamodel */;
+			currentVersion = F7BFA4541E0693EE0010E44C /* cryptocloud 5.xcdatamodel */;
 			path = cryptocloud.xcdatamodeld;
 			sourceTree = "<group>";
 			versionGroupType = wrapper.xcdatamodel;

+ 7 - 0
iOSClient/AppDelegate.m

@@ -1096,6 +1096,13 @@
     return NO;
 }
 
+- (void)startUpload
+{
+    NSArray *metadatasNet = [CCCoreData getTableUploadFromAccount:self.activeAccount queueName:@"it.twsweb.cryptocloud.queueUploadCameraAllPhoto" numRecords:(maxConcurrentOperationUploadCameraAllPhoto - [_netQueueUploadCameraAllPhoto operationCount]) context:nil];
+    
+    
+}
+
 - (void)verifyDownloadUploadInProgress
 {
     BOOL callVerifyDownload = NO;

+ 6 - 0
iOSClient/FileSystem/CCCoreData.h

@@ -40,6 +40,7 @@
 #import "TableLocalFile.h"
 #import "TableGPS.h"
 #import "TableShare.h"
+#import "TableUpload+CoreDataClass.h"
 
 @interface CCCoreData : NSObject
 
@@ -175,6 +176,11 @@
 + (void)setGeoInformationLocalFromFileID:(NSString *)fileID exifDate:(NSDate *)exifDate exifLatitude:(NSString *)exifLatitude exifLongitude:(NSString *)exifLongitude activeAccount:(NSString *)activeAccount;
 + (void)setGeoInformationLocalNull;
 
+// ===== Upload =====
+
++ (void)addUpload:(CCMetadataNet *)metadataNet activeAccount:(NSString *)activeAccount context:(NSManagedObjectContext *)context;
++ (NSArray *)getTableUploadFromAccount:(NSString *)activeAccount queueName:(NSString *)queueName numRecords:(NSUInteger)numRecords context:(NSManagedObjectContext *)context;
+
 // ===== GPS =====
 
 + (void)setGeocoderLocation:(NSString *)location placemarkAdministrativeArea:(NSString *)placemarkAdministrativeArea placemarkCountry:(NSString *)placemarkCountry placemarkLocality:(NSString *)placemarkLocality placemarkPostalCode:(NSString *)placemarkPostalCode placemarkThoroughfare:(NSString *)placemarkThoroughfare latitude:(NSString *)latitude longitude:(NSString *)longitude;

+ 71 - 0
iOSClient/FileSystem/CCCoreData.m

@@ -1469,6 +1469,77 @@
     }];
 }
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Upload =====
+#pragma --------------------------------------------------------------------------------------------
+
++ (void)addUpload:(CCMetadataNet *)metadataNet activeAccount:(NSString *)activeAccount context:(NSManagedObjectContext *)context
+{
+    TableUpload *record;
+    
+    if (context == nil)
+        context = [NSManagedObjectContext MR_context];
+    
+    
+    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(account == %@) AND (fileName == %@) AND (serverUrl == %@)", activeAccount, metadataNet.fileName, metadataNet.serverUrl];
+    record = [TableUpload MR_findFirstWithPredicate:predicate inContext:context];
+    
+    if (record) {
+        
+        // removed
+        
+    } else {
+    
+        record = [TableUpload MR_createEntityInContext:context];
+        
+        record.account = activeAccount;
+        record.assetLocalItentifier = metadataNet.assetLocalItentifier;
+        record.date = [NSDate date];
+        record.fileName = metadataNet.fileName;
+        record.queueName = metadataNet.queue.name;
+        record.selector = metadataNet.selector;
+        record.selectorPost = metadataNet.selectorPost;
+        record.serverUrl = metadataNet.serverUrl;
+        record.session = metadataNet.session;
+    }
+    
+    [context MR_saveToPersistentStoreAndWait];
+}
+
++ (NSArray *)getTableUploadFromAccount:(NSString *)activeAccount queueName:(NSString *)queueName numRecords:(NSUInteger)numRecords context:(NSManagedObjectContext *)context
+{
+    if (numRecords == 0)
+        return nil;
+    
+    NSMutableArray *metadatasNet = [[NSMutableArray alloc] init];
+    NSUInteger counter = 0;
+    
+    if (context == nil)
+        context = [NSManagedObjectContext MR_context];
+    
+    NSPredicate *peopleFilter = [NSPredicate predicateWithFormat:@"(account == %@) AND (queueName == %@) AND (startUpload == 0)", activeAccount, queueName, taskIdentifierDone];
+    NSArray *records = [TableUpload MR_findAllWithPredicate:peopleFilter];
+    
+    for (TableUpload *record in records) {
+        
+        CCMetadataNet *metadataNet = [[CCMetadataNet alloc] init];
+        
+        metadataNet.assetLocalItentifier = record.assetLocalItentifier;
+        metadataNet.fileName = record.fileName;
+        metadataNet.selector = record.selector;
+        metadataNet.selectorPost = record.selectorPost;
+        metadataNet.serverUrl = record.serverUrl;
+        metadataNet.session = record.session;
+        
+        [metadatasNet addObject:metadataNet];
+        
+        if (++counter == numRecords)
+            break;
+    }
+    
+    return metadatasNet;
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== GPS =====
 #pragma --------------------------------------------------------------------------------------------

+ 20 - 0
iOSClient/FileSystem/TableUpload+CoreDataClass.h

@@ -0,0 +1,20 @@
+//
+//  TableUpload+CoreDataClass.h
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 18/12/16.
+//  Copyright © 2016 TWS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <CoreData/CoreData.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TableUpload : NSManagedObject
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#import "TableUpload+CoreDataProperties.h"

+ 13 - 0
iOSClient/FileSystem/TableUpload+CoreDataClass.m

@@ -0,0 +1,13 @@
+//
+//  TableUpload+CoreDataClass.m
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 18/12/16.
+//  Copyright © 2016 TWS. All rights reserved.
+//
+
+#import "TableUpload+CoreDataClass.h"
+
+@implementation TableUpload
+
+@end

+ 31 - 0
iOSClient/FileSystem/TableUpload+CoreDataProperties.h

@@ -0,0 +1,31 @@
+//
+//  TableUpload+CoreDataProperties.h
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 18/12/16.
+//  Copyright © 2016 TWS. All rights reserved.
+//
+
+#import "TableUpload+CoreDataClass.h"
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TableUpload (CoreDataProperties)
+
++ (NSFetchRequest<TableUpload *> *)fetchRequest;
+
+@property (nullable, nonatomic, copy) NSString *account;
+@property (nullable, nonatomic, copy) NSString *assetLocalItentifier;
+@property (nullable, nonatomic, copy) NSDate *date;
+@property (nullable, nonatomic, copy) NSString *fileName;
+@property (nullable, nonatomic, copy) NSString *queueName;
+@property (nullable, nonatomic, copy) NSString *selector;
+@property (nullable, nonatomic, copy) NSString *selectorPost;
+@property (nullable, nonatomic, copy) NSString *serverUrl;
+@property (nullable, nonatomic, copy) NSString *session;
+@property (nullable, nonatomic, retain) NSNumber *startUpload;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 28 - 0
iOSClient/FileSystem/TableUpload+CoreDataProperties.m

@@ -0,0 +1,28 @@
+//
+//  TableUpload+CoreDataProperties.m
+//  Nextcloud
+//
+//  Created by Marino Faggiana on 18/12/16.
+//  Copyright © 2016 TWS. All rights reserved.
+//
+
+#import "TableUpload+CoreDataProperties.h"
+
+@implementation TableUpload (CoreDataProperties)
+
++ (NSFetchRequest<TableUpload *> *)fetchRequest {
+	return [[NSFetchRequest alloc] initWithEntityName:@"TableUpload"];
+}
+
+@dynamic account;
+@dynamic assetLocalItentifier;
+@dynamic date;
+@dynamic fileName;
+@dynamic queueName;
+@dynamic selector;
+@dynamic selectorPost;
+@dynamic serverUrl;
+@dynamic session;
+@dynamic startUpload;
+
+@end

+ 4 - 2
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -1265,9 +1265,11 @@
             queue = app.netQueueUploadWWan;
         else
             queue = app.netQueueUpload;
-            
+        
+        [CCCoreData addUpload:metadataNet activeAccount:app.activeAccount context:nil];
+        
         // Add Network queue
-        [app addNetworkingOperationQueue:queue delegate:app.activeMain metadataNet:metadataNet oneByOne:YES];
+        //[app addNetworkingOperationQueue:queue delegate:app.activeMain metadataNet:metadataNet oneByOne:YES];
     }
     
     // end loading

+ 1 - 1
iOSClient/cryptocloud.xcdatamodeld/.xccurrentversion

@@ -3,6 +3,6 @@
 <plist version="1.0">
 <dict>
 	<key>_XCCurrentVersionName</key>
-	<string>cryptocloud 4.xcdatamodel</string>
+	<string>cryptocloud 5.xcdatamodel</string>
 </dict>
 </plist>

+ 136 - 0
iOSClient/cryptocloud.xcdatamodeld/cryptocloud 5.xcdatamodel/contents

@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16C67" minimumToolsVersion="Xcode 7.0" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="cryptocloud">
+    <entity name="TableAccount" representedClassName="TableAccount" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="active" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUpload" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadBackground" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCreateSubfolder" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCryptatedPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadCryptatedVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadDatePhoto" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadDateVideo" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadFolderName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cameraUploadFolderPath" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cameraUploadFull" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadSaveAlbum" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadWWAnPhoto" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="cameraUploadWWAnVideo" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="optimization" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="password" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="token" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeCloud" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="uid" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="url" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="user" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableCertificates" representedClassName="TableCertificates" syncable="YES">
+        <attribute name="certificateLocation" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableDirectory" representedClassName="TableDirectory" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateReadDirectory" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directoryID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="lock" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="permissions" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="synchronized" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableGPS" representedClassName="TableGPS" syncable="YES">
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="latitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="location" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="longitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkAdministrativeArea" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkCountry" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkLocality" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkPostalCode" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="placemarkThoroughfare" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableLocalFile" representedClassName="TableLocalFile" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="exifDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="exifLatitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="exifLongitude" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="favorite" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNamePrint" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="size" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <entity name="TableMetadata" representedClassName="TableMetadata" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="cryptated" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directory" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="directoryID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="errorPasscode" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNameData" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="fileNamePrint" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="iconName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="localIdentifier" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="model" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="nameCurrentDevice" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="permissions" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="protocol" optional="YES" attributeType="String" defaultValueString="1" syncable="YES"/>
+        <attribute name="rev" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="session" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionError" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionID" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionSelector" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionSelectorPost" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="sessionTaskIdentifier" optional="YES" attributeType="Integer 16" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="sessionTaskIdentifierPlist" optional="YES" attributeType="Integer 16" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="size" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="thumbnailExists" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="type" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeCloud" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="typeFile" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="uuid" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableShare" representedClassName="TableShare" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="dateRecord" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="shareLink" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="shareUserAndGroup" optional="YES" attributeType="String" syncable="YES"/>
+    </entity>
+    <entity name="TableUpload" representedClassName="TableUpload" syncable="YES">
+        <attribute name="account" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="assetLocalItentifier" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="fileName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="queueName" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="selector" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="selectorPost" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="serverUrl" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="session" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="startUpload" optional="YES" attributeType="Boolean" defaultValueString="-1" usesScalarValueType="NO" syncable="YES"/>
+    </entity>
+    <elements>
+        <element name="TableAccount" positionX="-6174" positionY="153" width="171" height="420"/>
+        <element name="TableCertificates" positionX="-5976" positionY="297" width="128" height="75"/>
+        <element name="TableDirectory" positionX="-5465" positionY="426" width="128" height="210"/>
+        <element name="TableGPS" positionX="-5609" positionY="243" width="128" height="180"/>
+        <element name="TableLocalFile" positionX="-5472" positionY="153" width="135" height="225"/>
+        <element name="TableMetadata" positionX="-5949" positionY="162" width="162" height="525"/>
+        <element name="TableShare" positionX="-5976" positionY="297" width="128" height="135"/>
+        <element name="TableUpload" positionX="-5967" positionY="306" width="128" height="195"/>
+    </elements>
+</model>