TICDSPostSynchronizationOperation Class Reference
Inherits from | TICDSOperation : NSOperation |
Declared in | TICDSPostSynchronizationOperation.h |
Overview
The TICDSPostSynchronizationOperation
class describes a generic operation used by the TICoreDataSync
framework to synchronize changes made to a document.
In brief, a post-synchronization operation pushes out the local set of unsynchronized sync changes.
In full, the operation carries out the following tasks: (Sync Command tasks are included below, although not yet implemented)
- If there are local
SyncCommand
s, renameUnsynchronizedSyncCommands.ticdsync
toUUID.synccmd
and push the file to the remote. - If there are local
SyncChange
s, renameUnsynchronizedSyncChanges.syncchg
toUUID.syncchd
and push the file to the remote. - Save this client’s file in the
RecentSyncs
directory for this document.
Operations are typically created automatically by the relevant sync manager.
%warning%
Warning: You must use one of the subclasses ofTICDSPostSynchronizationOperation
.
Tasks
Methods Overridden by Subclasses
-
– uploadLocalSyncChangeSetFileAtLocation:
Upload the specified sync changes file to the client device’s directory inside the document’s
SyncChanges
directory. -
– uploadRecentSyncFileAtLocation:
Upload the specified RecentSync file to the document’s
RecentSync
directory.
Callbacks
-
– uploadedLocalSyncChangeSetFileSuccessfully:
Indicate whether the upload of the sync change set file was successful.
-
– uploadedRecentSyncFileSuccessfully:
Indicate whether the upload of the RecentSync file was successful.
File Locations
-
localSyncChangesToMergeURL
The location of the
propertySyncChangesBeingSynchronized.syncchg
file for this synchronization operation. -
localRecentSyncFileLocation
The location of the local RecentSync file to upload at the end of the synchronization process.
property -
appliedSyncChangeSetsFileLocation
The location of this document’s
propertyAppliedSyncChangeSets.ticdsync
file.
Properties
appliedSyncChangeSetsFileLocation
The location of this document’s AppliedSyncChangeSets.ticdsync
file.
@property (strong) NSURL *appliedSyncChangeSetsFileLocation
Declared In
TICDSPostSynchronizationOperation.h
Instance Methods
uploadLocalSyncChangeSetFileAtLocation:
Upload the specified sync changes file to the client device’s directory inside the document’s SyncChanges
directory.
- (void)uploadLocalSyncChangeSetFileAtLocation:(NSURL *)aLocation
Parameters
- aLocation
The location of the file to upload.
Discussion
This method must call uploadedLocalSyncChangeSetFileSuccessfully:
to indicate whether the creation was successful.
Declared In
TICDSPostSynchronizationOperation.h
uploadRecentSyncFileAtLocation:
Upload the specified RecentSync file to the document’s RecentSync
directory.
- (void)uploadRecentSyncFileAtLocation:(NSURL *)aLocation
Parameters
- aLocation
The location of the file to upload.
Discussion
This method must call uploadedRecentSyncFileSuccessfully:
to indicate whether the creation was successful.
Declared In
TICDSPostSynchronizationOperation.h
uploadedLocalSyncChangeSetFileSuccessfully:
Indicate whether the upload of the sync change set file was successful.
- (void)uploadedLocalSyncChangeSetFileSuccessfully:(BOOL)success
Parameters
- success
YES
if the sync change set file was uploaded, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSPostSynchronizationOperation.h
uploadedRecentSyncFileSuccessfully:
Indicate whether the upload of the RecentSync file was successful.
- (void)uploadedRecentSyncFileSuccessfully:(BOOL)success
Parameters
- success
YES
if the RecentSync file was uploaded, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSPostSynchronizationOperation.h