Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Migrated framework code to the Dropbox SDK version 1.0.
  • Loading branch information
Michael Fey committed Dec 14, 2011
1 parent 740aa99 commit b9f20fd
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 23 deletions.
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICoreDataSync.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedApplicationRegistrationOperation` is an application registration operation designed for use with a `TICDSDropboxSDKBasedApplicationSyncManager`.
Expand Down
Expand Up @@ -70,7 +70,8 @@ - (void)checkForGlobalAppDirectoryCompletion

- (void)copyReadMeTxtFileToRootOfGlobalAppDirectoryFromPath:(NSString *)aPath
{
[[self restClient] uploadFile:[aPath lastPathComponent] toPath:[self applicationDirectoryPath] fromPath:[aPath stringByDeletingLastPathComponent]];
[[self restClient] uploadFile:[aPath lastPathComponent] toPath:[self applicationDirectoryPath] withParentRev:nil fromPath:[aPath stringByDeletingLastPathComponent]];
// [[self restClient] uploadFile:[aPath lastPathComponent] toPath:[self applicationDirectoryPath] fromPath:[aPath stringByDeletingLastPathComponent]];
}

#pragma mark Salt
Expand All @@ -97,7 +98,8 @@ - (void)saveSaltDataToRemote:(NSData *)saltData
return;
}

[[self restClient] uploadFile:TICDSSaltFilenameWithExtension toPath:[[self encryptionDirectorySaltDataFilePath] stringByDeletingLastPathComponent] fromPath:tempFile];
[[self restClient] uploadFile:TICDSSaltFilenameWithExtension toPath:[[self encryptionDirectorySaltDataFilePath] stringByDeletingLastPathComponent] withParentRev:nil fromPath:tempFile];
// [[self restClient] uploadFile:TICDSSaltFilenameWithExtension toPath:[[self encryptionDirectorySaltDataFilePath] stringByDeletingLastPathComponent] fromPath:tempFile];
}

#pragma mark Password Test
Expand Down Expand Up @@ -125,7 +127,8 @@ - (void)savePasswordTestData:(NSData *)testData
return;
}

[[self restClient] uploadFile:TICDSEncryptionTestFilenameWithExtension toPath:[[self encryptionDirectoryTestDataFilePath] stringByDeletingLastPathComponent] fromPath:finalFilePath];
[[self restClient] uploadFile:TICDSEncryptionTestFilenameWithExtension toPath:[[self encryptionDirectoryTestDataFilePath] stringByDeletingLastPathComponent] withParentRev:nil fromPath:finalFilePath];
// [[self restClient] uploadFile:TICDSEncryptionTestFilenameWithExtension toPath:[[self encryptionDirectoryTestDataFilePath] stringByDeletingLastPathComponent] fromPath:finalFilePath];
}

- (void)fetchPasswordTestData
Expand Down Expand Up @@ -179,7 +182,8 @@ - (void)saveRemoteClientDeviceInfoPlistFromDictionary:(NSDictionary *)aDictionar
}
}

[[self restClient] uploadFile:TICDSDeviceInfoPlistFilenameWithExtension toPath:[self clientDevicesThisClientDeviceDirectoryPath] fromPath:finalFilePath];
[[self restClient] uploadFile:TICDSDeviceInfoPlistFilenameWithExtension toPath:[self clientDevicesThisClientDeviceDirectoryPath] withParentRev:nil fromPath:finalFilePath];
// [[self restClient] uploadFile:TICDSDeviceInfoPlistFilenameWithExtension toPath:[self clientDevicesThisClientDeviceDirectoryPath] fromPath:finalFilePath];
}

#pragma mark -
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSDocumentClientDeletionOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>
/**
`TICDSDropboxSDKBasedDocumentClientDeletionOperation` is a "deletion of client's sync data from a document" operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
*/
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSDocumentDeletionOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedDocumentDeletionOperation` is a Document Deletion operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICoreDataSync.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedDocumentRegistrationOperation` is a document registration operation designed for use with a `TICDSDropboxSDKBasedApplicationSyncManager`.
Expand Down
Expand Up @@ -111,7 +111,8 @@ - (void)saveRemoteDocumentInfoPlistFromDictionary:(NSDictionary *)aDictionary
return;
}

[[self restClient] uploadFile:TICDSDocumentInfoPlistFilenameWithExtension toPath:[self thisDocumentDirectoryPath] fromPath:finalFilePath];
[[self restClient] uploadFile:TICDSDocumentInfoPlistFilenameWithExtension toPath:[self thisDocumentDirectoryPath] withParentRev:nil fromPath:finalFilePath];
// [[self restClient] uploadFile:TICDSDocumentInfoPlistFilenameWithExtension toPath:[self thisDocumentDirectoryPath] fromPath:finalFilePath];
}

#pragma mark Integrity Key
Expand Down Expand Up @@ -145,7 +146,8 @@ - (void)saveIntegrityKey:(NSString *)aKey
return;
}

[[self restClient] uploadFile:aKey toPath:remoteDirectory fromPath:localFilePath];
[[self restClient] uploadFile:aKey toPath:remoteDirectory withParentRev:nil fromPath:localFilePath];
// [[self restClient] uploadFile:aKey toPath:remoteDirectory fromPath:localFilePath];
}

#pragma mark Adding Other Clients to Document's DeletedClients Directory
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSListOfApplicationRegisteredClientsOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedListOfApplicationRegisteredClientsOperation` is a "List of Registered Clients for an Application" operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSListOfPreviouslySynchronizedDocumentsOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedListOfDocumentRegisteredClientsOperation` is a "List of Registered Clients for a Document" operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSListOfPreviouslySynchronizedDocumentsOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedListOfPreviouslySynchronizedDocumentsOperation` is a "List of Previously Synchronized Documents" operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSRemoveAllRemoteSyncDataOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedApplicationRegistrationOperation` is an application registration operation designed for use with a `TICDSDropboxSDKBasedApplicationSyncManager`.
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSSynchronizationOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedSynchronizationOperation` is a synchronization operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
Expand Down
Expand Up @@ -79,13 +79,15 @@ - (void)uploadLocalSyncChangeSetFileAtLocation:(NSURL *)aLocation
finalFilePath = tempFilePath;
}

