connectivitymodules/SeCon/services/pcd/inc/sconbackuprestore.h
branchRCL_3
changeset 20 4a793f564d72
parent 0 d0791faffa3f
equal deleted inserted replaced
19:0aa8cc770c8a 20:4a793f564d72
       
     1 /*
       
     2 * Copyright (c) 2005-2008 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:  CSConBackupRestore header file
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _SCONBACKUPRESTORE_H_
       
    20 #define _SCONBACKUPRESTORE_H_
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <e32cons.h>
       
    26 
       
    27 class CSConSBEClient;
       
    28 class CSConBackupRestoreQueue;
       
    29 class RFs;
       
    30 
       
    31 //============================================================
       
    32 // Class CSConBackupRestore declaration
       
    33 //============================================================	
       
    34 NONSHARABLE_CLASS( CSConBackupRestore ): public CActive
       
    35 	{
       
    36 	public:
       
    37 		/**
       
    38 		 * Two-phase constructor
       
    39 		 * @param aQueue The address of CSConBackupRestoreQueue
       
    40 		 * @param aMaxObjectSize Max object size
       
    41 		 * @param aFs aReference to RFs connection.
       
    42     	 * @return CSConBackupRestore instance
       
    43 		 */
       
    44 		static CSConBackupRestore* NewL( 
       
    45 			CSConBackupRestoreQueue* aQueue, 
       
    46 			const TInt aMaxObjectSize, RFs& aFs );
       
    47 		/**
       
    48 		 * Destructor
       
    49 		 * @return none
       
    50 		 */
       
    51 		~CSConBackupRestore();
       
    52 		
       
    53 		/**
       
    54 		 * Starts backup-restore task
       
    55 		 * @param aTaskId The task number
       
    56     	 * @return none
       
    57 		 */
       
    58 		void StartBackupRestore( TInt aTaskId );
       
    59 		/**
       
    60 		 * Stops executing backup-restore task
       
    61 		 * @param aTaskId
       
    62     	 * @return none
       
    63 		 */
       
    64 		void StopBackupRestore( TInt aTaskId );
       
    65 		/**
       
    66 		 * Resets backup
       
    67 		 * @return none
       
    68 		 */
       
    69 		void Reset();
       
    70 		
       
    71 		/**
       
    72 		 * Returns the active status of the backup-restore
       
    73 		 * @return ETrue if backup-restore is active, else EFalse
       
    74 		 */
       
    75 		TBool BackupRestoreActive() const;
       
    76 		
       
    77 	private:
       
    78 		/**
       
    79 		 * Constructor
       
    80 		 * @param aQueue The address of CSConBackupRestoreQueue
       
    81 		 * @param aFs aReference to RFs connection.
       
    82 		 * @return none
       
    83 		 */
       
    84 		CSConBackupRestore( CSConBackupRestoreQueue* aQueue, RFs& aFs );
       
    85 		/**
       
    86 		 * Initializes member data
       
    87 		 * @param aMaxObjectSize Max object size
       
    88 		 * @return none
       
    89 		 */
       
    90 		void ConstructL( const TInt aMaxObjectSize );
       
    91 		/**
       
    92 		 * Implementation of CActive::DoCancel()
       
    93 		 * @return none
       
    94 		 */
       
    95 		void DoCancel();
       
    96 		/**
       
    97 		 * Implementation of CActive::RunL()
       
    98 		 * @return none
       
    99 		 */
       
   100 		void RunL();
       
   101 		
       
   102 	private:
       
   103 		CSConBackupRestoreQueue*		iQueue; 
       
   104 		CSConSBEClient*					iSBEClient;
       
   105 		TInt							iCurrentTask;
       
   106 		TInt							iMaxObjectSize;
       
   107 		TBool							iBackupRestoreActive;
       
   108 		RFs&                            iFs;
       
   109 	};
       
   110 	
       
   111 #endif // _SCONBACKUPRESTORE_H_
       
   112 
       
   113 // End of file