filemanager/src/fmbkupengine/inc/CMMCScBkupStateRequestSizeOfBackupData.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 CMMCScBkupStateRequestSizeOfBackupData
       
    15 *     
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __CMMCSCBKUPSTATEREQUESTSIZEOFBACKUPDATA_H__
       
    20 #define __CMMCSCBKUPSTATEREQUESTSIZEOFBACKUPDATA_H__
       
    21 
       
    22 // User includes
       
    23 #include "MMCScBkupOperations.h"
       
    24 #include "CMMCScBkupState.h"
       
    25 #include "CMMCScBkupDriveSpecificRequest.h"
       
    26 
       
    27 // Classes referenced
       
    28 class CMMCScBkupDataOwnerInfo;
       
    29 class CMMCScBkupStateRequestSizeOfDataOwner;
       
    30 
       
    31 
       
    32 /**
       
    33 *
       
    34 *
       
    35 * @since 3.0
       
    36 */
       
    37 NONSHARABLE_CLASS(CMMCScBkupStateRequestSizeOfBackupData) : public CMMCScBkupState
       
    38     {
       
    39     public:
       
    40 
       
    41         /**
       
    42         * Static constructor
       
    43         */
       
    44         static CMMCScBkupStateRequestSizeOfBackupData* NewL( MMMCScBkupDriver& aDriver );
       
    45 
       
    46         /**
       
    47         * C++ destructor
       
    48         */
       
    49         ~CMMCScBkupStateRequestSizeOfBackupData( );
       
    50 
       
    51     private:
       
    52 
       
    53         /**
       
    54         * C++ default constructor
       
    55         */
       
    56         CMMCScBkupStateRequestSizeOfBackupData( MMMCScBkupDriver& aDriver );
       
    57 
       
    58         /**
       
    59         * Second phase constructor
       
    60         */
       
    61         void ConstructL( );
       
    62 
       
    63     public: // From CMMCScBkupState
       
    64         TMMCScBkupStateId StateId() const;
       
    65         TMMCScBkupStateId NextStateId() const;
       
    66         TStateExecution CategorySpecific() const { return EStatePerCategory; }
       
    67 
       
    68     private: // From CMMCScBkupState
       
    69         void PerformStateInitL();
       
    70         void PerformAsynchronousStateStepL();
       
    71         TBool PerformAsynchronousErrorCleanup( TInt aError );
       
    72         void PerformAsynchronousCancellation();
       
    73 
       
    74     private: // Data members
       
    75 
       
    76         //
       
    77         TInt iCurrentDataOwnerIndex;
       
    78         //
       
    79         CMMCScBkupStateRequestSizeOfDataOwner* iRequestObject;
       
    80     };
       
    81 
       
    82 
       
    83 
       
    84 
       
    85 
       
    86 
       
    87 
       
    88 /**
       
    89 * NB. This class only sizes active, passive, system and java data. Public
       
    90 * data is sized elsewhere.
       
    91 *
       
    92 * @since 3.0
       
    93 */
       
    94 class CMMCScBkupStateRequestSizeOfDataOwner : public CMMCScBkupDriveSpecificRequest
       
    95     {
       
    96     public:
       
    97 
       
    98         /**
       
    99         *
       
   100         */
       
   101         static CMMCScBkupStateRequestSizeOfDataOwner* NewL( MMMCScBkupDriver& aDriver );
       
   102 
       
   103     private:
       
   104 
       
   105         /**
       
   106         * C++ default constructor
       
   107         */
       
   108         CMMCScBkupStateRequestSizeOfDataOwner( MMMCScBkupDriver& aDriver );
       
   109 
       
   110     public: // API
       
   111 
       
   112         /**
       
   113         *
       
   114         */
       
   115         void RequestL( CMMCScBkupDataOwnerInfo& aOwner, TRequestStatus& aObserver );
       
   116 
       
   117     private: // From CActive
       
   118         void RunL();
       
   119         void DoCancel();
       
   120 
       
   121     private: // Internal methods
       
   122         inline MMMCScBkupDriver& Driver() { return iDriver; }
       
   123         //
       
   124         TUint GetActiveAndPassiveDataSizesL( const CDataOwnerInfo& aOwner, CSBGenericDataType& aIdentifier, TDriveNumber aDrive );
       
   125         TUint GetSIDSpecificSizeL( TSecureId aSecureID, TDriveNumber aDrive, TTransferDataType aDataType );
       
   126         TUint GetSystemDataSizesL( const CDataOwnerInfo& aOwner, CSBGenericDataType& aIdentifier, TDriveNumber aDrive );
       
   127         TUint GetJavaDataSizesL( const CDataOwnerInfo& aOwner, CSBGenericDataType& aIdentifier, TDriveNumber aDrive );
       
   128         TUint GetJavaSpecificSizeL( const TDesC& aHash, TDriveNumber aDrive, TJavaTransferType aDataType );
       
   129     
       
   130     private: // Member data
       
   131 
       
   132         //
       
   133         MMMCScBkupDriver& iDriver;
       
   134         //
       
   135         CMMCScBkupDataOwnerInfo* iOwner;
       
   136     };
       
   137 
       
   138 
       
   139 
       
   140 
       
   141 
       
   142 #endif // __CMMCSCBKUPSTATEREQUESTSIZEOFBACKUPDATA_H__
       
   143 
       
   144 //End of File