filemanager/bkupengine/inc/CMMCScBkupOperationParameters.h
changeset 0 6a9f87576119
equal deleted inserted replaced
-1:000000000000 0:6a9f87576119
       
     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 CMMCScBkupOpParamsBase
       
    15 *     
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __CMMCSCBKUPOPERATIONPARAMETERS_H__
       
    20 #define __CMMCSCBKUPOPERATIONPARAMETERS_H__
       
    21 
       
    22 // System includes
       
    23 #include <connect/sbdefs.h>
       
    24 #include <connect/sbtypes.h>
       
    25 #include <barsread.h>
       
    26 #include <babitflags.h>
       
    27 
       
    28 // User includes
       
    29 #include "MMCScBkupOperations.h"
       
    30 #include "CMMCScBkupDataOwnerInfo.h"
       
    31 #include "RMMCScBkupPointerArray.h"
       
    32 
       
    33 // Namespaces
       
    34 using namespace conn;
       
    35 
       
    36 // Classes referenced
       
    37 class CMMCScBkupDriveAndOperationTypeManager;
       
    38 class CMMCScBkupArchiveInfo;
       
    39 
       
    40 _LIT( KBackUpFolder, "\\Backup\\" );
       
    41 _LIT( KBackUpFiles, "*.arc" );
       
    42 
       
    43 /**
       
    44 *
       
    45 *
       
    46 * @since 3.0
       
    47 */
       
    48 NONSHARABLE_CLASS(CMMCScBkupOpParamsBase) : public CBase
       
    49     {
       
    50     public:
       
    51 
       
    52         /**
       
    53         *
       
    54         */
       
    55         IMPORT_C ~CMMCScBkupOpParamsBase();
       
    56 
       
    57     protected:
       
    58 
       
    59         /**
       
    60         *
       
    61         */
       
    62         CMMCScBkupOpParamsBase( );
       
    63 
       
    64         /**
       
    65         *
       
    66         */
       
    67         void ConstructL( TResourceReader& aDriveReader, TBitFlags aCategories );
       
    68 
       
    69     public: // Common mandatory framework methods
       
    70 
       
    71         /**
       
    72         *
       
    73         */
       
    74         virtual TMMCScBkupOperationType AssociatedOpType() const = 0;
       
    75 
       
    76         /**
       
    77         *
       
    78         */
       
    79         virtual TBURPartType PartType() const = 0;
       
    80 
       
    81         /**
       
    82         *
       
    83         */
       
    84         virtual TBackupIncType IncrementType() const = 0;
       
    85 
       
    86         /**
       
    87         *
       
    88         */
       
    89         virtual TTransferDataType PassiveTransferType() const = 0;
       
    90 
       
    91         /**
       
    92         *
       
    93         */
       
    94         virtual TTransferDataType ActiveTransferType() const = 0;
       
    95 
       
    96         /**
       
    97         *
       
    98         */
       
    99         virtual TPackageDataType PackageTransferType() const = 0;
       
   100 
       
   101     public: // Common attributes
       
   102 
       
   103         /**
       
   104         *
       
   105         */
       
   106         IMPORT_C const CMMCScBkupDriveAndOperationTypeManager& DriveAndOperations() const;
       
   107         
       
   108         /**
       
   109         *
       
   110         */
       
   111         IMPORT_C void SetArchiveInfosL(RPointerArray<CMMCScBkupArchiveInfo>& aInfos);
       
   112         
       
   113         /**
       
   114         *
       
   115         */
       
   116         RMMCScBkupPointerArray<CMMCScBkupArchiveInfo>& ArchiveInfos();
       
   117         
       
   118         /**
       
   119         *
       
   120         */
       
   121         const CMMCScBkupArchiveInfo& ArchiveInfo(TBitFlags aCategory) const;
       
   122 
       
   123         /**
       
   124         *
       
   125         */
       
   126         const TDesC& FileName(TInt aIndex) const;
       
   127 
       
   128         /**
       
   129         *
       
   130         */
       
   131         TBitFlags Categories() { return iCategories; }
       
   132         
       
   133     private: // Data members
       
   134 
       
   135         //
       
   136         CMMCScBkupDriveAndOperationTypeManager* iDriveAndOperations;
       
   137         //
       
   138         RMMCScBkupPointerArray< CMMCScBkupArchiveInfo > iArchiveInfos;
       
   139         //
       
   140         TBitFlags iCategories;
       
   141     };
       
   142 
       
   143 
       
   144 
       
   145 /**
       
   146 *
       
   147 *
       
   148 * @since 3.0
       
   149 */
       
   150 NONSHARABLE_CLASS(CMMCScBkupOpParamsBackupFull) : public CMMCScBkupOpParamsBase
       
   151     {
       
   152     public:
       
   153 
       
   154         /**
       
   155         *
       
   156         */
       
   157         IMPORT_C static CMMCScBkupOpParamsBackupFull* NewL( TResourceReader& aDriveReader, TResourceReader& aCategoryReader,
       
   158             TDriveNumber aDrive, TBitFlags aCategories );
       
   159 
       
   160         /**
       
   161         *
       
   162         */
       
   163         IMPORT_C ~CMMCScBkupOpParamsBackupFull();
       
   164 
       
   165     private:
       
   166 
       
   167         /**
       
   168         *
       
   169         */
       
   170         CMMCScBkupOpParamsBackupFull( TDriveNumber aDrive );
       
   171 
       
   172         /**
       
   173         *
       
   174         */
       
   175         void ConstructL( TResourceReader& aDriveReader, TResourceReader& aCategoryReader, TBitFlags aCategories );
       
   176 
       
   177         /**
       
   178         *
       
   179         */
       
   180         void ReadFromResourceL( TResourceReader& aReader );
       
   181         
       
   182     public: // From CMMCScBkupOpParamsBase
       
   183         IMPORT_C TMMCScBkupOperationType AssociatedOpType() const;
       
   184         IMPORT_C TBURPartType PartType() const;
       
   185         IMPORT_C TBackupIncType IncrementType() const;
       
   186         IMPORT_C TTransferDataType PassiveTransferType() const;
       
   187         IMPORT_C TTransferDataType ActiveTransferType() const;
       
   188         IMPORT_C TPackageDataType PackageTransferType() const;
       
   189 
       
   190     private: // Data members
       
   191 
       
   192         //
       
   193         TDriveNumber iDrive;
       
   194     };
       
   195 
       
   196 
       
   197 
       
   198 
       
   199 /**
       
   200 *
       
   201 *
       
   202 * @since 3.0
       
   203 */
       
   204 NONSHARABLE_CLASS(CMMCScBkupOpParamsRestoreFull) : public CMMCScBkupOpParamsBase
       
   205     {
       
   206     public:
       
   207 
       
   208         /**
       
   209         *
       
   210         */
       
   211         IMPORT_C static CMMCScBkupOpParamsRestoreFull* NewL( TResourceReader& aDriveReader, TBitFlags aCategories );
       
   212 
       
   213         /**
       
   214         *
       
   215         */
       
   216         IMPORT_C ~CMMCScBkupOpParamsRestoreFull();
       
   217 
       
   218     private:
       
   219 
       
   220         /**
       
   221         *
       
   222         */
       
   223         CMMCScBkupOpParamsRestoreFull();
       
   224 
       
   225     public: // From CMMCScBkupOpParamsBase
       
   226         IMPORT_C TMMCScBkupOperationType AssociatedOpType() const;
       
   227         IMPORT_C TBURPartType PartType() const;
       
   228         IMPORT_C TBackupIncType IncrementType() const;
       
   229         IMPORT_C TTransferDataType PassiveTransferType() const;
       
   230         IMPORT_C TTransferDataType ActiveTransferType() const;
       
   231         IMPORT_C TPackageDataType PackageTransferType() const;
       
   232     };
       
   233 
       
   234 
       
   235 
       
   236 
       
   237 
       
   238 #endif // __CMMCSCBKUPOPERATIONPARAMETERS_H__
       
   239 
       
   240 //End of File