diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-A5ED089C-8831-5E25-AE7C-8E6F1C21D3BE.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-A5ED089C-8831-5E25-AE7C-8E6F1C21D3BE.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,89 @@ + + + + + +Writing +a CSBEClient for RestoreThis section describes the recommended conn::CSBEClient function +calls for a partial and incremental restore. +
Context

A partial restore restores the data of +specified data owners. The Security IDs (SIDs) of the specified data owners +must be passed to the Backup Engine.

An incremental restore restores +files that are saved in the previous incremental backup. After each incremental +backup, a snapshot, which saves the file list and details of each data owner, +is saved. Before each incremental restore, the previously saved backup snapshots +must be provided to the Backup Engine.

+
Steps
    +
  1. The user application +must instantiate conn::CSBEClient to connect to the Backup +Engine.

    iRestoreClient = CSBEClient::NewL();
  2. +
  3. Supply the list of data +owners got from the host PC to the Backup Engine.

    To restore the data +of specified data owners, pass the array of the SID of these data owners to +the Backup Engine.

    iRestoreClient->SetSIDListForPartialBURL(RSIDArray& aSIDs);
  4. +
  5. Set the Back Engine +to the restore mode which signals the start of a restore.

    The Backup +Engine then publishes +the mode to the subscribed data owners. This gives the data owners +some time to prepare for the restore, for example they can release resources +in case of file lock or data conflict.

    The mode contains the restore +types: full or partial, base or incremental.

    iRestoreClient->SetBURModeL ( + const TDriveList& aDriveList, + + //Specify partial restore, + //defined in epoc32/include/connect/sbdefs.h + TBURPartType aBURType, + + //Specifiy incremental restore, + //defined in epoc32/include/connect/sbdefs.h + TBackupIncType aBackupIncType + ); +
  6. +
  7. Supply system files +to the Backup Engine for restore.

    iRestoreClient ->SupplyDataL( + CSBGenericTransferType& aGenericTransferType, + TBool aFinished + );
  8. +
  9. Signal that all system +files have been restored.

    This step must be invoked to ensure that +system files have been released for data owners to use. It triggers the Backup +Engine to start data owners for the restore.

    iRestoreClient->AllSystemFilesRestored();
  10. +
  11. Request the state of +active data owners.

    This step ensures that the data owners are ready +to supply the data, for example file locks are released.

    iRestoreClient->SIDStatusL(RSIDStatusArray& aSIDStatus);
  12. +
  13. Supply passive private +data and its snapshot to the Backup Engine for restore.

    iRestoreClient->SupplyDataL( + CSBGenericTransferType& aGenericTransferType, + TBool aFinished + );

    Note: For more information +about creating snapshot transfer types, refer to the Creating +transfer types section.

  14. +
  15. The backup server restores +the public files.

    Similar to a backup, the Backup Engine does not +restore public files. Device creators must get the public files from the host +PC and restore them to the device in their backup server implementations.

  16. +
  17. Supply active private +data to the Backup Engine for restore.

    iRestoreClient->SupplyDataL( + CSBGenericTransferType& aGenericTransferType, + TBool aFinished + );
  18. +
  19. Set the Backup Engine +into the normal mode.

    After the data is restored on the device, set +the Backup Engine to the normal mode. The subscribed data owners respond to +the signal and resume the state before the backup. For example resume file +locks or a GUI application recovers to the state and view prior to the restore.

    iRestoreClient->SetBURModeL( + const TDriveList& aDriveList, + TBURPartType aBURType, + TBackupIncType aBackupIncType + );
  20. +
+
+Writing a +Backup Engine Client (CSBEClient) +
\ No newline at end of file