connectivitymodules/SeCon/services/pcd/inc/sconbackuprestore.h
branchRCL_3
changeset 20 4a793f564d72
parent 0 d0791faffa3f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectivitymodules/SeCon/services/pcd/inc/sconbackuprestore.h	Wed Sep 01 12:20:56 2010 +0100
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CSConBackupRestore header file
+*
+*/
+
+
+#ifndef _SCONBACKUPRESTORE_H_
+#define _SCONBACKUPRESTORE_H_
+
+// INCLUDES
+
+#include <e32base.h>
+#include <e32cons.h>
+
+class CSConSBEClient;
+class CSConBackupRestoreQueue;
+class RFs;
+
+//============================================================
+// Class CSConBackupRestore declaration
+//============================================================	
+NONSHARABLE_CLASS( CSConBackupRestore ): public CActive
+	{
+	public:
+		/**
+		 * Two-phase constructor
+		 * @param aQueue The address of CSConBackupRestoreQueue
+		 * @param aMaxObjectSize Max object size
+		 * @param aFs aReference to RFs connection.
+    	 * @return CSConBackupRestore instance
+		 */
+		static CSConBackupRestore* NewL( 
+			CSConBackupRestoreQueue* aQueue, 
+			const TInt aMaxObjectSize, RFs& aFs );
+		/**
+		 * Destructor
+		 * @return none
+		 */
+		~CSConBackupRestore();
+		
+		/**
+		 * Starts backup-restore task
+		 * @param aTaskId The task number
+    	 * @return none
+		 */
+		void StartBackupRestore( TInt aTaskId );
+		/**
+		 * Stops executing backup-restore task
+		 * @param aTaskId
+    	 * @return none
+		 */
+		void StopBackupRestore( TInt aTaskId );
+		/**
+		 * Resets backup
+		 * @return none
+		 */
+		void Reset();
+		
+		/**
+		 * Returns the active status of the backup-restore
+		 * @return ETrue if backup-restore is active, else EFalse
+		 */
+		TBool BackupRestoreActive() const;
+		
+	private:
+		/**
+		 * Constructor
+		 * @param aQueue The address of CSConBackupRestoreQueue
+		 * @param aFs aReference to RFs connection.
+		 * @return none
+		 */
+		CSConBackupRestore( CSConBackupRestoreQueue* aQueue, RFs& aFs );
+		/**
+		 * Initializes member data
+		 * @param aMaxObjectSize Max object size
+		 * @return none
+		 */
+		void ConstructL( const TInt aMaxObjectSize );
+		/**
+		 * Implementation of CActive::DoCancel()
+		 * @return none
+		 */
+		void DoCancel();
+		/**
+		 * Implementation of CActive::RunL()
+		 * @return none
+		 */
+		void RunL();
+		
+	private:
+		CSConBackupRestoreQueue*		iQueue; 
+		CSConSBEClient*					iSBEClient;
+		TInt							iCurrentTask;
+		TInt							iMaxObjectSize;
+		TBool							iBackupRestoreActive;
+		RFs&                            iFs;
+	};
+	
+#endif // _SCONBACKUPRESTORE_H_
+
+// End of file