contextframework/cfw/inc/cfscriptengine/cfpendingpersistencytask.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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:  CCFPendingPersistencyTask class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CFPENDINGPERSISTENCYTASK_H
       
    20 #define CFPENDINGPERSISTENCYTASK_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 // CLASS DECLARATION
       
    27 class CCFOperationNode;
       
    28 
       
    29 /**
       
    30 * CCFPendingPersistencyTask is used to store information
       
    31 * about store and restore operations during system backup and restore.
       
    32 */
       
    33 NONSHARABLE_CLASS( CCFPendingPersistencyTask ) : public CBase
       
    34 	{
       
    35     public: // Types
       
    36 
       
    37 	    /**
       
    38 	    * Store or restore operation.
       
    39 	    */
       
    40 	    enum TCFPersistencyMode
       
    41 	        {
       
    42 	        EStore = 0, 
       
    43 	        ERestore, 
       
    44 	        };
       
    45 
       
    46 	public: // Constructors and destructor
       
    47 	
       
    48 		/**
       
    49 		* Destructor.
       
    50 		*/
       
    51 		~CCFPendingPersistencyTask();
       
    52 	
       
    53 		/**
       
    54 		* Two-phased constructor.
       
    55 		*/
       
    56 		static CCFPendingPersistencyTask* NewL( TCFPersistencyMode aMode,
       
    57 				const TDesC& aFileName, CCFOperationNode& aNode );
       
    58 	
       
    59 		/**
       
    60 		* Two-phased constructor.
       
    61 		*/
       
    62 		static CCFPendingPersistencyTask* NewLC( TCFPersistencyMode aMode,
       
    63 				const TDesC& aFileName, CCFOperationNode& aNode );
       
    64 	
       
    65 	public: // New functions
       
    66 	
       
    67 		TCFPersistencyMode Mode();
       
    68 		const TDesC& FileName();
       
    69 		CCFOperationNode& Operation();
       
    70 		
       
    71 		
       
    72 	private:
       
    73 	
       
    74 		/**
       
    75 		* Constructor for performing 1st stage construction
       
    76 		*/
       
    77 		CCFPendingPersistencyTask( TCFPersistencyMode aMode,
       
    78 				CCFOperationNode& aNode );
       
    79 	
       
    80 		/**
       
    81 		* EPOC default constructor for performing 2nd stage construction
       
    82 		*/
       
    83 		void ConstructL( const TDesC& aFileName );
       
    84 		
       
    85 		
       
    86 	private:
       
    87 
       
    88 		// Own: persistency operation type: Store/Restore
       
    89 		TCFPersistencyMode iPersistencyMode;
       
    90 		
       
    91 		// Own: file name for the persistency operation
       
    92 		HBufC* iFileName;
       
    93 		
       
    94 		// Ref: reference to the operation node requested the persistency op.
       
    95 		CCFOperationNode* iOperationNode;
       
    96 	};
       
    97 
       
    98 #endif // CFPENDINGPERSISTENCYTASK_H
       
    99