filemanager/bkupengine/inc/CMMCScBkupDriveSpecificRequest.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 CMMCScBkupDriveSpecificRequest
       
    15 *     
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __CMMCSCBKUPDRIVESPECIFICREQUEST_H__
       
    20 #define __CMMCSCBKUPDRIVESPECIFICREQUEST_H__
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <f32file.h>
       
    25 
       
    26 // User includes
       
    27 #include "TMMCScBkupOwnerDataType.h"
       
    28 
       
    29 // Classes referenced
       
    30 class CMMCScBkupDriveAndOperationTypeManager;
       
    31 
       
    32 
       
    33 
       
    34 /**
       
    35 *
       
    36 *
       
    37 * @since 3.0
       
    38 */
       
    39 NONSHARABLE_CLASS(CMMCScBkupDriveSpecificRequest) : public CActive
       
    40     {
       
    41     protected:
       
    42 
       
    43         /**
       
    44         * C++ default constructor
       
    45         */
       
    46         CMMCScBkupDriveSpecificRequest( const CMMCScBkupDriveAndOperationTypeManager& aDriveAndOperations, TMMCScBkupOwnerDataType aDataType, CActive::TPriority aPriority = CActive::EPriorityIdle );
       
    47 
       
    48         /**
       
    49         * Second phase constructor
       
    50         */
       
    51         void ConstructL( );
       
    52 
       
    53     public:
       
    54 
       
    55         /**
       
    56         * C++ destructor
       
    57         */
       
    58         ~CMMCScBkupDriveSpecificRequest();
       
    59 
       
    60     protected: // API
       
    61 
       
    62         /**
       
    63         *
       
    64         */
       
    65         virtual void RequestL( TRequestStatus& aObserver );
       
    66 
       
    67     protected: // Internal methods
       
    68 
       
    69         /**
       
    70         *
       
    71         */
       
    72         TBool NextValidDrive(TDriveNumber& aDrive);
       
    73 
       
    74         /**
       
    75         *
       
    76         */
       
    77         TBool NextValidDrive(TDriveNumber& aDrive, const TDriveList& aCrossCheckList);
       
    78 
       
    79         /**
       
    80         * Return the current drive
       
    81         */
       
    82         TDriveNumber CurrentDrive() const;
       
    83 
       
    84         /**
       
    85         *
       
    86         */
       
    87         void CompleteObserverRequest(TInt aCompletionCode);
       
    88 
       
    89         /**
       
    90         *
       
    91         */
       
    92         void CompleteSelf(TInt aCompletionCode = KErrNone);
       
    93 
       
    94         /**
       
    95         *
       
    96         */
       
    97         inline const CMMCScBkupDriveAndOperationTypeManager& DriveAndOperations() const { return iDriveAndOperations; }
       
    98 
       
    99     private: // From CActive
       
   100 
       
   101         /**
       
   102         * Default behaviour is to do nothing
       
   103         */
       
   104         void DoCancel();
       
   105 
       
   106         /**
       
   107         * Complete's observer with the error code
       
   108         */
       
   109         TInt RunError(TInt aError);
       
   110 
       
   111     private: // Member data
       
   112 
       
   113         //
       
   114         const CMMCScBkupDriveAndOperationTypeManager& iDriveAndOperations;
       
   115         //
       
   116         TMMCScBkupOwnerDataType iDataType;
       
   117         //
       
   118         TInt iCurrentDrive;
       
   119         //
       
   120         TRequestStatus* iObserver;
       
   121     };
       
   122 
       
   123 
       
   124 
       
   125 
       
   126 
       
   127 
       
   128 
       
   129 
       
   130 #endif // __CMMCSCBKUPARCHIVE_H__
       
   131 
       
   132 //End of File