filemanager/src/fmbkupengine/inc/CMMCScBkupStateArchiveOpPublicDataFiles.h
branchRCL_3
changeset 20 491b3ed49290
equal deleted inserted replaced
19:95243422089a 20:491b3ed49290
       
     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 CMMCScBkupStateArchiveOpPublicDataFiles
       
    15 *     
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __CMMCSCBKUPSTATEARCHIVEOPPUBLICDATAFILES_H__
       
    20 #define __CMMCSCBKUPSTATEARCHIVEOPPUBLICDATAFILES_H__
       
    21 
       
    22 // System includes
       
    23 #include <connect/sbtypes.h>
       
    24 
       
    25 // User includes
       
    26 #include "CMMCScBkupStateOpAware.h"
       
    27 
       
    28 // Namespaces
       
    29 using namespace conn;
       
    30 
       
    31 // Classes referenced
       
    32 class CMMCScBkupDataOwnerInfo;
       
    33 
       
    34 
       
    35 /**
       
    36 *
       
    37 *
       
    38 * @since 3.0
       
    39 */
       
    40 NONSHARABLE_CLASS(CMMCScBkupStateArchiveOpPublicDataFiles) : public CMMCScBkupStateOpAware
       
    41     {
       
    42     public:
       
    43 
       
    44         /**
       
    45         * Static constructor
       
    46         */
       
    47         static CMMCScBkupStateArchiveOpPublicDataFiles* NewL( MMMCScBkupDriver& aDriver );
       
    48 
       
    49     private:
       
    50 
       
    51         /**
       
    52         * C++ default constructor
       
    53         */
       
    54         CMMCScBkupStateArchiveOpPublicDataFiles( MMMCScBkupDriver& aDriver );
       
    55 
       
    56     public: // From CMMCScBkupState
       
    57         TMMCScBkupStateId StateId() const;
       
    58 
       
    59     public: // From CMMCScBkupStateOpAware
       
    60         TMMCScBkupStateId NextStateBackupId( TBool aPartial ) const;
       
    61         TMMCScBkupStateId NextStateRestoreId( TBool aPartial ) const;
       
    62 
       
    63     private: // From CMMCScBkupStateOpAware
       
    64         void PerformStateInitBackupL( TBool aPartial );
       
    65         void PerformStateInitRestoreL( TBool aPartial );
       
    66         void PerformAsynchronousStateStepBackupL( TBool aPartial );
       
    67         void PerformAsynchronousStateStepRestoreL( TBool aPartial );
       
    68         void PerformLastRightsBackupL( TBool aPartial );
       
    69         void PerformLastRightsRestoreL( TBool aPartial );
       
    70         TBool PerformAsynchronousErrorCleanupBackup( TBool aPartial, TInt aError );
       
    71         TBool PerformAsynchronousErrorCleanupRestore( TBool aPartial, TInt aError );
       
    72         void PerformAsynchronousCancellation();
       
    73 
       
    74     private: // Internal enumerations
       
    75         
       
    76         /**
       
    77         *
       
    78         */
       
    79         enum TState
       
    80             {
       
    81             EStateCommonIdle = 0,
       
    82             EStateCommonKickOff,
       
    83             EStateCommonProcessingFile,
       
    84             EStateBackupAddIndexRecord,
       
    85             EStateRestoreResetAttributes
       
    86             };
       
    87 
       
    88     private: // Internal methods
       
    89         
       
    90         /**
       
    91         *
       
    92         */
       
    93         void CompressingAndWritingFileL();
       
    94         
       
    95         /**
       
    96         *
       
    97         */
       
    98         void DecompressingAndWritingFileL();
       
    99        
       
   100         /**
       
   101         *
       
   102         */
       
   103         void AddIndexRecordL();
       
   104         
       
   105         /**
       
   106         *
       
   107         */
       
   108         void RestoreFileAttributesL();
       
   109 
       
   110         /**
       
   111         *
       
   112         */
       
   113         inline void SetState(TState aState) { iState = aState; }
       
   114 
       
   115         /**
       
   116         *
       
   117         */
       
   118         inline TState State() const { return iState; }
       
   119 
       
   120     private: // Member data
       
   121 
       
   122         //
       
   123         TInt iIndexValueCurrent;
       
   124         //
       
   125         TState iState;
       
   126     };
       
   127 
       
   128 
       
   129 #endif // __CMMCSCBKUPSTATEARCHIVEOPPUBLICDATAFILES_H__
       
   130 
       
   131 //End of File