filemanager/bkupengine/inc/CMMCScBkupDriveAndOperationTypeManager.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 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 
       
    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( TResourceReader& aReader );
       
    98 
       
    99         /**
       
   100         *
       
   101         */
       
   102         IMPORT_C ~CMMCScBkupDriveAndOperationTypeManager();
       
   103 
       
   104     private:
       
   105 
       
   106         /**
       
   107         *
       
   108         */
       
   109         CMMCScBkupDriveAndOperationTypeManager();
       
   110 
       
   111         /**
       
   112         *
       
   113         */
       
   114         void ConstructL( TResourceReader& aReader );
       
   115 
       
   116 
       
   117     public: // API
       
   118 
       
   119         /**
       
   120         *
       
   121         */
       
   122         TInt Count() const;
       
   123 
       
   124         /**
       
   125         *
       
   126         */
       
   127         const TMMCScBkupDriveAndOperationType& At( TInt aIndex ) const;
       
   128         
       
   129         /**
       
   130         *
       
   131         */
       
   132         inline const TDriveList& DriveList() const { return iCalculatedDriveList; }
       
   133 
       
   134         /**
       
   135         *
       
   136         */
       
   137         TBool IsDataTypeAllowedToAccessDrive( TDriveNumber aDrive, TMMCScBkupOwnerDataType aDataType ) const;
       
   138 
       
   139     private: // Internal methods
       
   140 
       
   141 
       
   142     private: // Data members
       
   143         
       
   144         //
       
   145         RArray< TMMCScBkupDriveAndOperationType > iEntries;
       
   146         //
       
   147         TDriveList iCalculatedDriveList;
       
   148 
       
   149     };
       
   150 
       
   151 #endif // __CMMCSCBKUPDRIVEANDOPERATIONTYPEMANAGER_H__
       
   152 
       
   153 //End of File