remotestoragefw/remotefileengine/inc/rsfwdormantmountloader.h
branchRCL_3
changeset 20 1aa8c82cb4cb
parent 0 3ad9d5175a89
equal deleted inserted replaced
19:88ee4cf65e19 20:1aa8c82cb4cb
       
     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:  class for restoring dormant mounts asynchronously when server starts
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_RSFWDORMANTMOUNTLOADER_H
       
    20 #define C_RSFWDORMANTMOUNTLOADER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "rsfwvolumetable.h"
       
    25 
       
    26 
       
    27 // how many microseconds after server startup
       
    28 // we start to restore the dormant mounts.
       
    29 #define KDormantLoaderDelay 1000000 // 1s
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  Crsfwdormantmountloader class
       
    35 *
       
    36 *  This class is for doing stuff asynchronously when loading dormant 
       
    37 *  mounts at server startup. When server is started, dormant mounts
       
    38 *  are loaded. However, if there is something that takes more time
       
    39 *  it can be done synchronously while client is waiting for server to start.
       
    40 *  
       
    41 *  Currently only such operation is saving "dirty" files to the local cache
       
    42 */
       
    43 class CRsfwDormantMountLoader : public CActive                                       
       
    44     {
       
    45  public: // Constructors and destructor
       
    46 
       
    47         /**
       
    48         * Symbian OS two-phased constructor
       
    49         * @return Pointer to this component.
       
    50         */
       
    51         IMPORT_C static CRsfwDormantMountLoader* NewL(CRsfwVolumeTable *aTheTable);
       
    52 
       
    53         /**
       
    54         * C++ default destructor.
       
    55         */
       
    56         virtual ~CRsfwDormantMountLoader();
       
    57 
       
    58  private:
       
    59 
       
    60         /**
       
    61         * C++ default constructor.
       
    62         */
       
    63         CRsfwDormantMountLoader();
       
    64 
       
    65         /**
       
    66         * Symbian OS default constructor.
       
    67         */
       
    68         void ConstructL(CRsfwVolumeTable *aTheTable);
       
    69 
       
    70 
       
    71  private: // New functions
       
    72 
       
    73         void ResolveDirtyFilesL();
       
    74         
       
    75    
       
    76 private:    // Functions from base classes
       
    77 
       
    78         /**
       
    79         * Handles an active object’s request completion event.
       
    80         */
       
    81         void RunL();  
       
    82 
       
    83  		/**
       
    84     	*Implements cancellation of an outstanding request.
       
    85 		*/
       
    86 		void DoCancel();
       
    87 
       
    88  		/**
       
    89     	* Called in case RunL() leaves
       
    90 		*/
       
    91         TInt RunError(TInt aError);
       
    92         
       
    93 private:    // Data
       
    94         RTimer  iTimer;
       
    95         CRsfwVolumeTable* iVolumeTable;
       
    96 	  
       
    97     };
       
    98 
       
    99 #endif  // REMOTEWAITNOTEMANAGER_H
       
   100 
       
   101 // End of File