filemanager/src/fmbkupengine/inc/CMMCScBkupStateArchiveOpActiveData.h
branchRCL_3
changeset 21 65326cf895ed
parent 20 491b3ed49290
child 22 f5c50b8af68c
equal deleted inserted replaced
20:491b3ed49290 21:65326cf895ed
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Declaration for CMMCScBkupStateArchiveOpActiveData
       
    15 *     
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __CMMCSCBKUPSTATEARCHIVEOPACTIVEDATA_H__
       
    20 #define __CMMCSCBKUPSTATEARCHIVEOPACTIVEDATA_H__
       
    21 
       
    22 // System includes
       
    23 #include <connect/sbtypes.h>
       
    24 
       
    25 // User includes
       
    26 #include "CMMCScBkupStateOpAware.h"
       
    27 #include "TMMCScBkupArchiveVector.h"
       
    28 #include "CMMCScBkupTransferWriteRequest.h"
       
    29 #include "CMMCScBkupTransferReadRequest.h"
       
    30 
       
    31 // Namespaces
       
    32 using namespace conn;
       
    33 
       
    34 // Classes referenced
       
    35 class CMMCScBkupDataOwnerInfo;
       
    36 
       
    37 
       
    38 /**
       
    39 *
       
    40 *
       
    41 * @since 3.0
       
    42 */
       
    43 NONSHARABLE_CLASS(CMMCScBkupStateArchiveOpActiveData) : public CMMCScBkupStateOpAware, public MMMCScBkupIndexHandler
       
    44     {
       
    45     public:
       
    46 
       
    47         /**
       
    48         * Static constructor
       
    49         */
       
    50         static CMMCScBkupStateArchiveOpActiveData* NewL( MMMCScBkupDriver& aDriver );
       
    51 
       
    52         /**
       
    53         * C++ destructor
       
    54         */
       
    55         ~CMMCScBkupStateArchiveOpActiveData( );
       
    56 
       
    57     private:
       
    58 
       
    59         /**
       
    60         * C++ default constructor
       
    61         */
       
    62         CMMCScBkupStateArchiveOpActiveData( MMMCScBkupDriver& aDriver );
       
    63 
       
    64     public: // From CMMCScBkupState
       
    65         TMMCScBkupStateId StateId() const;
       
    66 
       
    67     public: // From CMMCScBkupStateOpAware
       
    68         TMMCScBkupStateId NextStateBackupId( TBool aPartial ) const;
       
    69         TMMCScBkupStateId NextStateRestoreId( TBool aPartial ) const;
       
    70 
       
    71     private: // From CMMCScBkupStateOpAware
       
    72         void PerformStateInitBackupL( TBool aPartial );
       
    73         void PerformStateInitRestoreL( TBool aPartial );
       
    74         void PerformAsynchronousStateStepBackupL( TBool aPartial );
       
    75         void PerformAsynchronousStateStepRestoreL( TBool aPartial );
       
    76         void PerformLastRightsBackupL( TBool aPartial );
       
    77         TBool PerformAsynchronousErrorCleanupBackup( TBool aPartial, TInt aError );
       
    78         TBool PerformAsynchronousErrorCleanupRestore( TBool aPartial, TInt aError );
       
    79 
       
    80     private: // From CMMCScBkupState
       
    81         void PerformAsynchronousCancellation();
       
    82 
       
    83     private: // From MMMCScBkupIndexHandler
       
    84         void AddIndexRecordL( CMMCScBkupArchiveFooter& aFooter, CMMCScBkupDataOwnerInfo& aDataOwner, const TMMCScBkupArchiveVector& aInfo, TDriveNumber aDrive );
       
    85 
       
    86     private: // Internal members
       
    87 
       
    88         /**
       
    89         *
       
    90         */
       
    91         inline TBool AllDataOwnersHandled() const { return !iAtLeastOneDataOwnerIsNotYetReady; }
       
    92 
       
    93         /**
       
    94         *
       
    95         */
       
    96         void CheckNeedToStartRetryTimerL();
       
    97 
       
    98     private: // Member data
       
    99 
       
   100         //
       
   101         TInt iIndexValueCurrent;
       
   102         //
       
   103         TBool iAtLeastOneDataOwnerIsNotYetReady;
       
   104         //
       
   105         RTimer iTimer;
       
   106         //
       
   107         CMMCScBkupWriteDataTransferRequest< TTransferDataType >* iBackupTransferObject;
       
   108         //
       
   109         CMMCScBkupReadDataTransferRequest< TTransferDataType >* iRestoreTransferObject;
       
   110     };
       
   111 
       
   112 
       
   113 
       
   114 
       
   115 
       
   116 
       
   117 
       
   118 
       
   119 #endif // __CMMCSCBKUPSTATEARCHIVEOPACTIVEDATA_H__
       
   120 
       
   121 //End of File