backupandrestore/backuptest/burtestserver/TestServer/inc/t_asyncbackuptransferhandler.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 /**
       
     2 * Copyright (c) 2004-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @released
       
    23 */
       
    24 
       
    25 #ifndef __ASYNC_BACKUP_TRANSFER_HANDLER_H__
       
    26 #define __ASYNC_BACKUP_TRANSFER_HANDLER_H__
       
    27 
       
    28 #include "t_teststepbackup.h"
       
    29 
       
    30 using namespace conn;
       
    31 
       
    32 namespace bur_ts
       
    33 	{
       
    34 	// Forward declaration
       
    35 	class CBURTestStepBase;
       
    36 	
       
    37 	class CAsyncBackupTransferHandler : public CActive
       
    38 		/**
       
    39 		Implements a mechanism for asynchronous data transfers bewteen CTestStepBackup 
       
    40 		and CSBEClient.
       
    41 		
       
    42 		@released
       
    43 		@internalComponent
       
    44 		*/
       
    45 		{
       
    46 	public:
       
    47 		static CAsyncBackupTransferHandler* NewL(CBURTestStepBase* aTestStep);
       
    48 		~CAsyncBackupTransferHandler();
       
    49 		
       
    50 		// CActive
       
    51 		void StartL();
       
    52 		TInt RunError(TInt aError);
       
    53 		
       
    54 		TBool Success();
       
    55 		
       
    56 	private:
       
    57 		CAsyncBackupTransferHandler(CBURTestStepBase* aTestStep);
       
    58 		virtual void ConstructL();
       
    59 	
       
    60 		// CActive
       
    61 		void RunL();
       
    62 		void DoCancel();
       
    63 		
       
    64 		void ContinueL();
       
    65 		void MakeRequestDataCallL();
       
    66 		void CurrentIDL();
       
    67 		
       
    68 	private:
       
    69 		/** */
       
    70 		CActiveSchedulerWait* iActiveScheduler;
       
    71 		
       
    72 		/** Current index into iTransferTypes */
       
    73 		TInt iCurrentIndex;
       
    74 		
       
    75 		/** Successful if all transfers are completed without errors */
       
    76 		TBool iSuccess;
       
    77 		
       
    78 		/** Parent test step for access to its logging */
       
    79 		CBURTestStepBase* iTestStep;
       
    80 		
       
    81 		/** */
       
    82 		HBufC* iID;
       
    83 		};
       
    84 	}
       
    85 
       
    86 #endif // __ASYNC_BACKUP_TRANSFER_HANDLER_H__
       
    87