[[self restClient] uploadFile:[finalFilePath lastPathComponent] toPath:[self thisDocumentSyncChangesThisClientDirectoryPath] fromPath:finalFilePath];
[[self restClient] uploadFile:[finalFilePath lastPathComponent] toPath:[self thisDocumentSyncChangesThisClientDirectoryPath] withParentRev:nil fromPath:finalFilePath];
// [[self restClient] uploadFile:[finalFilePath lastPathComponent] toPath:[self thisDocumentSyncChangesThisClientDirectoryPath] fromPath:finalFilePath];
}

#pragma mark Uploading Recent Sync File
- (void)uploadRecentSyncFileAtLocation:(NSURL *)aLocation
{
[[self restClient] uploadFile:[[aLocation path] lastPathComponent] toPath:[[self thisDocumentRecentSyncsThisClientFilePath] stringByDeletingLastPathComponent] fromPath:[aLocation path]];
[[self restClient] uploadFile:[[aLocation path] lastPathComponent] toPath:[[self thisDocumentRecentSyncsThisClientFilePath] stringByDeletingLastPathComponent] withParentRev:nil fromPath:[aLocation path]];
// [[self restClient] uploadFile:[[aLocation path] lastPathComponent] toPath:[[self thisDocumentRecentSyncsThisClientFilePath] stringByDeletingLastPathComponent] fromPath:[aLocation path]];
}

#pragma mark -
Expand Down
Expand Up @@ -10,7 +10,7 @@

#import "TICDSVacuumOperation.h"

#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedVacuumOperation` is a vacuum operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSWholeStoreDownloadOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedWholeStoreDownloadOperation` is a "whole store download" operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
Expand Down
Expand Up @@ -9,7 +9,7 @@
#if TARGET_OS_IPHONE

#import "TICDSWholeStoreUploadOperation.h"
#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

/**
`TICDSDropboxSDKBasedWholeStoreUploadOperation` is a "whole store upload" operation designed for use with a `TICDSDropboxSDKBasedDocumentSyncManager`.
Expand Down
Expand Up @@ -54,12 +54,14 @@ - (void)uploadLocalWholeStoreFileToThisClientTemporaryWholeStoreDirectory
filePath = tempPath;
}

[[self restClient] uploadFile:TICDSWholeStoreFilename toPath:[self thisDocumentTemporaryWholeStoreThisClientDirectoryPath] fromPath:filePath];
[[self restClient] uploadFile:TICDSWholeStoreFilename toPath:[self thisDocumentTemporaryWholeStoreThisClientDirectoryPath] withParentRev:nil fromPath:filePath];
// [[self restClient] uploadFile:TICDSWholeStoreFilename toPath:[self thisDocumentTemporaryWholeStoreThisClientDirectoryPath] fromPath:filePath];
}

- (void)uploadLocalAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectory
{
[[self restClient] uploadFile:TICDSAppliedSyncChangeSetsFilename toPath:[self thisDocumentTemporaryWholeStoreThisClientDirectoryPath] fromPath:[[self localAppliedSyncChangeSetsFileLocation] path]];
[[self restClient] uploadFile:TICDSAppliedSyncChangeSetsFilename toPath:[self thisDocumentTemporaryWholeStoreThisClientDirectoryPath] withParentRev:nil fromPath:[[self localAppliedSyncChangeSetsFileLocation] path]];
// [[self restClient] uploadFile:TICDSAppliedSyncChangeSetsFilename toPath:[self thisDocumentTemporaryWholeStoreThisClientDirectoryPath] fromPath:[[self localAppliedSyncChangeSetsFileLocation] path]];
}

- (void)checkWhetherThisClientWholeStoreDirectoryExists
Expand Down
Expand Up @@ -10,7 +10,7 @@

#import "TICoreDataSync.h"

#import "DropboxSDK.h"
#import <DropboxSDK/DropboxSDK.h>

@implementation TICDSDropboxSDKBasedApplicationSyncManager

Expand Down

0 comments on commit b9f20fd

Please sign in to comment.