Inherits from TICDSOperation : NSOperation
Declared in TICDSWholeStoreDownloadOperation.h

Overview

The TICDSWholeStoreDownloadOperation class describes a generic operation used by the TICoreDataSync framework to download the whole store for a document.

The operation carries out the following tasks:

  1. If requestedWholeStoreClientIdentifier is not set, determine which client uploaded a store most recently, and set requestedWholeStoreClientIdentifier.
  2. Download the whole store file from the requestedWholeStoreClientIdentifier’s directory.
  3. Download the applied sync change sets file that goes with this whole store.

Operations are typically created automatically by the relevant sync manager.

%warning%
Warning: You must use one of the subclasses of TICDSWholeStoreDownloadOperation.

Tasks

Methods Overridden by Subclasses

Callbacks

Properties

Properties

integrityKey

The integrity key of the newly-downloaded store.

@property (copy) NSString *integrityKey

Declared In

TICDSWholeStoreDownloadOperation.h

localAppliedSyncChangeSetsFileLocation

The destination for the applied sync change sets file.

@property (strong) NSURL *localAppliedSyncChangeSetsFileLocation

Declared In

TICDSWholeStoreDownloadOperation.h

localWholeStoreFileLocation

The destination for the whole store file.

@property (strong) NSURL *localWholeStoreFileLocation

Declared In

TICDSWholeStoreDownloadOperation.h

requestedWholeStoreClientIdentifier

The client identifier for the WholeStore to download. If this is not specified before the operation executes, the operation will determine which client uploaded a store most recently.

@property (copy) NSString *requestedWholeStoreClientIdentifier

Declared In

TICDSWholeStoreDownloadOperation.h

Instance Methods

checkForMostRecentClientWholeStore

Determine which client uploaded a WholeStore most recently.

- (void)checkForMostRecentClientWholeStore

Discussion

This method must call determinedMostRecentWholeStoreWasUploadedByClientWithIdentifier: when finished.

Declared In

TICDSWholeStoreDownloadOperation.h

determinedMostRecentWholeStoreWasUploadedByClientWithIdentifier:

Indicate which client uploaded the most recent WholeStore.

- (void)determinedMostRecentWholeStoreWasUploadedByClientWithIdentifier:(NSString *)anIdentifier

Parameters

anIdentifier

The identifier of the client.

Discussion

If an error occurs, call setError: first, then specify nil for anIdentifier

Declared In

TICDSWholeStoreDownloadOperation.h

downloadAppliedSyncChangeSetsFile

Download the applied sync change sets file at the remote document store path to the localAppliedSyncChangeSetsFileLocation.

- (void)downloadAppliedSyncChangeSetsFile

Discussion

This method must call downloadedAppliedSyncChangeSetsFileWithSuccess: when finished.

Declared In

TICDSWholeStoreDownloadOperation.h

downloadWholeStoreFile

Download the store at the remote document store path to the localWholeStoreFileLocation.

- (void)downloadWholeStoreFile

Discussion

This method must call downloadedWholeStoreFileWithSuccess: when finished.

Declared In

TICDSWholeStoreDownloadOperation.h

downloadedAppliedSyncChangeSetsFileWithSuccess:

Indicate whether the download of the applied sync change sets file was successful.

- (void)downloadedAppliedSyncChangeSetsFileWithSuccess:(BOOL)success

Parameters

success

YES if the applied sync change sets file was downloaded, otherwise NO.

Discussion

If not, call setError: first, then specify NO for success.

Declared In

TICDSWholeStoreDownloadOperation.h

downloadedWholeStoreFileWithSuccess:

Indicate whether the download of the whole store file was successful.

- (void)downloadedWholeStoreFileWithSuccess:(BOOL)success

Parameters

success

YES if the whole store file was downloaded, otherwise NO.

Discussion

If not, call setError: first, then specify NO for success.

Declared In

TICDSWholeStoreDownloadOperation.h

downloadingAppliedSyncChangeSetsFileMadeProgress

Indicate when the download operation makes progress.

- (void)downloadingAppliedSyncChangeSetsFileMadeProgress

Declared In

TICDSWholeStoreDownloadOperation.h

downloadingWholeStoreFileMadeProgress

Indicate when the download operation makes progress.

- (void)downloadingWholeStoreFileMadeProgress

Declared In

TICDSWholeStoreDownloadOperation.h

fetchRemoteIntegrityKey

Fetch the integrity key for this document.

- (void)fetchRemoteIntegrityKey

Discussion

This method must call fetchedRemoteIntegrityKey: to provide the key.

Declared In

TICDSWholeStoreDownloadOperation.h

fetchedRemoteIntegrityKey:

Pass back the remote integrity key for this document.

- (void)fetchedRemoteIntegrityKey:(NSString *)aKey

Parameters

aKey

The remote integrity key, or nil if an error occurred.

Discussion

If an error occurred, call setError: first, then specify nil for aKey.

Declared In

TICDSWholeStoreDownloadOperation.h