filemanager/src/fmbkupengine/inc/CMMCScBkupDriveAndOperationTypeManager.h
branchRCL_3
changeset 39 65326cf895ed
parent 38 491b3ed49290
child 42 f5c50b8af68c
equal deleted inserted replaced
38:491b3ed49290 39: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 of CMMCScBkupDriveAndOperationTypeManager
       
    15 *     
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __CMMCSCBKUPDRIVEANDOPERATIONTYPEMANAGER_H__
       
    20 #define __CMMCSCBKUPDRIVEANDOPERATIONTYPEMANAGER_H__
       
    21 
       
    22 // System includes
       
    23 #include <connect/sbdefs.h>
       
    24 #include <connect/sbtypes.h>
       
    25 #include <barsread.h>
       
    26 
       
    27 // User includes
       
    28 #include "TMMCScBkupOwnerDataType.h"
       
    29 #include "CMMCScBkupOperationParameters.h"
       
    30 // Namespaces
       
    31 using namespace conn;
       
    32 
       
    33 
       
    34 
       
    35 /**
       
    36 *
       
    37 *
       
    38 * @since 3.0
       
    39 */
       
    40 NONSHARABLE_CLASS(TMMCScBkupDriveAndOperationType)
       
    41     {
       
    42     public:
       
    43         inline TMMCScBkupDriveAndOperationType()
       
    44             : iDrive( EDriveC ), iType( EMMCScBkupOwnerDataTypeAny ) { }
       
    45 
       
    46         inline TMMCScBkupDriveAndOperationType( TDriveNumber aDrive, TMMCScBkupOwnerDataType aType )
       
    47             : iDrive( aDrive ), iType( aType ) { }
       
    48  
       
    49     public: // Common attributes
       
    50 
       
    51         /**
       
    52         *
       
    53         */
       
    54         inline TDriveNumber Drive() const { return iDrive; }
       
    55 
       
    56         /**
       
    57         *
       
    58         */
       
    59         inline void SetDrive( TDriveNumber aDrive ) { iDrive = aDrive; }
       
    60 
       
    61         /**
       
    62         *
       
    63         */
       
    64         inline TMMCScBkupOwnerDataType DataType() const { return iType; }
       
    65 
       
    66         /**
       
    67         *
       
    68         */
       
    69         inline void SetDataType( TMMCScBkupOwnerDataType aType ) { iType = aType; }
       
    70 
       
    71     private: // Data members
       
    72 
       
    73         //
       
    74         TDriveNumber iDrive;
       
    75         //
       
    76         TMMCScBkupOwnerDataType iType;
       
    77     };
       
    78 
       
    79 
       
    80 
       
    81 
       
    82 
       
    83 
       
    84 
       
    85 /**
       
    86 *
       
    87 *
       
    88 * @since 3.0
       
    89 */
       
    90 NONSHARABLE_CLASS(CMMCScBkupDriveAndOperationTypeManager) : public CBase
       
    91     {
       
    92     public:
       
    93 
       
    94         /**
       
    95         *
       
    96         */
       
    97         IMPORT_C static CMMCScBkupDriveAndOperationTypeManager* NewL( 
       
    98         		BkupDrivesAndOperationList *aDriveList );
       
    99 
       
   100         /**
       
   101         *
       
   102         */
       
   103         IMPORT_C ~CMMCScBkupDriveAndOperationTypeManager();
       
   104 
       
   105     private:
       
   106 
       
   107         /**
       
   108         *
       
   109         */
       
   110         CMMCScBkupDriveAndOperationTypeManager();
       
   111 
       
   112         /**
       
   113         *
       
   114         */
       
   115         void ConstructL( BkupDrivesAndOperationList *aDriveList );
       
   116 
       
   117 
       
   118     public: // API
       
   119 
       
   120         /**
       
   121         *
       
   122         */
       
   123         TInt Count() const;
       
   124 
       
   125         /**
       
   126         *
       
   127         */
       
   128         const TMMCScBkupDriveAndOperationType& At( TInt aIndex ) const;
       
   129         
       
   130         /**
       
   131         *
       
   132         */
       
   133         inline const TDriveList& DriveList() const { return iCalculatedDriveList; }
       
   134 
       
   135         /**
       
   136         *
       
   137         */
       
   138         TBool IsDataTypeAllowedToAccessDrive( TDriveNumber aDrive, TMMCScBkupOwnerDataType aDataType ) const;
       
   139 
       
   140     private: // Internal methods
       
   141 
       
   142 
       
   143     private: // Data members
       
   144         
       
   145         //
       
   146         RArray< TMMCScBkupDriveAndOperationType > iEntries;
       
   147         //
       
   148         TDriveList iCalculatedDriveList;
       
   149 
       
   150     };
       
   151 
       
   152 #endif // __CMMCSCBKUPDRIVEANDOPERATIONTYPEMANAGER_H__
       
   153 
       
   154 //End of File